You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fc74cfb
Browse filesBrowse the repository at this point in the historyBrowse files
fix(metadata-protocol): the stored-form census reads a pair held as booted code as a pair (#38803)
_Requested by **Steve** · [project
thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9SSdM6AYsxMukn8uhMeGEh7)_
Part of #37111 — PR 3 (the card's two remaining acceptance items). PR 1
is #38613 (`1d959b0910`) and PR 2 is #38748 (`c4472c8631`). The seat
closes the card once this PR merges.
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 用户能看到什么变化:把 `.custom`
定制包当作代码启动的部署,升级时定制包自己那张旧写法表单会搬成它自己的表单行,不再被误拦住;定制包代码里自己也带这个表单名时同样如此。公开地址前后应答不变。
- 另一项只加钉子:在一个真正强制「一槽一行」的存储上,证明两个计划抢同一槽时升级照旧被拦,什么都不写。
- 要你做什么:Tier H 的 draft,审核后按受管流程批准。
- 风险:小。普查只多认出一种已知形状;其余计划不变(planner、引擎、rest 全套件绿)。
## What changes
- **③ a pair held as booted code**
(`protocol-stored-form-migration.ts`). A `.custom` pair registered as
code is read-only, so the census reads it at a `base` address. It then
asked the pair door for a pair of the pair, which ADR-0146 D3 never
gives. Measured before the change: the pair's own old-shape row held the
upgrade with the refusal "is itself a paired customization package". The
census now reads the pair by what its package is
(`customizationBasePackageId`), not by the address kind:
- the pair's own old-shape row moves into the pair's own `form` row
(`pair_form`, no `overrides`), as ADR-0159 D7 already states for the
pair's own row;
- a stored `form` row already there is kept.
This holds on both destination routes: where the pair's code ships no
form of the name, and where it ships the name itself (an old-shape form
among its items; review 7292231403 S1). On the second route the store's
seal is still read first: where the pair ships the name as a sealed
`form` item, the hold is the seal's, naming the pair. The pair door is
not asked. Two other shapes were measured over the same booted pair and
were already right, so they are unchanged: a declared override in the
pair, and a row bound to the base.
- **Step 7 of ruling record 7265816895: one slot, one row, on a store
that enforces it.** Measured first: neither the engine tests' memory
store nor the rest tests' SQL store refuses a second active row in a
slot as booted, because the overlay unique index is built by
`ensureOverlayIndex`. The new rest pin builds that index and proves the
store refuses a second active row in a pair's slot (control). Then, with
the pair's own `form` row beside a row planned into that pair, it
asserts that the census holds both, `--apply` writes nothing, the slot
keeps its one row byte-equal, every stored row is byte-equal, and both
doors answer the same.
## Why
These are the two acceptance items #38748 left owed on #37111, with
their reasons (the `③` note of record 7253682863 on
`pairFormDestination`, and step 7 of ruling record 7265816895). The
seat's ruling of 2026-11-30T20:09Z puts them on this card as PR 3 (claim
amendment 6, 7290758981). N7 of contract review 7282065700 does not fit
here: the early route has no destination that could be read as a move.
It stays where the seat put it.
The operator page (`content/docs/deployment/stored-forms-upgrade.mdx`)
gains one clause (review 7292231403 N1): a row of a `.custom` package
the deployment holds as code stays in that package as its own form.
## Verification
Head `0a1bb19fd8`.
- **Red first** (the pins run against `origin/main`'s planner): planner
"③ a pair held as booted code…" 2 red; rest "③ a pair held as booted
code…" red. For S1 (the pins run against `5a6cb82666`'s planner):
planner "where the pair's code ships the name itself…" 3 red (the first
two held, the third named the pair door's refusal instead of the seal);
rest "③ a pair held as booted code that ships the name itself…" red (it
held). The step 7 pin pins behaviour that already held, so the ablation
below is its proof.
- **Ablations** (`scripts/ablation-replace.mjs`, each restored to
`HEAD`):
- Reading the pair from the address kind where the pair ships no form of
the name: the two ③ planner pins and the ③ rest pin red; engine 38/38.
- Reading the pair from the address kind where the pair ships the name
itself: exactly the three S1 planner pins and the S1 rest pin red;
engine 38/38.
- Not keeping the pair's own `form` row where it stands: exactly the
planner "its stored `form` row is kept" pin red.
- Dropping the hold of a pair slot two plans claim: the step 7 rest pin
red, with 9 planner and 7 engine contested-slot pins.
- **Suites at the head:** planner 112/112, engine 38/38, rest 97/97;
metadata-protocol type-check clean.
- **Derived gates:** `dispatch-gates --commands` derived 95 commands;
all 95 exit 0, each run with `< /dev/null`; `dispatch-gates --ran`: 95
run, 0 NOT-MEASURED.
- **`overlap-check`:** clean against `origin/main`. Two open trunk pulls
of the approvals lane are named. #38797 merges cleanly. #38497 conflicts
in the planner test file only because its head predates #38748, which
those files came from; neither authors a change to these files.
- **Not measured locally, CI owns:** the type-check lanes and the
CI-only jobs the derivation names.
## Deviations
- **File surface** (claim amendment 6): the planner and the rest pin
file; the planner's own test file and the changeset are implicit. The
operator page is added by the seat's order on review 7292231403 (N1). No
other path.
- **`Clause-②: no`** differs from the claim's standing `yes`, which was
written for PR 2's exports (review 7292231403 N2). This PR changes no
export, type, route or schema, so nothing an author writes or a consumer
imports changes.
- **No ADR change.** ADR-0159 D7 already says the pair's own row moves
into the pair's own `form` row; the code now agrees with it for a pair
held as booted code.
- **N7 of record 7282065700 is not built.** The seat records it as an
accepted deviation when it closes the card.
## Human Minimum
- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(No `packages/spec` change.)
- [x] 2. Every name I added uses the casing for its kind.
- [ ] 3. No formatter ran; `pnpm lint` was not run locally (CI's lint
lane owns it).
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset.
- [x] 6. `packages/spec` touched: n/a.
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English.
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01ADHkmQrGTjSRSiwWSe6AhK
<!-- signed: repo:objectstack#3 · os-steve ·
session_01ADHkmQrGTjSRSiwWSe6AhK -->
---------
Co-authored-by: Claude <noreply@anthropic.com>
fix(metadata-protocol): the stored-form census reads a `.custom` pair held as booted code as a pair (ADR-0159 D7)
6
+
7
+
Clause-②: no
8
+
Metadata-protocol: none
9
+
10
+
A paired customization package registered as code is read-only, so the census read it at a read-only package's address and asked the pair door for a pair of it, which a pair never has: the pair's own old-shape form held the upgrade with that refusal. The census now reads the pair by what its package is. The pair's own old-shape row moves into the pair's own `form` row, as it does in a pair the door created, and a stored `form` row already there is kept, whether or not the pair's code ships the form's name; where the pair ships it as a sealed `form` item, the store's seal is the hold.
Copy file name to clipboardExpand all lines: content/docs/deployment/stored-forms-upgrade.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ package of your own, or the environment itself when no package ships it.
36
36
| Outcome | What the upgrade does |
37
37
|---|---|
38
38
|**kept**| The form is already stored as a form. The rows the server serves behind it at that package fold into it. |
39
-
|**moves**| The row moves to a form row, with its body as written: into the package's paired `.custom` package as a declared override for a read-only package, into the package itself for a writable one, or into the environment. An override already stored in a `.custom` package keeps its package and the version it is based on. A row bound to a read-only package that ships no form of that name, or an override of a package that ships none, moves into that package's `.custom` package as a form of its own, with no override declared; its public address answers as it does today. Where the server today serves such a row at one other package's address, it moves as a row of that package does, into that package's `.custom` package as a declared override. The rows the server serves behind the moved row at that package fold into it. |
39
+
|**moves**| The row moves to a form row, with its body as written: into the package's paired `.custom` package as a declared override for a read-only package, into the package itself for a writable one, or into the environment. An override already stored in a `.custom` package keeps its package and the version it is based on. A row bound to a read-only package that ships no form of that name, or an override of a package that ships none, moves into that package's `.custom` package as a form of its own, with no override declared; its public address answers as it does today. A row of a `.custom` package that the deployment holds as code stays in that package as its own form, whether or not the package ships that name. Where the server today serves such a row at one other package's address, it moves as a row of that package does, into that package's `.custom` package as a declared override. The rows the server serves behind the moved row at that package fold into it. |
40
40
|**will be removed**| The row is an internal record form: a create or edit form with no public link that no action opens, over nothing that has a link. New and Edit follow the object's field groups instead, and the report says whether the object declares any. A row bound to no package is read at every package that ships its form: it is removed only when it is an internal record form at each of them, and moves at each of them otherwise. An older row behind the removed one goes with it, unless another package serves that row: the report then names it as not removed, with what happens to it there. |
41
41
| **left in place** | Nothing moves. The row served for the name carries no form (a list stored over it, alone or with older form rows behind it), or an internal record form is served ahead of a row with a public link and is not removed because of it. Every row of the name stays as stored, and the address keeps answering as it does today. Where another package serves that row with a public link and would move it, the row holds the upgrade at every one of those packages instead: both rows stay. Both rows stay as stored at every other package too: where either stands behind a row another package would move or remove, that move or removal holds the upgrade instead of folding or removing it. When the row served is one whose form content cannot be read, the form waits on that row, which holds the upgrade (below). A form no door serves today is left in place by the upgrade too, whatever package its row is bound to: the server serves no form of that name at the address the report names, so nothing of it moves, its rows stay as stored there, and the address keeps answering as it does today. A form that is switched off is not one of these: the server serves it closed, and it moves with its switch. |
42
42
|**holds the upgrade**| The row cannot be moved. The report repeats the reason and the action. |
it('its old-shape row moves into the pair\'s own `form` row, and the pair door is not asked for a pair of the pair (ablate: read the pair from the address kind)',()=>{
describe('where the pair\'s code ships the name itself (an old-shape form among its items), its own row takes the same destination (ablate: the pair read from the address kind where the pair ships the name)',()=>{
351
+
// The ensure door refuses a pair of a pair, as `storedFormPairFix` does.
352
+
constrefuses=(): ReturnType<StoredFormPlanInput['pairFix']>=>({ok: false,cause: 'app_author',refusal: 'a pair has no pair of its own'});
describe('a form no door serves today is left in place by the upgrade, whatever package its row is bound to (ablate: the census read of the form served today, at the address each plan is made at)',()=>{
Copy file name to clipboardExpand all lines: packages/rest/src/public-form-two-type-withdrawal.test.ts
+68Lines changed: 68 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1419,6 +1419,74 @@ describe('[ADR-0159 D7] the stored-form ceremony\'s --apply through both doors',
1419
1419
});
1420
1420
}
1421
1421
1422
+
it('③ a pair held as booted code: its own old-shape row moves into the pair\'s own `form` row, the pair door is not asked, and both doors answer the same before and after (ablate: read the pair from the address kind)',async()=>{
it('③ a pair held as booted code that ships the name itself: its own old-shape row over the pair\'s own form moves into the pair\'s own `form` row, the pair door is not asked, and both doors answer the same before and after (ablate: the pair read from the address kind where the pair ships the name)',async()=>{
it('step 7 of ruling record 7265816895, one slot, one row, on a store that enforces it: the store refuses a second active row in a pair\'s slot; with the pair\'s own `form` row beside a row planned into that pair, the census holds both, --apply writes nothing, and the slot keeps its one row byte-equal (ablate: the hold of a pair slot two plans claim)',async()=>{
0 commit comments