Repository navigation
feat(cli): os migrate stored-forms — the read-only census and upgrade precheck of stored forms - #38464
feat(cli): os migrate stored-forms — the read-only census and upgrade precheck of stored forms#38464objectstack-fleet[bot] wants to merge 10 commits into
Conversation
… of the stored-form ceremony ADR-0159 D7, card 5a PR 1: listStoredForms() classifies every active stored row that holds a form in an old shape, per form name and package address (keep, move, fold, remove an internal record form, hold, left in place), and answers whether the upgrade to the next major may switch. The command prints it and writes nothing. orderedFormRowsAt is the served-row order the form read already used; the start-up message for an unreadable body names the command. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzWj7MTrb8KnuXA6YP
…l form ahead of a linked row ADR-0159 D7-d gains the ruled "not counted" kind: an internal record form served ahead of a same-named row that declares a public link (switched on or off) moves and deletes nothing, both rows are reported as left in place, and the upgrade is not held. The planner's one deciding constant cites the ruling, and the twin fixture (the link switched off) is pinned. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzWj7MTrb8KnuXA6YP
The facade-delegation gate caps protocol.ts, so the census entry point is listStoredFormsOf(protocol) in its own module and the command calls it. The integration test pays its dist-resolved loads at module top, and the handwritten-docs roster lists the new operations page. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzWj7MTrb8KnuXA6YP
📓 Docs Drift CheckThis PR changes 2 package(s): 44 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 17 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 47 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 78b8556ab57b04e26cac1a66a9b6b28f33b0cd05 && git checkout 78b8556ab57b04e26cac1a66a9b6b28f33b0cd05
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 63acc6cde5fec499ea2077896b62fa9b3fdd2cdc 4c8f7dbbbf4614af945cc88eb0786311910f3298 && git checkout -B drift-repro 63acc6cde5fec499ea2077896b62fa9b3fdd2cdc && git merge --no-ff 4c8f7dbbbf4614af945cc88eb0786311910f3298
node scripts/docs-audit/affected-docs.mjs --json 63acc6cde5fec499ea2077896b62fa9b3fdd2cdc
|
ADR-0159 D7-d and the precheck sentence now say the maintainer ruled the package-less row behind, and the wider predicate is this record's reading. The operations page no longer sends the per-package pair to a command that cannot clear it, and drops a kernel claim the hold does not rest on. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzWj7MTrb8KnuXA6YP
The command boots through bootSchemaStack, so the family table names it: report-only, its one mode leaves the database byte-identical and creates no missing SQLite file. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzWj7MTrb8KnuXA6YP
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 Contract reviewServed-tier: PR #38464, Check-runs on the head: 61 runs, 44 success, 17 skipped, none failed, none pending. Of the required contexts, ① Derived judgments
② Semver levelThe changeset is ③ Boundary flags
④ Design judgmentThe ADR (
The two pin files. They hold what they assert. No fixture reaches M1, M2 or S1. The Nits.
Implemented-by: VERDICT: FAIL |
|
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU |
…rulings A package-less row read at several addresses is removed only where it is internal at every one, and moves at each otherwise; a plan names the rows another address reads with that address's outcome. A pair's stored view override keeps its pair and basedOn without asking the ensure door. List rows behind the served row are left as stored and not folded. A list alone over a base that ships the form is reported left in place. The carried withdrawal names the kept body's slug. The maintainer's rulings: a form row bound to a read-only package that ships no form of the name moves into that package's pair as its own form item, and the name has no environment address while such a row stands; old-shape drafts are listed, neither moved nor deleted, with a warning that they cannot be published after the upgrade; the earlier per-package pair hold says no command on this release clears it. ADR-0159 records them and syncs its summaries. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzWj7MTrb8KnuXA6YP
|
repo:objectstack#5 · os-project-manager · session_01FEkQ5nKeNC91jfN3AY3HKz
|
|
repo:objectstack#5 · os-project-manager · session_01FEkQ5nKeNC91jfN3AY3HKz Contract-review-claim: session_01FEkQ5nKeNC91jfN3AY3HKz · head abacf14 · 2026-11-29T06:34Z The L2 delta against Contract review FAIL 7250799697 runs from this card thread as an isolated |
|
repo:objectstack#5 · os-project-manager · session_01FEkQ5kjJ6Qm1z2mRox4ZbB 席位核对 — ACCEPT · L1-b · area o5-ux · Head-sha
|
|
repo:objectstack#5 · os-project-manager · session_01FEkQ5nKeNC91jfN3AY3HKz Contract reviewServed-tier: PR #38464, Check-runs on the head: 61 runs, 44 success, 17 skipped, none failed, none pending. ① Derived judgments
② Semver levelThe changeset is ③ Boundary flags
④ Design judgmentThe delta on FAIL 7250799697.
The ADR (
The two pin files. They hold what they assert. No fixture reaches M3 or S6. The Nits.
Implemented-by: VERDICT: FAIL |
…beside a bound row Where no package ships a form of a name, a row bound to a read-only base and a pair's declared override of that base were planned at two addresses, and both could move to the pair's own form: the bound row's body, which the read serves nowhere today, became a served form. The read serves the override at the base's address whenever a stored row seats it, so the planner now reads the served pair's overrides there: the override is the served row, the bound row folds behind it, and one move goes to the pair the override stands in. Another pair's override of the same base stays at its own pair's address, where the read serves it. A row behind a removed form that is the served row at another address is no longer listed or counted under the removal: the plan names it apart (servedElsewhere) and the report says it is not removed with the form in front of it. The report's closing line sends the operator to the action printed for each hold, since not every cause can be removed on this release. StoredFormDraft is exported with the other census shapes. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5nKeNC91jfN3AY3HKz
…our summaries ADR-0159 D7's destination bullet now says what D7-d decides where a row bound to a base that ships no form of the name stands beside a pair's declared override of it: the override's body is the one kept, in the pair it stands in, and the bound row folds into it. The clause is marked as D7-d's, not the ruling's, and the second-pair half as this record's reading. The pair-form pin is a pin of its own and no longer a seventh fold fixture. The two paragraphs beside question 4 and the Consequences bullet credit the ruling of 2026-11-29 with the package-less row only, and no longer call the kind a third. A stray clause in D7-c and a trailing semicolon are fixed. The operations page says the start-up log line is the next major's, and that a row behind a removed form which another package serves is not removed. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5nKeNC91jfN3AY3HKz
…ipped base The module header said a pair's override is read at its base beside a bound row. Where two pairs of one base each hold an override, only the pair the read serves at the base is read there; the other keeps its own address. The header now says so, as the function's own docblock and the planner do. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5nKeNC91jfN3AY3HKz
|
repo:objectstack#5 · os-project-manager · session_01FEkQ5nKeNC91jfN3AY3HKz
Contract-review-claim: session_01FEkQ5nKeNC91jfN3AY3HKz · head 4c8f7db · 2026-11-29T09:00Z |
|
repo:objectstack#5 · os-project-manager · session_01FEkQ5kjJ6Qm1z2mRox4ZbB 席位核对 — ACCEPT · L1-b · area o5-ux · Head-sha
|
|
repo:objectstack#5 · os-project-manager · session_01FEkQ5nKeNC91jfN3AY3HKz Contract reviewServed-tier: PR #38464, Check-runs on the head: 61 runs, 44 success, 17 skipped, none failed, none pending. ① Derived judgments
② Semver levelThe changeset is ③ Boundary flags
④ Design judgmentThe delta on FAIL 7252114084.
One item outside this record.
The declared deviation: an override in each of two pairs of one base.
The ADR (
The two pin files. They hold what they assert. The M3 tests seed the override switching the form off, carrying no link, and already a Nits.
Implemented-by: VERDICT: FAIL |
… precheck of stored forms (objectstack-ai#38613) <!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} --> _Requested by **Jianguo** · [project thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9Ubb167ZCpMdeb4qXoLc6eb4Tz)_ _Rework round M6 and ruling 7265816895 step 3 requested by **Warren** · [project thread](https://claude.ai/code/project/chan_01U5RdnAAmkSQmZbqh6FtqZ8?thread=cmsg_01U5RdnAAmkSQmZbqh6FtqZ8UTneJdpiRssyj6z8JRdywN)_ Part of objectstack-ai#37111 — PR 1 of 2 (the read-only half). PR 2 (`--apply`: the move, the fold and the removal, inside the upgrade command, with the security pins on both doors) closes the card. Supersedes objectstack-ai#38464 (its branch `claude/project-thread-zmwgyw` at `4c8f7dbb` is this branch's start; the dev who held it ran out of tokens, and this card thread took the work over under takeover Claim 7255642518). Clause-②: yes Metadata-protocol: none Skills-docs: none — stored-row ceremony, nothing an author writes changes ## 维护者速读 - 用户能看到什么变化:管理员升级到下一个大版本之前,可以先跑一次只读检查,逐条看到数据库里还按旧写法存着的表单升级时会被保留、迁移、合并、删除还是原样不动,以及升级能不能放行;服务启动时遇到读不懂的旧表单,日志会指向这条检查。 - 为什么做:这是「表单成为独立元数据类型」专题(ADR-0159)第五张卡的前半,升级命令要先能说清每一行旧表单的去向,后半才动数据。 - 出错会怎样:这一半只读不写,判错只会让报告写错某一行的去向或误报拦住升级,不会改动任何数据;去掉这条命令也不影响现有功能。 - 要你做什么:无(合并前由席位安排契约审核,再按 Tier H 交你批;你已拍板的「两个地址生效的行拦住升级」在本 PR 的检查里兑现)。 ## What changes **The delta at this head** (`24ab30abef`; the round on delta review PASS 7271195568 is the ADR `24ab30abef`; the round on delta review PASS 7270096541 is `91ab3f3565`, the ADR `de6086d289` and `944aa67cb8`; the round on delta review PASS 7269115759 is `7e825b6de1`, the ADR `53ddab680e` and `dd1ab297bc`; the patch round on delta review FAIL 7268307582 is `4d69b3fccb`, `2484041cc0` with the ADR `76581c1e88`, `622c806f7d`; before it, code round `e6c48803c3`, then the hold's second reading `a909cc2b4e` and `34aaf95bd4`, the split removal `5d073e6171`, the per-row hold over every address `379a62b7b4` and its action wording `7294c1d592`, and the ADR `79126e6573`, `dcb87dc337`, `d58359ae3c`, `e956a57d36`, `2871ae2d07`) answers Contract review FAIL 7265481017 and L1 7265512812 (at `04ffc859`), and carries step 3 of the maintainer's ruling on objectstack-ai#38661: - **M6 (D7-d).** Where the read's own order at the address of a package a row is bound to is headed by a row the plan reads at another address, every row bound to that address now folds behind that row where it is planned, and the address gets no plan of its own (`servedAheadFromElsewhere`, the one place the case is decided). A withdrawal carried from such a row is newly closing unless that package's own per-package layer reads it today, which is measured on the real read for both shapes the pins seed. Pins: three planner tests and four engine tests over the real read, each engine test asserting what the read serves today before the plan; all seven were red at `04ffc859`'s planner and are green now. - **Ruling A on objectstack-ai#38661** (「A 拦住升级·同类全覆盖」, ruling record [7265816895](objectstack-ai#38661 (comment))), step 3: a slot of a pair that more than one plan of a name claims holds the upgrade at every claimant's address (`holdContestedPairSlots`, the one place the case is decided), cause `app_author` (no administrator's exit that leaves every address's answer as it is was measured). The precheck names each claimant's row once, with every address it is read at, and `canSwitch` is false. That covers a row the read serves at two addresses of one App and two rows whose plans land in one pair. No new cause value, plan kind, "not counted" kind or protocol key. The four tests that pinned two moves (planner: "a row two packages serve…", "a row the read serves at its own package as well…"; engine: "served at two modules…", "served at its own package as well…") and the planner test of the sibling case are re-pinned; an ablation of the hold's predicate brings the moves back and turns exactly those five red. - **The hold reads served addresses per row too** (`a909cc2b4e`, `34aaf95bd4`, on the seat's order under the same ruling, "moved at neither"): where one address of the App leaves a row in place (an internal form ahead of a linked row) and another would move it into the App's pair, both plans hold and the precheck names the row once; a base whose pair the ensure door refuses is read as the App's by its App. The contested hold's action names the App (D7-c), and its sentences say only what is planned. Three planner pins and one engine pin, each red before its commit; an ablation of each new reading turns exactly its pins red. - **A removal asks every address that serves the row** (`5d073e6171`, on the seat's order under the same ruling, "changed at neither"): where one address would remove a row (an internal record form) and another address that serves it gives it anything else (an internal form left in place ahead of a linked row), the row is removed at neither, every plan of it holds (`app_author`) and the precheck names it once with every address (`holdSplitRemovals`, run after the contested-slot hold). One planner pin and one engine pin (two holds, `counts.remove` 0), each red at `34aaf95bd4`'s source; disabling the new check turns exactly those two red. - **The hold is decided per stored row over every address that serves it, whatever App** (`379a62b7b4`, on the seat's order under the same ruling): `holdRowsServedApart` replaces the second-address reading of the contested slot and the split-removal check. Where one address would move or remove a row and another keeps it (left in place, already at its destination, or holding; a base whose App cannot be read among them), or one would move it and another remove it, every plan of the row holds and the precheck names it once. Addresses of two Apps count as two packages of one App do. Moves at every address (each into its own pair) and removals at every address are unchanged; the slot rule keeps only a slot claimed more than once. Three planner pins (moved at one App's base and left in place at another's; the same where the other base's App cannot be read; moved at one and held at the other) and a control (moved at both, into two pairs), and one engine pin over the real read; each red at `e956a57d36`'s source. Restricting the hold to addresses of one readable App turns exactly the three cross-App planner pins and the engine pin red; not counting a holding address as keeping the row turns exactly the third planner pin red. - **The round on delta review PASS 7271195568** (ADR prose only, `24ab30abef`, same `os-dev` seat, effort xhigh): **S15**, the row-wide rule holds the row a further address serves, not the row S13's case holds, so one clause states it in Status, "Decided by", the D7-d bullet, the switch bullet (now three exceptions) and the "precheck refuses" pin, each marked the seat's step and an exception to "The upgrade is not blocked"; **N33**, "stay as stored at every address under that name". No code, no pins. N32 (the engine half of the S14 pins) is carried to PR 2. - **The round on delta review PASS 7270096541** (`91ab3f3565`, ADR `de6086d289`, `944aa67cb8`): - **S14 (the seat's step under ruling record 7249158572).** The rows an address keeps as stored under the ruling (the internal form left in place, and every form row behind it there) are kept so at every address: no plan folds one into the row it serves, removes one with that row, moves one, or writes a folded row's withdrawal into one. A plan that would do any of it holds (`app_author`, the refusal cites 7249158572 and names the kept row, the address that keeps it and what the plan would do; the action names no exit), and lists the kept row in `heldApart` (now also on hold plans), not in `behind`; the precheck names that plan's served row once. One rule over the row (`holdChangesToKeptRows`, one predicate `keptRowsChanged`; the kept rows are read by `keptRowsOf` before any hold is given). Planner pins: the reviewer's shape (a package-less internal row ahead of a package-less linked container, kept at one base, behind a row bound to a further base) and the kept rows behind the rows of two further bases; both red at `dd1ab297bc`'s planner, and the predicate made empty turns exactly them red. The address that keeps the rows stays left in place. - **N31.** The waiting refusal no longer says what clearing another hold alone would do (not measured), and a refusal names an address that only keeps a row behind its internal form as keeping it, not as serving it. Assertions on the S13 and N27 pins, red at `dd1ab297bc`. - **`944aa67cb8`, from the ADR seat's reading:** the kept-row hold's action says which addresses the cause spans, instead of "This row is served at" an address that only keeps the other row (assertion on the reviewer's-shape pin, red at `de6086d289`); the report's hold line lists the kept rows apart. - **The page and the changeset** state that neither kept row is folded, moved or removed at any package. - **ADR-0159 D7** (`de6086d289`, same `os-dev` seat, effort xhigh): one sentence under the S13 seat-step mark in "Against D7-d" states the keeping row-wide; "Against D7-c" drops the unmeasured clearing claim. TL;DR 10 stays at six. - **The round on delta review PASS 7269115759** (`7e825b6de1`, ADR `53ddab680e`, `dd1ab297bc`): - **S13 (A, the seat's step under ruling records 7249158572 and 7265816895).** Where an address leaves an internal form in place ahead of a linked row (「两行都不动」), that address keeps the linked row behind it as it keeps the row it serves. Where another address serves that linked row and would move it, every address holds, cause `app_author`, the refusal cites ruling 7249158572 and the action names no exit. Planner pin (a package-less internal row served at the module ahead of the row bound to the App, which the App's own address serves linked) and engine pin over the real read (both addresses answer as before, the census writes nothing), each red at `622c806f7d`'s planner; counting the row kept behind as served elsewhere turns exactly them red. - **A row waits only on a hold taken for itself** (`dd1ab297bc`): where that module's plan also holds for the row it serves (a third address serves that row apart), the row kept behind still holds on its own at the App's address, with its own precheck entry and no exit, instead of waiting on a hold that is another row's. Planner pin, red at `53ddab680e`'s planner; reading any hold of the plan as the row's own turns exactly it red. D7 stands as `53ddab680e` states it. - **N27.** A plan waits on another hold only where clearing that hold lets every address treat the row alike; with a third address that would still differ, the waiting text does not say the row then moves, and the action names no exit. Planner pin (a third address whose pair door refuses). - **N28.** The measured two-address exit is named only where no address outside the slot serves the row. Planner pin (a package-less row at two modules and a standalone base). - **N29.** The report's line for `heldApart` says it stands only while that hold does. PR 2's plan notes that its "writes nothing" pin seeds the third-address shape. - **N30.** The M7 engine pin's first half asserts the effective form list its title names. - **ADR-0159 D7** (`53ddab680e`, same `os-dev` seat, effort xhigh): Status, "Decided by", D7 and D7-d mark S13 as the seat's step and as an exception to "The upgrade is not blocked"; the switch bullet and "Against D7-c" carry N27 and N28. TL;DR 10 stays at six. - **The patch round on delta review 7268307582** (`4d69b3fccb`, `2484041cc0`; ADR `76581c1e88`, `622c806f7d`): - **M7.** The slot of a pair is read from the pair's own row too: a row the pair holds of the name as its own item (no `overrides`), read at the pair's own address (`package_form` into the pair, kept or moved), claims the slot beside a row another address plans into that pair, and both hold. Planner pin (old-shape `view` row and stored `form` row) and control; engine pin over the real read, asserting first that the module serves the bound row and the pair's per-package layer reads its own row. Both red at `2871ae2d07`'s planner; removing the pair's own reading turns exactly them red, and disabling the slot predicate turns them red with the other slot pins. - **S10.** A plan held only because another plan of its row holds waits on that hold: it takes that hold's cause and action, and its refusal names the address and repeats that hold's refusal. A package this environment writes is named as such; a pair's own address counts as its App. Pins: the administrator and the unreadable-App door holds (the waiting plan takes each cause), and a row removed at a writable package and left in place at an App's base (the action says where it is served). Red at `2871ae2d07`; ablating the waiting turns exactly its pin red. - **S11.** The slot's action, and a row served apart with no measured exit, promise none: no action on this release clears it, and every address answers as it does today. Only one row read at two addresses of one App, with no other row at its slot, keeps the measured exit, worded "until the App ships the form from one of these packages only" (N24). Pins on the two-row slot and on a two-address row whose slot the pair's own row claims too. - **S12.** A held row is folded into no other row: where it stands behind a row another address keeps or moves, that plan lists it in `heldApart` (not `behind`) and reads the fold without it; the report prints it apart. Planner pin (its withdrawal not carried); red at `2871ae2d07`, and ablating the pass turns exactly it red. - **Named once.** A row one of whose plans already holds at the pair door is not named a second time by the slot. - **N21–N25.** ADR switch bullet's exception clause; the page and changeset bound the two-package hold to both moving, name the pair's own claimant and the fold; the hold jsdoc, the command docblock and the report's hold line (no "cannot move"); a kept claimant "already stands in" its pair; a clearing-table row for these holds ("No one, on this release"). N26 (an engine half for the third M6 pin) is carried to PR 2's engine block, as the record allows. - **ADR-0159 D7** states each of these (the pair's own claimant, the waiting hold as the seat's step, the no-exit actions and the one measured exit, the held row folded into none); TL;DR 10 stays at six. - **The action names each App** (`7294c1d592`): where the addresses that serve a held row are of more than one App, or one is a base whose App cannot be read, the action says the row is served at packages of more than one App and names each App that can be read, instead of reading as if one App could clear it. Two planner assertions and one engine assertion, red at `379a62b7b4`'s source; the planner pin for a base whose App cannot be read now builds that base with two Apps and no namespace. - **ADR-0159 D7 at `2871ae2d07`** (same `os-dev` seat, effort xhigh): D7 states the hold per stored row over every address that serves it, whatever App, a base whose App cannot be read among them; the slot more than one plan claims stays its own case; D7-c and "Against D7-c" state the action for more than one App. Still marked as the owning seat's step; TL;DR 10 stays at six. - **ADR-0159** (step 2 of the ruling, by an `os-dev` at `CONTRACT_REVIEW_TIER`, effort xhigh, its own order): D7 records the ruling and its reach against D7-b, D7-c, D7-d and D7-e, the `pair_form` pin says what holds instead of a move, "Decided by" gains the item, Status dates the revision of 2026-11-30, and three more D7 sentences that the ruling made false are corrected (the switch bullet, the precheck-refuses pin, the per-row deletion sentence). At `e956a57d36` D7 states the third held case (a row one address would remove and another that serves it would not) where it states the removal, under "What is held", against D7-b, D7-c and D7-d, in the switch bullet and in both pins. The hold's cause class and the split-removal hold are entered as the owning seat's steps; TL;DR 10 stays at six points. - **Step 8's premise, verified before the edit:** once one package of the App ships the form, the row is read at that address alone and moves there (the planner control and the engine test "bound to the App: the read serves it at the module…", one `move` each). The hold's action sentence says that for a row read at two addresses, and nothing it did not measure. - **N19.** The operations page bounds the move of a row served at another package's address to one address, and says a row read at two packages of one App, or a slot two moves would land in, holds the upgrade. The clearing-table row is step 6, PR 2's. - **The M2 planner fixture** gives each of its two bases (two Apps) a pair of its own: its subject is the per-row deletion, and with one shared pair the new hold applied. - **The changeset** names the contested slot among the holds. - **Main** merged at `f5da514b` (clean). **The rounds before it**, in brief: at `04ffc859` (records 7258026145 and 7258039491) M5 (a container's member is read at the package the container is bound to), S9 and N18; at `793f6688` M4 (ruling record [7254350842](objectstack-ai#37111 (comment)): a row the read serves at another address is classed by the base it stands over there), S8 and N17; at `4c8f7dbb` (PR objectstack-ai#38464) M3, S6, S7, N15 and the ADR fixes the earlier records asked for. Each is in the records on the card. **The PR as a whole:** - **`packages/metadata-protocol/src/protocol-stored-form-migration.ts` (new).** The read-only half of the ADR-0159 D7 ceremony. `planStoredForms(input)` is a pure planner: for each form name at each package address that can serve it (each read-only package shipping it in either type, each writable package shipping it or holding its own row, else the environment), it takes the stored rows in the served-row order and answers one outcome: `keep` (already a stored `form` row at the destination), `move` (to the pair's declared override at a read-only base, a pair's own `view` override keeping its pair and `basedOn` without asking the ensure door, the pair's own `form` item for a row bound to a package that ships no form of the name (`pair_form`, ruling 7250977204), the package's own `form` row at a writable package, a package-less `form` row in the environment), `remove` (an internal record form, all three parts of D7, decided per row: a package-less row read at several addresses is removed only where it is internal at every one), `hold` (the pair cannot be ensured, D7-c, classed `administrator` / `app_author` / `kernel`, the ensure door's refusal repeated with the action for its cause; the earlier per-package pair's action says no command on this release clears it, ruling 7250982640; and a slot of a pair more than one plan claims, `app_author`, ruling record 7265816895 on objectstack-ai#38661) or `left_in_place` (`served_no_form`, D7-d, a lone list over a base that ships the form included; `internal_ahead_of_linked_row`, ruled below). The form rows behind the served one fold into it, a list row behind is left as stored (`untouched`), and each plan names the rows another address reads too, with that address's outcome (`alsoReadAt`); a carried withdrawal no layer reads today is flagged `newlyClosed`, with the kept body's own slug. The name has the environment's address only while no stored row of it is bound to a package. Old-shape drafts are listed, and a move names the drafts it leaves behind (`draftsLeftBehind`, ruling 7250982640). Every unreadable stored body holds the upgrade (D7-c, rule 7). `listStoredForms(host)` reads the stored rows, the registry (shipped forms through the projection, `type: 'form'` action targets, `fieldGroups`) and the ensure door's judgement, and hands them to the planner; `listStoredFormsOf(protocol)` is that census over a protocol instance. The precheck is part of the census (`precheck.canSwitch`, `precheck.holds`, `precheck.counts`), so objectstack-ai#37112 reads the same words. - **The ruled case lives in one constant**, `INTERNAL_AHEAD_OF_LINKED_ROW`: an internal record form served ahead of a same-named row that declares a link (switch on or off) moves nothing and deletes nothing, and both rows are reported left in place. Maintainer ruling 「两行都不动,写进报告」, ruling record [7249158572](objectstack-ai#37111 (comment)), for the package-less row behind; any other linked row behind is ADR-0159's own reading, marked as such. ADR-0159 D7-d and the precheck's "Not counted" sentence carry it. - **ADR-0159.** Records the four ruling records on objectstack-ai#37111 (7249158572, 7250977204, 7250982640 with its two answers, 7254350842) under "Decided by" and in D7 where each applies (the `pair_form` destination, drafts, the earlier per-package pair's text), syncs Status, TL;DR 10 (six points past the rulings' words), the question 4 paragraphs and Consequences with the new uncounted kind, states the per-row deletion, and adds two pins to the ones card ⑤ owes (the internal form ahead of a linked row; the row bound to a package that ships no form of its name, byte-equal before and after). - **`protocol-form-reads.ts`.** `orderedFormRowsAt(places, name, packageId | null, installed, admits?)` is the served-row order over both types, every row in order; `servedFormHolding` is now its first row, so the `form` read and the census read one order (the read serves what it served: 227/227 `public-form*` tests). `StoredFormPlace` and `storedFormPlaces` are exported for the census. The start-up message for an unreadable body now names `os migrate stored-forms` (item 3). - **`os migrate stored-forms` (new, `packages/cli`).** Read-only, no `--apply`: boots as `os serve` composes (`deferSchemaDdl` + `readOnlyProbe`), prints one line per form and address, the unreadable bodies, the old-shape drafts (which cannot be published after the upgrade) and the shared slugs, then the counts and the switch verdict; `--json` emits the census. Exit 0 whenever the census ran. - **Docs:** a new operations page `content/docs/deployment/stored-forms-upgrade.mdx` (in `meta.json`, and in `scripts/docs-audit/handwritten-docs.json` as `check:docs-audit-scope` asks), the `cli.mdx` command row and occupancy row, and a platform-checklist item `cli.stored-forms-census-and-precheck`. **Read first** (by risk): 1. `packages/metadata-protocol/src/protocol-stored-form-migration.ts`: `servedAheadFromElsewhere` and the fold step in `planStoredForms` after the rows of each address are read, then `holdContestedPairSlots` (a slot claimed more than once) and `holdRowsServedApart` (a row served at several addresses that would not all do the same) and where they run (before `alsoReadAt` is filled), then `foldOf`'s `folded` reading. 2. The two test files' new blocks: the planner's "a member of a stored container behind a row the read serves at another address" and the engine's four tests of the same rule, each asserting the read today first. 3. `docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md`: Status, "Decided by", D7's destination bullet and its five sub-bullets, and the `pair_form` pin. **Two-minute check:** `pnpm --filter @objectstack/metadata-protocol exec vitest run src/protocol-stored-form-migration.test.ts` prints `Tests 82 passed (82)`. ## Tests - `packages/metadata-protocol/src/protocol-stored-form-migration.test.ts` (82; 80 at `dd1ab297bc`, 79 at `7e825b6de1`, 76 at `622c806f7d`, 71 at `2871ae2d07`, 67 at `e956a57d36`, 66 at `34aaf95bd4`, 63 at `e6c48803c3`, 59 at `04ffc859`, 58 at `793f6688`, 45 at `4c8f7dbb`, 37 before that). **This round:** three tests for M6 (the row folds behind the row served ahead of it, in both shapes; its withdrawal newly closing only where its own package's layer does not read it; beside a package-less row), three re-pinned to the hold of ruling record 7265816895 and one control (one serving package moves; two pairs move); then three for a row held at two addresses where one leaves it in place (with a control for a package-less row, and a base whose pair door refuses); then one for a row removed at one address and left in place at another (both hold); then four for a row served at addresses of two Apps (three holds, one control). Before: every outcome and every hold cause on its own seed fixture, the ruled case and its twin (the link switched off), the fold's `newlyClosed` both ways and its slug, the served body kept, the package-less row read at every address, the shared slug; for the first L2 round: M1, M2, S1, S2, S3, the `pair_form` destination (moved, held when the pair cannot be ensured, the pair's override needing no ensure, a package-less row folding behind it, an internal one removed), the drafts left behind, and the earlier pair's action. **At `4c8f7dbb`:** M3 with the override switching the form off, carrying no link, and already a stored `form` row (one plan at the base's address, `pair_form` into the override's pair, the open bound row behind, nothing carried, a refusing ensure door holding nothing); M3 with a withdrawal in the bound row (carried, not newly closed: the base's own layer reads it today); M3 with a `view` and a `form` override in one pair (read together, one `keep`); M3 with the override in an earlier per-package pair (one plan, into that pair, not a second form of the App's pair); M3 with an override in each pair (two plans, each body in its own pair); S6 (the row behind is `servedElsewhere`, `behind` is empty, the other address moves it) and its control (with no other address the row goes with the removal). **This round:** thirteen tests named for ruling 7254350842, stating the rule only: the planner follows D7 as amended, with the hold where the pair cannot be ensured, the internal test at that base, and controls where the row stays at its own address. - `packages/objectql/src/protocol-stored-form-migration.test.ts` (22; 21 at `622c806f7d`, 20 at `2871ae2d07`, 19 at `e956a57d36`, 18 at `34aaf95bd4`, 17 at `e6c48803c3`, 13 at `04ffc859`, 12 at `793f6688`, 5 at `4c8f7dbb`). **This round:** four tests for M6 over the real read, two re-pinned to the hold, one for a row left in place at one module and moved at the other, one for a row removed at one module and left in place at the other, and one for a package-less row moved at one App's base and left in place at another App's module (each asserting what the read serves today, that the census writes nothing, and that both addresses answer as before). Before: the census over the real protocol and engine: a move to the pair with `basedOn` and no write (no row, no pair), an unreadable body holding, a no-namespace App holding as the App author's cause with the door's refusal, an internal record form listed for removal. **At `4c8f7dbb`:** M3 over the real read: the effective `form` list serves the override's body under the base and under the pair and the bound row's nowhere, and the census plans one move with the bound row behind it, writing nothing. **This round:** seven tests named for ruling 7254350842. Each asserts what the real read serves today before it asserts the plan, and that the census writes nothing. - `packages/cli/src/commands/migrate/stored-forms.integration.test.ts` (3, integration tier; its dist-resolved loads are paid at module top): the empty census, the move listed with the store unchanged byte for byte, the unreadable hold. - `packages/cli/src/utils/schema-migrate.one-shot-family.integration.test.ts`: the `bootSchemaStack` family table declares the command, report-only (its one mode leaves the database byte-identical and creates no missing SQLite file). - `packages/rest/src/public-form-two-type-withdrawal.test.ts` pin 6: the start-up line names the command. - `packages/cli/test/json-stdout-purity.e2e.test.ts`: the command joins the roster (its `--json` stdout is one document). - The two report sentences the `4c8f7dbb` round changed are not text-pinned (prose a consumer does not parse). Printed from the real `storedFormPlanText` for the S6 plan: "will be removed: view "crm_lead.form", package 'com.acme.crm' is an internal record form (no public link, no action opens it); not removed with it, because another address serves it: view "crm_lead.form", no package. New and Edit of 'crm_lead' follow its field groups, which it declares; view "crm_lead.form", no package is also read at read-only package 'com.acme.other', where it is served and moves". ## Acceptance notes - **Line count.** 17 files, +4236 / -32 against `origin/main` (merge base `f5da514b`): over the 3,000-line threshold, which the Claim's Tier H note already counts for the card. - **Surface.** Inside the claim's surface (the 17 files; this round touches 6 of them and adds none), with four declared differences: (1) `protocol.ts` is unchanged: a facade method there breached `check:facade-delegation-only`'s line ceiling (11723 over 11705; raising it is maintainer-only), so the census is `listStoredFormsOf(protocol)` beside the facade and the CLI calls it; (2) the engine-level census test sits in `packages/objectql/src/`, where the precedent ceremony's protocol test sits; (3) `scripts/docs-audit/handwritten-docs.json` gains the new page, regenerated by `check-audit-scope.mjs --write`; (4) ADR-0159 D7-d carries the Q1 reading, as the seat asked on the ruling. - **Drafts**, ruled (7250982640, 「A 留下并提醒(推荐)」): old-shape draft `view` rows are listed, neither moved nor deleted, with the warning that they cannot be published after the upgrade; a move names the draft it leaves behind; `form` drafts are not listed. - **The earlier per-package pair**, ruled (7250982640, 「B 只改文字,不开卡」): the class stays `administrator`; the per-row action, D7-c, the page and now the closing line all say no command on this release clears it. - **The package-less row at several addresses.** The census names it at each address with the others' outcomes (`alsoReadAt`); it is removed only where it is internal at every address, so it is either removed at each or moved at each; behind a removed form it is named apart when another address serves it (`servedElsewhere`). PR 2 owes the order of the moves (a copy per pair, the row deleted once every copy reads back). - **Owed by PR 2, not changed here** (each named by the review record 7252114084 or the L1-b record 7252045790): - the byte-equal address pin for the `pair_form` move (ruling 7250977204). It should state that the destination drops the `overrides` declaration, so that if the base ships that name again later the pair's own form no longer replaces the base's; and it should seed N11's case; - N4: `newlyClosed` for a `view` row outranked by a `form` row at the same place, reachable only by an out-of-band pair of rows; - N5: the planner's own sentence when `pairOf` fails, not the door's text; - N11: D7's "is served today at the package it is bound to" is not always so. Where exactly one other package ships a view of the name, the env-wide list drops the row and no door serves it today; - N13 / L1-b item 1: pin `storedFormPairFix`'s earlier-pair 409 and other-owner 422 through the real ensure door, or read the owner structurally with a positive control; and pin the draft read over the real protocol; - N14: `pairFormDestination` holds when the base records no version, for a `basedOn` the `pair_form` item never declares. - **One more for PR 2, from the `4c8f7dbb` round's reading** (not in either record): the M3 arrangement through both doors, before `--apply` and after it; the ADR's `pair_form` pin now names it. - **Owed by PR 2, added this round:** - N16 (record 7253682863), with N4: at a base that ships the form, a second pair's override that withdraws the form folds behind the first with `newlyClosed: true`, though that pair's own per-package layer reads it today; - the record's ③ note: `pairFormDestination` reads a pair's destination from the address kind, so a pair held as booted code would be sent to the ensure door; - the L1 nit (7253529114): the page's `moves` row says "Older rows of the same form fold into it", and the row that folds is the one the order serves second; - the both-doors before/after pin for a row the read serves at another address, with the ablation the ADR's pin names; - steps 5 to 7 of ruling record 7265816895: a held row writes nothing (with such a row stored, `--apply` writes nothing, every stored row is byte-equal, both doors answer the same at both addresses before the refused run and after it); the operations page's clearing-table row for the contested slot; the dev's note that the engine tests' store does not enforce one row per slot, so the pin of one slot, one row needs a store that does; - N32: the engine half of the two S14 planner pins, over the real read; - N33: with a container one of whose members is kept as stored under ruling 7249158572 and a sibling member of the same container moved, the kept member reads back byte-equal after `--apply`; - N29: the "writes nothing" pin of a held row seeds the third-address shape too (a row kept behind an internal form left in place at one address, served and moved at another, and the internal row served apart at a third); - where the package that ships the name ships only a list there, the read labels the stored form under that package while the census names it at the package it is bound to (same pair, same body). - **Security.** A security item is with the owner seat (GHSA-4m68-3464-prgc). Not in this PR. - **For the seat:** N16 stays carried to PR 2 with N4. N20 is answered by the Status sentence of 2026-11-30. - **Kernel grep** as read at `793f6688`, not re-run this round: `git grep -lE "formViews|viewKind: 'form'|viewKind === 'form'" -- packages/platform-objects packages/plugins packages/services packages/triggers packages/drivers packages/connectors packages/apps` finds `packages/platform-objects/CHANGELOG.md` and `packages/plugins/plugin-auth/CHANGELOG.md`, no source: the kernel hold is empty. ## Verification Head `24ab30abef`: the merge of `main` (`9b318da210`), the fix (`8a38a0ba16`), the changeset sentence (`e6c48803c3`), the ADR (`79126e6573`, `dcb87dc337`, `d58359ae3c`, `e956a57d36`), the hold's second reading (`a909cc2b4e`, `34aaf95bd4`), the split removal (`5d073e6171`) the per-row hold over every address (`379a62b7b4`, `7294c1d592`), the ADR's fourth round (`2871ae2d07`), the patch round on review 7268307582 (`4d69b3fccb`, `76581c1e88`, `2484041cc0`, `622c806f7d`), the round on review 7269115759 (`7e825b6de1`, `53ddab680e`, `dd1ab297bc`), the round on review 7270096541 (`91ab3f3565`, `de6086d289`, `944aa67cb8`), and the ADR round on review 7271195568 (`24ab30abef`). - **CI:** `e6c48803c3` 44 success, 17 skipped, 0 failed. At `dd1ab297bc` and at `944aa67cb8`: 61 check runs each, success or skipped, 0 failed. At this head: running when this body was written; the seat reads the check-runs. - **Build:** `pnpm --filter '@objectstack/metadata-protocol^...' build` after the merge, exit 0; `@objectstack/metadata-protocol` rebuilt on the final source before the engine runs. - **Type-check:** `pnpm --filter @objectstack/metadata-protocol typecheck`, inside the locked run below. - **`24ab30abef`** changes only the ADR (its gates exit 0); the code is `944aa67cb8`'s. **At `944aa67cb8`, under the verify lock:** metadata-protocol test + typecheck and objectql test on the rebuilt package, VERDICT command-exit 0: 374 files passed and 9 skipped, 23744 passed and 45 skipped; objectql 641/641 files, 14566/14566 tests; the planner file 82/82, the engine file 22/22 (the same at `91ab3f3565`). eslint on the three changed code files exit 0; the CLI's `tsc` is not measurable on this box (the workspace packages it imports are not built here; no error is in `stored-forms.ts`), CI's Type Check owns it. **Red before (this round):** at `dd1ab297bc`'s planner 4 of 82 failed (the two S14 pins, the N31 assertions on the S13 and N27 pins); at `de6086d289`'s planner 1 of 82 (the action assertion). **Ablation:** `keptRowsChanged` made to return nothing turns exactly the two S14 pins red. `de6086d289` changes only the ADR (its gates exit 0). - **At `dd1ab297bc`, under the verify lock:** metadata-protocol test + typecheck and objectql test on the rebuilt package, VERDICT command-exit 0: metadata-protocol 374 files passed and 9 skipped, 23742 passed and 45 skipped; objectql 641/641 files, 14566/14566 tests; the planner file 80/80, the engine file 22/22. eslint and the metadata-protocol typecheck on the two changed code files exit 0. **Red before (this round):** at `622c806f7d`'s planner 4 of 80 failed (S13, N27, N28, and the per-row waiting pin) and the S13 engine pin failed; at `53ddab680e`'s planner 1 of 80 (the per-row waiting pin). **Ablations:** counting the row kept behind as served elsewhere turns exactly the S13 pins red; reading any hold of a plan as the row's own turns exactly the per-row waiting pin red; the N27 and N28 conditions each turn exactly their own pin red. `53ddab680e` changes only the ADR. - **At `2484041cc0`, under the verify lock:** metadata-protocol build + test + typecheck and objectql test, VERDICT command-exit 0: metadata-protocol 374 files passed and 9 skipped, 23738 passed and 45 skipped; objectql 641/641 files, 14565/14565 tests; the planner file 76/76, the engine file 21/21. `622c806f7d` changes only the ADR (its gates exit 0). **At `4d69b3fccb`, under the verify lock:** 23736 passed and 45 skipped; objectql 14565/14565. eslint on the four changed code files exit 0; the docs and repo gates above exit 0. **Red before (this round):** at `2871ae2d07`'s planner, the M7, S10 (waiting, writable package), S11 (slot exit) and S12 pins failed (5 of 74), the M7 engine pin failed (1 of 21); at `4d69b3fccb`'s planner the three pins of `2484041cc0` failed (3 of 76). **Ablations:** each new condition disabled alone turns exactly its own pins red (the pair's own claim: its planner and engine pins; the waiting hold; the held-apart pass; the slot's exit bound; the named-once check; the waiting refusal), and the slot predicate turns the slot pins red with M7's. **At `7294c1d592`, under the verify lock:** metadata-protocol build + test + typecheck and objectql test, VERDICT command-exit 0: 23733 passed and 45 skipped; objectql 641/641 files, 14564/14564 tests; the planner file 71/71, the engine file 20/20. `2871ae2d07` changes only the ADR (its gates exit 0). **At `379a62b7b4`'s tree, under the verify lock:** metadata-protocol build + test + typecheck and objectql test, VERDICT command-exit 0: metadata-protocol 374 files passed and 9 skipped, 23733 passed and 45 skipped; objectql 641/641 files, 14564/14564 tests; the planner file 71/71, the engine file 20/20. eslint on the three changed code files exit 0; `check:nul-bytes`, `check:doc-authoring`, `check:doc-anchors`, `check:docs-single-h1`, `check:doc-frontmatter`, `check:closed-ceremony-text`, `check:role-word`, `check:corpus-claim-drift`, `check:issue-citations`, `check:scripts-symbol-anchors`, `check:adr-symbol-anchors`, `check-affected-docs.mjs`, `check-drift-comment.mjs` exit 0. **At `5d073e6171`, under the verify lock:** metadata-protocol test + typecheck, VERDICT command-exit 0 (374 files passed and 9 skipped; 23729 passed, 45 skipped); objectql test, VERDICT command-exit 0 (641/641 files, 14563/14563 tests); the planner file 67/67, the engine file 19/19 on the rebuilt package. `e956a57d36` changes only the ADR. **At `a909cc2b4e`, under the verify lock:** metadata-protocol test + typecheck, VERDICT command-exit 0 (23727 passed, 45 skipped); objectql test, VERDICT command-exit 0 (641/641 files, 14562/14562 tests). **At `34aaf95bd4`:** the planner file 66/66, the engine file 18/18 on the rebuilt package, metadata-protocol typecheck exit 0. **At `e6c48803c3`, under the verify lock:** `pnpm --filter @objectstack/metadata-protocol test && pnpm --filter @objectstack/metadata-protocol typecheck && pnpm --filter @objectstack/objectql test`, VERDICT command-exit 0: metadata-protocol 374 files passed and 9 skipped, 23725 tests passed and 45 skipped; objectql 641/641 files, 14561/14561 tests. The planner file 63/63, the engine file 17/17. - **Red before (M6):** at `04ffc859`'s planner, the three new planner tests failed (3 failed / 59 passed) and the four new engine tests failed (4 failed / 13 passed), each engine test at its plan assertion with the assertions on what the read serves today passing. - **Ablation (the hold):** the hold's predicate disabled in the built package (`claimants.length < 2` made never true): planner 3 failed / 60 passed, engine 2 failed / 15 passed, exactly the five re-pinned tests, each showing a `move` again where the pin asks a hold; restored from the saved source, rebuilt, and green. With the hold disabled the planner answers as `04ffc859`'s did for those rows, so this is also their red-first reading. - **Red before and ablation (the second reading):** at `dcb87dc337`'s source the new planner pin and engine pin failed (1 of 65, 1 of 18); with the served-address reading disabled, the same two failed; at `a909cc2b4e`'s source the pair-door pin failed (1 of 66), and with the App reading disabled it failed again; at `34aaf95bd4`'s source the split-removal pins failed (1 of 67, 1 of 19), and with the new check disabled the same two failed; at `e956a57d36`'s source the cross-App pins failed (3 of 71, 1 of 20), and the two ablations named above turned exactly their pins red; each restored, rebuilt and green. - **Not run locally this round, CI owns:** `rest` `public-form*` (no file of the `form` read changed this round), the CLI integration tier, the dogfood battery (no `!` in the title, no narrowing arm). <details><summary>Derived gates: 119 derived; 15 run locally on the 4 files this round changed, the rest to CI</summary> `node scripts/pm/dispatch-gates.mjs --commands` at `9b318da210` derives 119 commands from the branch's 17 paths against merge base `f5da514b`. Narrowed locally to the families that read this round's four files (the docs page, the planner and the two test files), at the final tree, each exit captured before any pipe, all exit 0: `check:nul-bytes`, `check:doc-authoring`, `check:doc-anchors`, `check:docs-single-h1`, `check:doc-frontmatter`, `docs-audit/check-affected-docs.mjs`, `docs-audit/check-drift-comment.mjs`, `check:issue-citations` (and the script directly), `check:adr-symbol-anchors`, `check:scripts-symbol-anchors`, `check:closed-ceremony-text`, `check:role-word`, `check-closing-keyword-parity.mjs`, `check:corpus-claim-drift`. The other 104 are `Lint & Repo Gates` on this head. </details> 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01JQwxba7sJxPLc8kzW8QTyd <!-- signed: repo:objectstack#2 · os-warren · session_01JQwxba7sJxPLc8kzW8QTyd --> --------- Co-authored-by: Claude <noreply@anthropic.com>
Part of #37111 — PR 1 of 2 (the read-only half). PR 2 (
--apply: the move, the fold and the removal, inside the upgrade command, with the security pins on both doors) closes the card.Clause-②: yes
Metadata-protocol: none
Skills-docs: none — stored-row ceremony, nothing an author writes changes
维护者速读
What changes
The delta at this head answers Contract review FAIL 7252114084 (at
abacf146):pairServedAtUnshippedBase, the one place the case is decided): the override is the served row, the bound row folds behind it, one plan goes topair_formin the pair the override stands in, and the ensure door is not asked. With no row bound to the base, the override keeps its own pair's address, as before.mergePackageAwareOverlayseats a slot for every package a stored row is bound to, andisServedOverrideRowOfnever asks whether the base ships the name, so the read does serve the override at the base's address and the bound row nowhere. Measured on the real protocol and engine before the change: the effectiveviewandformlists carry the override's body under the base and under the pair, the bound row appears only in the per-package layer, and the head planned two moves to onepair_form.removeplan keeps it out ofbehindand names it inservedElsewhere;alsoReadAtstill says where it is served and what happens there. The report'sremovesentence says it is not removed with the form in front of it.StoredFormDraftis exported from the@objectstack/metadata-protocolindex with the other census shapes.pair_formpin is a pin of its own and no longer a seventh fold fixture; it now says what happens when both rows hold one name. N9: the two paragraphs beside question 4 and the Consequences bullet credit the ruling of 2026-11-29 with the package-less row only, and no longer call the kind a third. N10: the stray clause in D7-c and the trailing semicolon in TL;DR 10.The PR as a whole:
packages/metadata-protocol/src/protocol-stored-form-migration.ts(new). The read-only half of the ADR-0159 D7 ceremony.planStoredForms(input)is a pure planner: for each form name at each package address that can serve it (each read-only package shipping it in either type, each writable package shipping it or holding its own row, else the environment), it takes the stored rows in the served-row order and answers one outcome:keep(already a storedformrow at the destination),move(to the pair's declared override at a read-only base, a pair's ownviewoverride keeping its pair andbasedOnwithout asking the ensure door, the pair's ownformitem for a row bound to a package that ships no form of the name (pair_form, ruling 7250977204), the package's ownformrow at a writable package, a package-lessformrow in the environment),remove(an internal record form, all three parts of D7, decided per row: a package-less row read at several addresses is removed only where it is internal at every one),hold(the pair cannot be ensured, D7-c, classedadministrator/app_author/kernel, the ensure door's refusal repeated with the action for its cause; the earlier per-package pair's action says no command on this release clears it, ruling 7250982640) orleft_in_place(served_no_form, D7-d, a lone list over a base that ships the form included;internal_ahead_of_linked_row, ruled below). The form rows behind the served one fold into it, a list row behind is left as stored (untouched), and each plan names the rows another address reads too, with that address's outcome (alsoReadAt); a carried withdrawal no layer reads today is flaggednewlyClosed, with the kept body's own slug. The name has the environment's address only while no stored row of it is bound to a package. Old-shape drafts are listed, and a move names the drafts it leaves behind (draftsLeftBehind, ruling 7250982640). Every unreadable stored body holds the upgrade (D7-c, rule 7).listStoredForms(host)reads the stored rows, the registry (shipped forms through the projection,type: 'form'action targets,fieldGroups) and the ensure door's judgement, and hands them to the planner;listStoredFormsOf(protocol)is that census over a protocol instance. The precheck is part of the census (precheck.canSwitch,precheck.holds,precheck.counts), so Major 19:viewis lists only, the old form shapes are refused with a prescription, and the upgrade command converts stored forms, then switches (ADR-0159, card ⑤b) #37112 reads the same words.INTERNAL_AHEAD_OF_LINKED_ROW: an internal record form served ahead of a same-named row that declares a link (switch on or off) moves nothing and deletes nothing, and both rows are reported left in place. Maintainer ruling 「两行都不动,写进报告」, ruling record 7249158572, for the package-less row behind; any other linked row behind is ADR-0159's own reading, marked as such. ADR-0159 D7-d and the precheck's "Not counted" sentence carry it.pair_formdestination, drafts, the earlier per-package pair's text), syncs Status, TL;DR 10 (six points past the rulings' words), the question 4 paragraphs and Consequences with the new uncounted kind, states the per-row deletion, and adds two pins to the ones card ⑤ owes (the internal form ahead of a linked row; the row bound to a package that ships no form of its name, byte-equal before and after).protocol-form-reads.ts.orderedFormRowsAt(places, name, packageId | null, installed, admits?)is the served-row order over both types, every row in order;servedFormHoldingis now its first row, so theformread and the census read one order (the read serves what it served: 227/227public-form*tests).StoredFormPlaceandstoredFormPlacesare exported for the census. The start-up message for an unreadable body now namesos migrate stored-forms(item 3).os migrate stored-forms(new,packages/cli). Read-only, no--apply: boots asos servecomposes (deferSchemaDdl+readOnlyProbe), prints one line per form and address, the unreadable bodies, the old-shape drafts (which cannot be published after the upgrade) and the shared slugs, then the counts and the switch verdict;--jsonemits the census. Exit 0 whenever the census ran.content/docs/deployment/stored-forms-upgrade.mdx(inmeta.json, and inscripts/docs-audit/handwritten-docs.jsonascheck:docs-audit-scopeasks), thecli.mdxcommand row and occupancy row, and a platform-checklist itemcli.stored-forms-census-and-precheck.Read first (by risk):
packages/metadata-protocol/src/protocol-stored-form-migration.ts:pairServedAtUnshippedBaseand the loop under it inplanStoredFormsthat re-reads the served pair's overrides at the base (which override is read where), then theremovebranch (servedAtAnother,servedElsewhere).docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md: the last two sentences of D7's destination bullet, and the three N9 sentences.packages/cli/src/commands/migrate/stored-forms.ts: theremovesentence and the closing line.Two-minute check:
pnpm --filter @objectstack/metadata-protocol exec vitest run src/protocol-stored-form-migration.test.tsprintsTests 45 passed (45); the seven tests namedM3and the one namedS6are this round's.Tests
packages/metadata-protocol/src/protocol-stored-form-migration.test.ts(45; 37 before this round): every outcome and every hold cause on its own seed fixture, the ruled case and its twin (the link switched off), the fold'snewlyClosedboth ways and its slug, the served body kept, the package-less row read at every address, the shared slug; for the first L2 round: M1, M2, S1, S2, S3, thepair_formdestination (moved, held when the pair cannot be ensured, the pair's override needing no ensure, a package-less row folding behind it, an internal one removed), the drafts left behind, and the earlier pair's action. This round: M3 with the override switching the form off, carrying no link, and already a storedformrow (one plan at the base's address,pair_forminto the override's pair, the open bound row behind, nothing carried, a refusing ensure door holding nothing); M3 with a withdrawal in the bound row (carried, not newly closed: the base's own layer reads it today); M3 with aviewand aformoverride in one pair (read together, onekeep); M3 with the override in an earlier per-package pair (one plan, into that pair, not a second form of the App's pair); M3 with an override in each pair (two plans, each body in its own pair); S6 (the row behind isservedElsewhere,behindis empty, the other address moves it) and its control (with no other address the row goes with the removal).packages/objectql/src/protocol-stored-form-migration.test.ts(5; 4 before): the census over the real protocol and engine: a move to the pair withbasedOnand no write (no row, no pair), an unreadable body holding, a no-namespace App holding as the App author's cause with the door's refusal, an internal record form listed for removal. This round: M3 over the real read: the effectiveformlist serves the override's body under the base and under the pair and the bound row's nowhere, and the census plans one move with the bound row behind it, writing nothing.packages/cli/src/commands/migrate/stored-forms.integration.test.ts(3, integration tier; its dist-resolved loads are paid at module top): the empty census, the move listed with the store unchanged byte for byte, the unreadable hold.packages/cli/src/utils/schema-migrate.one-shot-family.integration.test.ts: thebootSchemaStackfamily table declares the command, report-only (its one mode leaves the database byte-identical and creates no missing SQLite file).packages/rest/src/public-form-two-type-withdrawal.test.tspin 6: the start-up line names the command.packages/cli/test/json-stdout-purity.e2e.test.ts: the command joins the roster (its--jsonstdout is one document).storedFormPlanTextfor the S6 plan: "will be removed: view "crm_lead.form", package 'com.acme.crm' is an internal record form (no public link, no action opens it); not removed with it, because another address serves it: view "crm_lead.form", no package. New and Edit of 'crm_lead' follow its field groups, which it declares; view "crm_lead.form", no package is also read at read-only package 'com.acme.other', where it is served and moves".Acceptance notes
protocol.tsis unchanged: a facade method there breachedcheck:facade-delegation-only's line ceiling (11723 over 11705; raising it is maintainer-only), so the census islistStoredFormsOf(protocol)beside the facade and the CLI calls it; (2) the engine-level census test sits inpackages/objectql/src/, where the precedent ceremony's protocol test sits; (3)scripts/docs-audit/handwritten-docs.jsongains the new page, regenerated bycheck-audit-scope.mjs --write; (4) ADR-0159 D7-d carries the Q1 reading, as the seat asked on the ruling.viewrows are listed, neither moved nor deleted, with the warning that they cannot be published after the upgrade; a move names the draft it leaves behind;formdrafts are not listed.administrator; the per-row action, D7-c, the page and now the closing line all say no command on this release clears it.alsoReadAt); it is removed only where it is internal at every address, so it is either removed at each or moved at each; behind a removed form it is named apart when another address serves it (servedElsewhere). PR 2 owes the order of the moves (a copy per pair, the row deleted once every copy reads back).pair_formmove (ruling 7250977204). It should state that the destination drops theoverridesdeclaration, so that if the base ships that name again later the pair's own form no longer replaces the base's; and it should seed N11's case;newlyClosedfor aviewrow outranked by aformrow at the same place, reachable only by an out-of-band pair of rows;pairOffails, not the door's text;storedFormPairFix's earlier-pair 409 and other-owner 422 through the real ensure door, or read the owner structurally with a positive control; and pin the draft read over the real protocol;pairFormDestinationholds when the base records no version, for abasedOnthepair_formitem never declares.--applyand after it; the ADR'spair_formpin now names it.git grep -lE "formViews|viewKind: 'form'|viewKind === 'form'" -- packages/platform-objects packages/plugins packages/services packages/triggers packages/drivers packages/connectors packages/appsfindspackages/platform-objects/CHANGELOG.mdandpackages/plugins/plugin-auth/CHANGELOG.md, no source: the kernel hold is empty.Verification
Head
4c8f7dbb(three commits onabacf146:23319636, the planner, the report sentences, the index export and the tests;7994f274, the ADR and the page;4c8f7dbb, one sentence of the planner's header). Not merged withorigin/mainthis round: overlap-check againstorigin/mainat63acc6cdand #38399 answersVERDICT clean exit 0, and AGENTS.md §10 mergesmaininto an open PR only on a GitHub-reported conflict, amain-caused red or a queue removal.Lint & Repo Gates,TypeScript Type Check,Test Core(all 12 shards),Build Core,Build Docs,Check Changeset,Governed Surface Queue Guard,Test UI,Live E2E UIandDogfood Regression Gateare success.turbo run buildover./packages/**and the five example apps, 88/88, exit 0, at7994f274;@objectstack/metadata-protocolrebuilt under the verify lock at this head, exit 0.tsc --noEmitwithcheck:test-typecheckinmetadata-protocol,cliandobjectql: exit 0 each.--project integration). At7994f274(this head differs from it by one comment sentence): the whole@objectstack/metadata-protocolsuite, 376 files passed and 9 skipped, 23692 tests passed and 45 skipped.rest'spublic-form*was not re-run:protocol-form-reads.tsis byte-equal toabacf146.scripts/ablation-replace.mjs, at23319636, after the commit; restore proven by blob equal to HEAD and an emptygit diff HEAD):pairServedAtUnshippedBasemade to answer no pair turns the seven M3 tests red (7 failed, 38 passed);servedAtAnothermade false turns the S6 test red (1 failed, 44 passed). The planner test imports the planner fromsrc, so nodistbuild stands between the mutation and the run.INTERNAL_AHEAD_OF_LINKED_ROW.appliesforced tofalseturns the ruled-case test red; the per-row removal reduced to the address's own verdict turns the M2 test red; the environment address added beside a bound row turns the M1 test red. Each restored.getMetaItemsforviewand forformanswers the override's body under the base and under the pair;getMetaItemsPerPackageanswers the bound row under the base. With an override in the App's pair and one in an earlier per-package pair, it answers the App's pair's body under the base and under the App's pair, and the earlier pair's body under the earlier pair.keep,move(pair override, the pair's ownviewoverride,pair_form, the writable package's own row, the environment),remove,hold×administrator(and the earlier per-package pair) /app_author/kernel/unreadable,left_in_place×served_no_form(a lone list included) /internal_ahead_of_linked_row(and its switched-off twin).Derived gates: 117 derived, 117 run, 0 NOT-MEASURED
node scripts/pm/dispatch-gates.mjs --commands(no path list) at4c8f7dbbderives 117 commands from the branch's 17 paths against merge basef459c863(changed lines 2738, +2710 / -28, under the 3000 threshold). All 117 were run at this head, after the last commit, each exit code recorded before any pipe: 117 exit 0, andnode scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --ran FILEanswers "Run reconciliation — 117 derived, 117 run, 0 NOT-MEASURED, 0 UNRUN." The same list was run once before at7994f274: six families answered exit 3 there (PREREQUISITE NOT MET, nothing measured) and exit 0 once the prerequisite was in place.check:dual-build-cjs-loads,check:i18n,check:i18n-coverage,check:i18n-walk-parityand@objectstack/spec'scheck:skill-exampleswanted the whole workspace built (only the CLI's dependency closure was), andcheck-plugin-teardown-shape.mjs --self-testwanted its pinned fixture commit, which the shallow clone did not hold (fetched at depth 1). The derivation prints its STALE TREE notice: the branch's tree is 30 commits behindorigin/main, with 18 gate files changed in that range, so the list is this tree's; CI runs the merged ref.🤖 Generated with Claude Code
https://claude.ai/code/session_01L9qibzWj7MTrb8KnuXA6YP