Skip to content

feat(cli): os migrate stored-forms — the read-only census and upgrade precheck of stored forms - #38613

Merged
os-zhuang merged 43 commits into
mainfrom
claude/project-thread-1v5bvm
Nov 30, 2026
Merged

os-zhuang merged 43 commits into
mainfrom
claude/project-thread-1v5bvm

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Jianguo · project thread
Rework round M6 and ruling 7265816895 step 3 requested by Warren · project thread
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.

Supersedes #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 #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 [Decision] What the upgrade to the next major does with a stored form row that is served today at two package addresses of one App (ADR-0159 D7, card #37111) #38661 (「A 拦住升级·同类全覆盖」, ruling record 7265816895), 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: a row the read serves at another address is classed by the base it stands over there), S8 and N17; at 4c8f7dbb (PR #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 [Decision] What the upgrade to the next major does with a stored form row that is served today at two package addresses of one App (ADR-0159 D7, card #37111) #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 Major 19: view is 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.
  • 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, 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 Upgrade to the major converts stored forms: the stored-row ceremony and the precheck report (ADR-0159, card ⑤a) #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).
Derived gates: 119 derived; 15 run locally on the 4 files this round changed, the rest to CI

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.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JQwxba7sJxPLc8kzW8QTyd

… 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
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
…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
…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
…s amended

ADR-0159 D7 gains the reach of the destination ruling (ruling record
7254350842): a row the read serves at another package's address is
classed by the base it stands over there and takes the destination D7
gives a row bound to that base, with D7-c's hold where its pair cannot be
ensured. The planner asks the served-row order the served reads take, and
places such a row at that address. The second pair's override reading now
follows from D7-d in the text (S8); the pair_form pin names the ablation of
its second half (N17); the operations page says where such a row moves.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jV1UG1Uoq28xMDt6gk
…address that serves it

ADR-0159 D7 as amended (ruling record 7254350842): a row the read serves at
another address than the package it is bound to is classed by the base it
stands over there. The planner asks the served-row order at every package
that ships the form, so a row two of them serve is planned at each; where
the read serves neither of two rows that could follow the name, each keeps
its own address and is still named. A withdrawal carried from such a row is
read today in its own package's layer, so the plan does not name it newly
closed. The rule is decided in one place, servedAtAnotherAddress.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jV1UG1Uoq28xMDt6gk
…ther address

Two more cases over the real protocol and engine: a row two modules serve
is planned at each address, and a withdrawal such a row holds behind the
module's own open override is read today in the per-package layer, so the
census carries it without naming the form newly closed.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jV1UG1Uoq28xMDt6gk
… read serves it, and nowhere else

ADR-0159 D7 as amended (ruling record 7254350842) speaks of a row the read
serves at another address than the package it is bound to. The planner now
asks that as the served `view` list asks it, in the `view` type, so the two
agree by construction:

- a row the read serves at the package it is bound to (the name is shipped
  as a `form` item only, or the row is a stored `form` row) keeps the
  destination ruling record 7250977204 gives it;
- a row the read serves at its own package as well is planned at both.

The planner's input names the packages that ship the name in the `view`
type (`shipsView`), in place of the either-type reading it took before.
Pinned in the planner's tests and over the real protocol.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jV1UG1Uoq28xMDt6gk
…n no longer reach

A row the read serves at another address is a stored `view` row, so it is
never a stored `form` row already at its destination: the destination check
reads as it did before the amendment.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jV1UG1Uoq28xMDt6gk
…e sentence

The sentence uses the ruling record's own words (7254350842): the ruling
holds on its stated premise, and stands for every row that premise holds
for. The second pair's override is stated as following from D7-d, and the
pin names the ablation for a row the read serves at another address.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jV1UG1Uoq28xMDt6gk
@github-actions github-actions Bot added size/xl documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 29, 2026
@github-actions

github-actions Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 2 package(s): @objectstack/cli, @objectstack/metadata-protocol, touching 119 documentable anchor(s). ⚠️ 1 changed file(s) yielded no anchor (packages/metadata-protocol/src/index.ts), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

44 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: node scripts/docs-audit/affected-docs.mjs --json d2caaec40d73a6e8a5bc88554518f5333715ef63.

⛔ 17 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails.

What this run could not see
  • 1 changed file(s) yielded no anchor (packages/metadata-protocol/src/index.ts) — pages documenting those are invisible to this run
  • 43 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 69 of 252 client-bound route-ledger rows — the other 183 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 183: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 124 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 47 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json d2caaec40d73a6e8a5bc88554518f5333715ef63 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from d4a0fe3d53adbc882ee906cec882a4fad4ce8b1b — the merge of head 24ab30abefaa7a0c6b6a59f762257d13cd5087e3 into base d2caaec40d73a6e8a5bc88554518f5333715ef63, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin d4a0fe3d53adbc882ee906cec882a4fad4ce8b1b && git checkout d4a0fe3d53adbc882ee906cec882a4fad4ce8b1b
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin d2caaec40d73a6e8a5bc88554518f5333715ef63 24ab30abefaa7a0c6b6a59f762257d13cd5087e3 && git checkout -B drift-repro d2caaec40d73a6e8a5bc88554518f5333715ef63 && git merge --no-ff 24ab30abefaa7a0c6b6a59f762257d13cd5087e3

node scripts/docs-audit/affected-docs.mjs --json d2caaec40d73a6e8a5bc88554518f5333715ef63

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs d2caaec40d73a6e8a5bc88554518f5333715ef63 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · zhuangjianguo · session_01QsR2jQkLKMF81cpqpt8p1a
Contract-review-claim: session_01QsR2jQkLKMF81cpqpt8p1a · head 793f668 · 2026-11-29T14:56Z

Contract-tier delta review (rules face: ADR-0159 and its implementing files) at this head, against record 7253682863 on the superseded PR #38464, by an isolated sub-agent of seat 1's L1 thread; the record follows on this PR.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · zhuangjianguo · session_01QsR2jQkLKMF81cpqpt8p1a

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 793f66883fbb7bfa61aacd81ba6a1eae21a2b15e
Local-runs: none
Scope: docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md + packages/metadata-protocol/src/protocol-stored-form-migration.ts, packages/metadata-protocol/src/protocol-form-reads.ts, packages/metadata-protocol/src/index.ts, packages/cli/src/commands/migrate/stored-forms.ts, content/docs/deployment/stored-forms-upgrade.mdx, packages/metadata-protocol/src/protocol-stored-form-migration.test.ts, packages/objectql/src/protocol-stored-form-migration.test.ts
Security-touching: yes

PR #38613, Part of #37111, PR 1 of 2 (read-only). It supersedes PR #38464, and this is the delta on Contract review FAIL 7253682863 (at 4c8f7dbbbf4614af945cc88eb0786311910f3298), in the full shape. Read for it: the card body and its 18 comments, the ruling records 7249158572, 7250977204, 7250982640 and 7254350842 in full, the dev report 7257650260, the takeover claim 7255642518, the PR body, its 17 files, the net diff against merge base 30141766957f (+3101 / -29), the delta from the old head over the PR's paths (7 files, +411 / -20, seven first-parent commits), and the check-runs on the head. Code outside the diff was read to judge the diff, not reviewed. The rest of the diff (the CLI tests, the rest pin, the checklist item, cli.mdx, meta.json, the changeset, handwritten-docs.json) is the lane seat's ACCEPT at TIER_DEFAULT.

Check-runs on the head, read at 2026-11-29T15:01Z and last at 2026-11-29T15:18Z: 62 runs, 43 success, 19 skipped, none failed, none without a verdict. Lint & Repo Gates, TypeScript Type Check, Test Core (all 12 shards), Build Core, Build Docs, Check Changeset, Governed Surface Queue Guard, PR-body guards, Test UI, Live E2E UI and Dogfood Regression Gate are success. Lint UI, Type Check UI and Build & E2E UI are skipped.

① Derived judgments

  • The CLI command os migrate stored-forms: its file is the same blob at both heads. Flags, exit rule and the absence of --apply are carried from record 7253682863. Right.
  • Its --json census gains no key, no plan kind and no "not counted" kind, as ruling record 7254350842 requires. The planner's new elsewhere binding and the moved mark on an ordered row are internal: rowRef emits neither. What changes is the address and the destination some rows are reported under, each an existing kind (base, pair_override, hold, remove). Nothing released reads the census yet. Right.
  • @objectstack/metadata-protocol's index: the PR's own delta adds no export. The one line that differs from the old head is the merge's carry-over (git diff 84de8589a6 pr-38613 on index.ts is empty). StoredFormPlanInput (which gains shipsView), orderedFormRowsAt (which gains the optional ships) and OrderedFormRow (which gains moved) stay off the index. Right.
  • The accept set of the form read does not change. servedFormHolding still calls orderedFormRowsAt with no ships, and servedOverlayRowCandidates yields its two extra candidates only when ships is named, so the read takes the old head's order. protocol-overlay-merge.ts, suite-moved-overlay.ts, served-override.ts and protocol-meta-list-reads.ts are the same blobs at both heads. Right.
  • Nothing an author writes changes. No error code is added. Metadata-protocol: none is right.
  • The ADR's Status line and "Decided by" name a fifth ruling, D7's destination bullet gains its reach in one sentence and states the second pair's override as following from D7-d, and the pair_form pin names an ablation for each half and a pin PR 2 owes. The operations page gains one sentence. Each is judged under ④.
  • Security: the ADR hunks, the page sentence and the planner's report teach where a stored row with or without a public link may move and which rows are never listed for removal. That is sharing behaviour the path name does not show. The line above reads yes. The PR already carries the security label.

② Semver level

The changeset is the same blob at both heads: patch on @objectstack/metadata-protocol and @objectstack/cli. The delta publishes nothing new, so the level is carried from record 7253682863 and still matches: a non-protocol widening ships patch (AGENTS.md, Post-Task 3). @objectstack/objectql and @objectstack/rest move by one test file each and owe no entry. Both declaration lines stand in the PR body and in the changeset. The Clause-②: line reads yes, and yes is right: a new command and new exports. Skills-docs: none is present and true.

③ Boundary flags

  • open_questions: the dev report 7257650260 carries none. M4's question is ruled (7254350842), and the three earlier rulings stand.
  • security_findings: withheld in the dev report: with the owner seat (GHSA-4m68-3464-prgc). Not judged in this record. M5 below adds one item to that seat's list; its detail is not in this record.
  • Declared deviations (the round drafted at the default tier and re-authored by a contract-tier dev, no worktree, one test run outside the verify lock, the security label sent with the PR's creation, no reviewer request): process, and the seat's, the tier evidence included. None changes the tree read here.
  • Out-of-scope findings, carried to PR 2 as the PR body names them: N4, N5, N11, N13, N14, N16, the pairFormDestination note, the L1 page nit, the both-doors pin for a row the read serves at another address, and the list-only shipper's label (N18 below). Accepted as carried. N11's seed should also hold the row shape of M5; detail with the owner seat (GHSA-4m68-3464-prgc).
  • Escalated: "two plans into one pair for one name." The PR body carries it to PR 2 as an order of writes. Order does not settle it: see S9. It needs a decision from the maintainer before PR 2 writes; the seat files the question.
  • The dev's uncarried note (the engine tests' memory driver does not enforce the overlay unique index): it bears on S9, because an engine pin of that case over the memory driver would not meet the index. The seat decides whether it gets a carrier.
  • Public texts and the rule level: read against the private material. The ADR sentence, the "Decided by" item, the pin, the page sentence, the changeset and the PR body stay in ruling record 7254350842's words. What else this review observed about the PR's public wording is with the owner seat (GHSA-4m68-3464-prgc); the adopting seat keeps it out of this record. Any rewording the owner seat asks for can ride the commit that fixes M5.
  • The PR body's "The PR as a whole" ADR bullet still says four rulings and two pins. The head records five rulings, and the delta section says so. A body edit, the seat's.
  • The kernel reading: taken again on this head's tree with the card's git grep. It finds packages/platform-objects/CHANGELOG.md and packages/plugins/plugin-auth/CHANGELOG.md, and no source. The kernel hold is empty.
  • SQL push-down: no finding. The delta adds one registry read (shippedArtifactsOf('view', name) behind shipsView) and no store read, id materialisation or in-app join.
  • Check-runs: none was without a verdict at the last read, and none failed.

④ Design judgment

The delta on FAIL 7253682863.

  • M4: closed. The planner follows D7 as amended for the rows both pin blocks seed. The reading in the tree:
    • servedAtAnotherAddress (planner lines 502 to 516) asks orderedFormRowsAt with ships at every package that ships the form, and planStoredForms (lines 644 to 662) binds a row it returns at those addresses (elsewhere), with the row's own package as well where that package ships the form itself.
    • At such an address the row is not the base's own override (ownOverride, line 748, asks moved === undefined), so it takes destinationOf: the declared override in that base's pair through the ensure door, and hold with the door's refusal where the pair cannot be ensured (D7-c). The row is not sent to another pair.
    • isInternal reads the base at the address the row is planned at, and removable asks every address the row is read at, so D7-b and D7-e hold there.
    • foldOf (line 968) does not name a withdrawal carried from such a row newly closed. That agrees with the withdrawal judgement, which reads the name in every package's layer.
    • Where the read serves neither of two rows that could each follow the name, neither is planned there, and each keeps its own address.
    • Thirteen planner tests and seven engine tests carry ruling 7254350842 in their names. Each engine test asserts what the real form read serves before it asserts the plan, and Test Core is green on the head.
  • M5 (must-fix) — packages/metadata-protocol/src/protocol-form-reads.ts lines 322 to 327, reached from packages/metadata-protocol/src/protocol-stored-form-migration.ts lines 502 to 516: for one stored row shape, which neither pin block seeds, the planner's answer to "the read serves this row at another address" is not the read's own. For that shape the plan names an address and a destination D7 as amended does not give, D7-d's "a body the read does not serve today is never served by the ceremony" does not hold for what the plan describes, and the last sentence of the ADR's pair_form pin is not true. The old head did not plan that shape this way; the delta adds it. Read in the tree, not measured. The fix owes a planner test and an engine test over the real read, red before it. Detail with the owner seat (GHSA-4m68-3464-prgc).
  • S8: closed. D7's destination bullet now says the second pair's override "follows from D7-d and goes past no ruling's words", and "open to correction" is gone there. The Status line ("One reading of this record"), TL;DR 10's six points and D7-d's "Only that reading is still open to correction" are true as they stand.
  • N17: closed. The pin names an ablation for the half alone at its name and one for the half together at one name.
  • N16: still open, a nit. Nothing in the tree changed for it. The PR body carries it to PR 2 with N4.
  • M1, M2, M3, S1 to S7: the closures hold on this head. The lines they rest on moved only by the delta's offsets, and the M3 path (pairServedAtUnshippedBase) still asks the order with no ships.
  • N4, N5, N11, N13 and N14 stay carried to PR 2, named in the PR body.

Tried and held. A row bound to a former owner; a pair's override that declares one; both at one name (one plan, the override served, the bound row behind); either behind a package-less row; the row's own package shipping the name as a form item as well; two such rows at one name. In each the plan's address is the one the real read serves the row at, and the destination is one D7 gives. The form read's order is the old head's (①). Commit 6fa962199b removes one clause of atDestination: a row carrying the moved mark is never a stored form row (the filter at protocol-form-reads.ts line 324), so the clause had no row to read, and the destination check reads as it did at the old head.

The ADR (hits).

  • The Status line and "Decided by" item 4 name ruling record 7254350842 as option A of four. D7's new sentence is the ruling record's own wording, clause by clause: the premise, D7-b's classing, the destination, D7-c's hold, D7-e unchanged, and the ruling standing for every row its premise holds for. It adds no plan kind and no key.
  • The planner agrees with that sentence for the rows the pins seed, and not for the shape of M5.
  • S9 (should-fix) — the pair_form pin's last sentence (ADR line 339) and D7's new sentence (line 287) against a row the read serves at two addresses. The planner plans a move at each address, each into the same pair under one name; the tests "a row two packages serve is read at each of them: a move at each address, each naming the other", "served at two modules" and "served at its own package as well" pin exactly that. A pair holds one row of a type and name, and a row declares one base (ADR-0146 D2). So the two destinations are one row, and the pin's "answers there byte-equal before --apply and after it, as the declared override in that base's pair" cannot hold at both addresses. Ruling record 7254350842 does not speak of two addresses. The PR body carries the case to PR 2 as an order of writes, which does not settle it. On the prose face: the pin states its claim for a row served at one such address, and D7 names the two-address case as one no ruling gives a destination for yet. The decision itself is the maintainer's (③).

protocol-stored-form-migration.ts and protocol-form-reads.ts against D7 and the rulings.

  • The readings under M4 above hold. M5 is the one place the code and D7 part.
  • shipsView reads the packages that ship the name in the view type, and shipsInView gives the order's two questions that one answer. That is the question the served view list asks for a view item's name.
  • N18 (nit) — planner lines 481 to 485 and 510, and ADR line 287: servedAtAnotherAddress asks only at packages that ship a form of the name. Where the package that ships the name ships only a list there, the read still serves the row under that package, and the plan keeps the row at the package it is bound to. The PR body states the pair and the body are the same, and no base form stands there to class the row by, so no outcome differs. The PR body carries the label to PR 2; D7's sentence does not say the plan stops short of it. One clause in the pin PR 2 owes would do.

index.ts, stored-forms.ts (CLI). The first carries the merge's line only. The second is unchanged. Both judgments are carried from record 7253682863.

stored-forms-upgrade.mdx. The one added sentence in the moves row agrees with the planner for the rows the pins seed: such a row moves as a row of the serving package does, into that package's .custom package as a declared override. The holds row and the removal row already cover what the planner does there when the pair cannot be ensured or the form is internal. The rest of the page is unchanged since the old head.

The two pin files. They hold what they assert. The new blocks do not seed the shape of M5, which is why it passes them. The engine block's two-address tests pin the plan S9 is about.

Implemented-by: claude/project-thread-1v5bvm (resumed from claude/project-thread-zmwgyw)
Reviewed-by: session_01QsR2jQkLKMF81cpqpt8p1a

VERDICT: FAIL

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · zhuangjianguo · session_01QsR2jQkLKMF81cpqpt8p1a

席位核对 — REWORK · L1 · seat repo:objectstack#1, review thread R2 · Head-sha 793f66883fbb7bfa61aacd81ba6a1eae21a2b15e · 2026-11-29T15:22Z

Card #37111 is seat 1's by takeover claim 7255642518; the dev report for this head is 7257650260. PR #38613 supersedes #38464 (closed), whose records are the FAIL 7253682863 and the former seat's read 7253529114. The delta contract review of this head is 7258026145 (CONTRACT_REVIEW_TIER, rendered for this thread by an isolated reviewer): FAIL. It closes M4, S8 and N17 by id and opens one must-fix (M5), one should-fix (S9) and one nit (N18); N16 stays carried to PR 2. The verdict here is REWORK.

A private advisory touches this PR (GHSA-4m68-3464-prgc). This record stays at rule level; anything beyond it is with the owner seat.

reading value
pr-state.mjs --pr 38613 draft · 43 success · 19 expected skip · 0 unexpected skip · 0 failed · 0 pending
l1-face.mjs --pr 38613 Part of #37111, no closing keyword, Clause-②: yes, Metadata-protocol: none; one flag, the changeset, read below; dogfood not owed by the face
check-governed-merges.mjs --pr 38613 GOVERNED, Tier H: docs/adr/** ×1, more than an add-only note; 3,130 changed lines, over the human-merge threshold
author tier verify-review-tier.mjs on the dev's transcript: PASS, 223 turns, every one at CONTRACT_REVIEW_TIER, as the claim's Container & model line requires for a round that touches docs/adr/**
dogfood battery report 7257650260: 793f6688, VERDICT command-exit 0, 495 files and 4187 tests passed, no failure

Rework items

  1. M5 (must-fix), record 7258026145. For one stored row shape that neither pin block seeds, the planner's answer to "the read serves this row at another address" is not the read's own (protocol-form-reads.ts lines 322 to 327, reached from protocol-stored-form-migration.ts lines 502 to 516), so D7 as amended, D7-d and the last sentence of the ADR's pair_form pin do not hold for it. The delta introduced it. The detail reaches the dev from the owner seat, not from this thread. The fix owes a planner test and an engine test over the real read, each red before it, and a delta review at the new head.
  2. S9 (should-fix), record 7258026145, prose face. A row the read serves at two addresses is planned as a move at each, into the same pair under one name; a pair holds one row of a type and name, so the pin's byte-equal sentence (ADR line 339) cannot hold at both. The ADR states the pin's claim for a row served at one such address, and D7 names the two-address case as one no ruling gives a destination for yet. The decision itself is the maintainer's and goes through the seat before PR 2 writes; this PR does not pick.
  3. The PR body. "The PR as a whole" still says four rulings and two pins; the head records five rulings. The line that carries the two-address case to PR 2 as "the order of those writes" is reworded once item 2 is in the ADR.
  4. N18 (nit), optional in the same commit. D7's new sentence does not say the plan stops short of a package that ships only a list of the name; one clause in the pin PR 2 owes would do. No outcome differs.
  5. Wording. Any rewording of public texts the owner seat asks for rides the commit that fixes M5.

Read and settled here

  • The changeset flag: @objectstack/objectql and @objectstack/rest each move by one test file across the whole PR and neither ships; no entry is owed, as the earlier records read it. The changeset itself is the same blob as at the old head.
  • File surface: the 17 files are the claim's; this round adds none. Part of #37111 is right, and the card keeps pm:dispatched for PR 2.
  • The report's security_findings: withheld is with the owner seat. Its out-of-scope note with no carrier (the engine tests' memory driver does not enforce the overlay unique index) bears on item 2; the seat decides its carrier with that question.
  • The record reads Security-touching: yes, and the security label is on the PR.

Nothing is handed to the maintainer on this head. The Tier H brief and the hand-off follow a delta PASS.

…ember at the package the container is bound to

ADR-0159 D7 as amended speaks of a row the read serves at another address
than the package it is bound to. Such a row is an item row: the list serves
a container's expansion in its own package's slot, or as a package-less
stand-in. The planner now asks the question of item rows only, so a member
of a stored container keeps the address of the package the container is
bound to.

Pinned in the planner's tests and over the real protocol, each red before
the change. Test names and one docblock are restated in the ruling record's
own words (GHSA-4m68-3464-prgc).

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jV1UG1Uoq28xMDt6gk
…t two addresses

One pair holds one row of a type and name, so the destination D7 gives a
row the read serves at another address is given at one such address. D7
names the two-address case as one no ruling gives a destination for yet,
and the pin states its byte-equal claim for one address, with the case of a
package that ships only a list of the name named beside it.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jV1UG1Uoq28xMDt6gk
… as the seat's step

The check now counts the form rows behind an internal record form that an
address leaves in place as kept at that address. Where another address
serves such a row and would move or remove it, every address that serves
it or keeps it holds, and both rows stay as stored.

- Status, "Decided by", "What is held", "Against D7-d", D7-d's bullet on
  the internal form ahead of a linked row, and the switch bullet say so.
  Each marks it as the owning seat's reading of ruling record 7249158572
  together with ruling record 7265816895, not the maintainer's words, and
  as an exception to the first record's "The upgrade is not blocked", for
  the approver to accept with the record or strike. The ruled words are
  untouched; the reading stands beside them.
- "Against D7-c": a plan waits on another hold of its row only where
  clearing that hold would let every other address move the row; and the
  one measured exit is stated only for a row read at addresses of one App
  and nowhere else, kept behind no internal form, with no plan of it
  already holding.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JQwxba7sJxPLc8kzW8QTyd
…not on one its address took for another row

Where an address keeps one row behind an internal form left in place and
holds for the row it serves, the row kept behind is read as left in place
there: it holds on its own, with its own precheck entry and no exit named.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JQwxba7sJxPLc8kzW8QTyd
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-warren · session_01JQwxbXyLoBzNYY1U8SNPFu

Contract-review-claim: session_01JQwxbXyLoBzNYY1U8SNPFu · head dd1ab29 · 2026-11-30T05:49Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-warren · session_01JQwxbXyLoBzNYY1U8SNPFu

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: dd1ab297bc853dd3fbe2ebc2cb3bd4d0597cfe80
Local-runs: none
Scope: docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md + packages/metadata-protocol/src/protocol-stored-form-migration.ts, packages/metadata-protocol/src/protocol-form-reads.ts, packages/metadata-protocol/src/index.ts, packages/cli/src/commands/migrate/stored-forms.ts, content/docs/deployment/stored-forms-upgrade.mdx, packages/metadata-protocol/src/protocol-stored-form-migration.test.ts, packages/objectql/src/protocol-stored-form-migration.test.ts
Security-touching: yes

PR #38613 (Part of #37111, PR 1 of 2: the read-only census of stored forms). This is a delta record on PASS 7269115759 at 622c806f7d7346fa874189afd37d0550c533e284. The new head is three commits on that head (7e825b6de1, ADR 53ddab680e, dd1ab297bc): 7 files, +165/−35. The merge base is still f5da514b07.

Read for this record: card #37111 (its 26 comments, with dev report 7269697485 and ruling record 7249158572); ruling record 7265816895 on #38661; record 7269115759; git diff 622c806f7d dd1ab297bc in full and the net diff against the merge base (17 files, +4057/−32); the check-runs on the head. Everything below is read in the tree at the head (git show); nothing was built or run. The rest of the diff outside the Scope line is the lane seat's ACCEPT at TIER_DEFAULT.

Check-runs on the head, read at 2026-11-30T05:51Z: 61 runs, 44 success, 17 skipped, none failed, none without a verdict. success: Lint & Repo Gates, TypeScript Type Check, Test Core (all 12 shards), Build Core, Build Docs, Check Changeset, Governed Surface Queue Guard, PR-body guards, Test UI, Live E2E UI, Dogfood Regression Gate. These are the gate verdicts; none was re-run.

① Derived judgments

  • The CLI surface: no flag, no exit code, no key. One sentence of the text run changes (a row listed apart "stands only while that hold does"). Right.
  • What the census prints: one more arrangement holds, the form row an address keeps behind an internal record form it leaves in place, where another address serves that row and would move or remove it; the address that leaves the form in place holds too. A plan waits on another hold of its row only where clearing that hold would let every address move the row; otherwise it holds by itself with an action that names no exit. Existing outcome, existing causes, no new key. Right.
  • No new kind: StoredFormHoldCause, the outcomes, StoredFormLeftReason and the report's keys are those of 622c806f7d. Ruling record 7265816895's execution clause holds.
  • canSwitch is false wherever a hold is printed: a served-apart hold pushes its own precheck entry unless a plan already holds for the same row, and such a plan pushed one (the pair door, or the contested slot). A hold this pass gives a plan for one row is recorded for that row alone (heldFor), so it never stands in for another row's entry. Right.
  • The index, the form read's accept set, what an author writes: untouched. Metadata-protocol: none stays right.
  • The ADR's public claim: D7 now says an address keeps the form rows behind an internal record form it leaves in place, and that such a row holds the upgrade where another address serves it and would move or remove it. It is stated as an exception to ruling record 7249158572's "The upgrade is not blocked" and as the owning seat's reading. Right, and marked where the approver reads (④).
  • Security-touching: yes. The planner decides which stored body stands behind a form's address after the upgrade, and the PR carries the security label.

② Semver level

  • .changeset/37111-stored-forms-census.md: patch on @objectstack/metadata-protocol and @objectstack/cli, level unchanged; its body names the row kept behind. Check Changeset is success. Clause-②: yes and Skills-docs: none stay right.

③ Boundary flags

  • open_questions of report 7269697485: none. The sub-agent's question on the per-row waiting (whether a plan held for the row it serves is a hold of the row kept behind it) was answered in the tree by dd1ab297bc as "no", which is right: a hold names one row, and the row behind has its own cause and owes its own precheck entry.
  • Red-before and ablation: the report states four planner pins and one engine pin red before 7e825b6de1, one planner pin red before dd1ab297bc, and each new condition ablated alone. NOT MEASURED here; read against the pins in ④. Test Core is success on the head.
  • Carried to PR 2, as the report lists: N29's pin (the "writes nothing" pin seeds a third address with the held row behind), N26, N4, N5, N11, N13, N14, N16, the pairFormDestination note, the both-doors pins, steps 5 to 7 of [Decision] What the upgrade to the next major does with a stored form row that is served today at two package addresses of one App (ADR-0159 D7, card #37111) #38661. Accepted as carried.
  • Rule-change-verified: the template for this file list prints no such line; no path under .claude/**, no Rule-change: on the PR body.
  • SQL push-down: no finding. No read of the store is added.

④ Design judgment

The delta on PASS 7269115759, by id.

  • S13: closed for the case it named. holdRowsServedApart (protocol-stored-form-migration.ts line 864) enters every form row behind an internal_ahead_of_linked_row plan as kept at that address, and reads it there as left in place. Where another address serves the row and would move or remove it, every plan involved holds, the address that leaves the form in place among them, the row is named once, and the action names no exit. Pins: a planner test, an engine test whose first assertion is what the effective form list serves at both addresses today, and the ablation the report names. One sibling case is left, S14.
  • N27: closed. A plan waits only where every other address would move the row (clearsWithIt, line 909); otherwise it holds by itself with the no-exit action and no second precheck entry. Pinned with a third address that leaves the row in place.
  • N28: closed. The measured exit is named only where no plan outside the slot serves the row (servedOutside, line 811), and in the served-apart case only where no address keeps the row behind and no plan of it already holds (measured, line 936). Pinned with a base of another App.
  • N29: closed for this PR. The text run says the line stands only while the hold does; the pin is PR 2's (③).
  • N30: closed. The engine test's title now says what its first assertions read (the module serves the bound row; the pair's own layer reads its own row).
  • N26, N16: open, nits, carried to PR 2.
  • M1 to M7 and S1 to S12 stay closed; the code those closures rest on is unchanged except holdRowsServedApart, read again below.

The per-row waiting (dd1ab297bc), tried.

  • A plan left in place for its internal form, then held in this pass for the row behind it: read for its own served row it is still "left in place" (the outcome before the pass), so the internal form is not taken as held for itself. Holds.
  • The internal form served apart at a third address, and the row behind it moved at a fourth: each row gets its own hold and its own precheck entry, in either order the two rows are met. Holds, and pinned.
  • A row held at the pair door at one address, moved at a second, kept behind at a third: the two wait on nothing, hold with no exit, and the door's entry names the row once. Holds.
  • A row held at the pair door at one address and kept behind at another, with no address that would move it: nothing more holds, and the address that keeps it stays "left in place". Right: no move or removal is planned for the row.
  • A row that claims a contested slot from two addresses and is moved at a base of another App: the third plan does not wait and names no exit. Conservative, with one sentence that says more than was read (N31).
  • No path was found where a hold is printed without a precheck entry for its row, or where an entry is pushed twice for one row.

New on this head.

No must-fix.

  • S14 (should-fix) — planStoredForms (the behind list of a keep or move plan, and the rows a remove takes with it) against ADR lines 292 and 299, "both rows stay as stored": the rule S13 added asks only the addresses that serve a kept row and would move or remove it. A row an address keeps under ruling record 7249158572, the internal form it leaves in place or a form row behind it, can also stand behind another row at a further address whose plan keeps or moves that other row. There it is still listed in behind as folding into the served row (or goes with a removal), and nothing holds. A fold takes the row from the address that keeps it as a move does. Reached, by reading, with a package-less internal row ahead of a package-less linked row of the same name, served at one base and standing behind a bound row at another address. A row that holds is already listed apart (heldApart); a row that is kept and does not hold is not. The fix is the same reading for a fold and for a removal's rows behind: the row is listed apart there, or the row holds at every address that serves, keeps or would fold it, with a planner pin and an engine pin, red first, and D7's "would move it or remove it" widened to say so. PR 1 writes nothing; as for S13, the seat picks the carrier, and PR 2 writes nothing for such a row before the fix.
  • N31 (nit) — lines 940 to 942 and the refusal above them: where a plan does not wait, its refusal adds "clearing that hold alone would not let every address treat it alike". That is read from the other plans' outcomes, not measured, and for a row whose other holds are the two plans of one contested slot it is not what follows. The same refusal opens "The read serves … at" and lists an address that keeps the row behind and does not serve it; the next clause says so.

The ADR (hits), and the marks for the Tier H approver.

  • Status (line 3): names the reading of 7249158572 with 7265816895, says it is an exception to "The upgrade is not blocked", the owning seat's step, "for the approver to accept with the record or strike". Right.
  • "Decided by" (line 24): the same, as a third seat step under the 2026-11-30 item, with the maintainer's words quoted and the reading set apart from them. Right.
  • D7 "What is held" (line 289): one sentence that an address also keeps a form row behind an internal record form it leaves in place, pointing to "Against D7-d". Agrees with the planner.
  • "Against D7-c" (line 291): a plan waits only where every other address would move the row; otherwise it holds with no exit and its refusal says the row holds at that address as well; the measured exit is bounded to a row served at no address besides, kept behind at none, with no plan already holding. Agrees with clearsWithIt, servedOutside and measured, sentence by sentence.
  • "Against D7-d" (line 292): two exceptions, each marked as the seat's; the second quotes 「两行都不动」, says the row holds at every address that serves it or keeps it, and names the exception to "The upgrade is not blocked". Agrees with the planner for a move or a removal at an address that serves the row; S14 is the fold it does not speak of.
  • D7-d's bullet for the ruling (line 299) and the switch bullet (line 314): each carries the exception in the bullet itself and marks it as the seat's step. Right.
  • The maintainer's words are quoted unchanged in every place; no sentence presents the seat's reading as his. The marks are where an approver who reads Status, "Decided by" and D7 meets them.
  • Against the execution plan: PR 1 stays read-only; no duty moves between the two PRs.

The page, the CLI and the two pin files. The page's "left in place" row and the changeset say the row behind holds where another package would move it. The CLI's one changed sentence is N29's. The pin files hold what they assert; neither seeds S14's arrangement.

Implemented-by: claude/project-thread-1v5bvm
Reviewed-by: session_01JQwxbXyLoBzNYY1U8SNPFu (isolated contract-review sub-agent)

VERDICT: PASS

…ace is folded, moved or removed at no address

The rows an address keeps as stored under ruling 7249158572 (the internal
form left in place and every form row behind it) are now kept so at every
address: a plan that would fold, move or remove one holds, lists it apart
and names no exit. One predicate decides it. A waiting refusal no longer
says what clearing another hold alone would do, and a refusal names an
address that only keeps a row behind as keeping it, not as serving it.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JQwxba7sJxPLc8kzW8QTyd
…measured clearing claim

The check now keeps a row left as stored beside an internal record form
at every address: a plan elsewhere that would fold it, remove it with its
served row, or write a folded row's withdrawal into it holds the upgrade.

- "Against D7-d": one sentence says so inside the second exception, under
  the mark that is already there (the owning seat's reading of ruling
  record 7249158572 with ruling record 7265816895, not the maintainer's
  words, for the approver to accept with the record or strike). The ruled
  words are untouched.
- "Against D7-c": a plan waits where every other address would move the
  row, and the two sentences no longer say what clearing the other hold
  would or would not bring, which was not measured; the refusal no longer
  says it either.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JQwxba7sJxPLc8kzW8QTyd
…s it spans, and the report lists kept rows apart on hold lines

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JQwxba7sJxPLc8kzW8QTyd
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-warren · session_01JQwxbXyLoBzNYY1U8SNPFu

Contract-review-claim: session_01JQwxbXyLoBzNYY1U8SNPFu · head 944aa67 · 2026-11-30T06:53Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-warren · session_01JQwxbXyLoBzNYY1U8SNPFu

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 944aa67cb8ee90cb6a618a87e3b7c59b6d7de086
Local-runs: none
Scope: docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md + packages/metadata-protocol/src/protocol-stored-form-migration.ts, packages/metadata-protocol/src/protocol-form-reads.ts, packages/metadata-protocol/src/index.ts, packages/cli/src/commands/migrate/stored-forms.ts, content/docs/deployment/stored-forms-upgrade.mdx, packages/metadata-protocol/src/protocol-stored-form-migration.test.ts, packages/objectql/src/protocol-stored-form-migration.test.ts
Security-touching: yes

PR #38613 (Part of #37111, PR 1 of 2: the read-only census of stored forms). This is a delta record on PASS 7270096541 at dd1ab297bc853dd3fbe2ebc2cb3bd4d0597cfe80. The new head is three commits on that head (91ab3f3565, ADR de6086d289, 944aa67cb8): 6 files, +211/−32. The merge base is still f5da514b07.

Read for this record: card #37111 (its 27 comments, with dev report 7270634803 and ruling record 7249158572); ruling record 7265816895 on #38661; record 7270096541; git diff dd1ab297bc 944aa67cb8 in full and the net diff against the merge base (17 files, +4236/−32); the check-runs on the head. Everything below is read in the tree at the head (git show); nothing was built or run. The rest of the diff outside the Scope line is the lane seat's ACCEPT at TIER_DEFAULT.

Check-runs on the head, read at 2026-11-30T06:55Z: 61 runs, 44 success, 17 skipped, none failed, none without a verdict. success: Lint & Repo Gates, TypeScript Type Check, Test Core (all 12 shards), Build Core, Build Docs, Check Changeset, Governed Surface Queue Guard, PR-body guards, Test UI, Live E2E UI, Dogfood Regression Gate. These are the gate verdicts; none was re-run.

① Derived judgments

  • The CLI surface: no flag, no exit code. A hold line now lists the kept rows behind it apart. Right.
  • What the census prints: a plan that would fold, move or remove a row another address keeps as stored under ruling record 7249158572, or write a folded row's withdrawal into it, prints hold (app_author, no exit named) where it printed keep, move or remove, and canSwitch is false. The address that keeps the rows still prints left_in_place. Existing outcome and cause. Right.
  • No new kind: the causes, the outcomes and StoredFormLeftReason are unchanged. heldApart, the report key of 622c806f7d, is now also on hold plans; no key is added. storedFormHoldAction takes contested: 'kept'; the index does not export it. Ruling record 7265816895's execution clause holds.
  • canSwitch is false wherever a hold is printed: holdChangesToKeptRows pushes one precheck entry for every plan it turns into a hold, and turns only plans that did not hold. Right.
  • The index, the form read's accept set, what an author writes: untouched. Metadata-protocol: none stays right.
  • The ADR's public claim: "Against D7-d" now states the keeping row-wide, as the seat's reading. The other places that name the seat's steps were left as written (S15).
  • Security-touching: yes. The planner decides which stored body stands behind a form's address after the upgrade, and the PR carries the security label.

② Semver level

  • .changeset/37111-stored-forms-census.md: patch on @objectstack/metadata-protocol and @objectstack/cli, level unchanged; its body carries the rule. Check Changeset is success. Clause-②: yes and Skills-docs: none stay right.

③ Boundary flags

  • The dev's note (1), a row named twice in the precheck by the kept-row rule. Read: the dev's reading holds. The rule pushes one entry per plan it holds, naming that plan's served row, so a second entry needs one row served by two plans that both reach this pass without a hold. A package-less row is read at the keeping address too, where it is the internal form or stands behind it, so it is itself kept, and the served-apart pass before this one has already held every plan that would move or remove it. A row the read serves at two packages of one App claims that App's one pair from both, and the contested-slot pass has held it. A row bound to a package or declared as a pair's override is served at one address. No arrangement was found that reaches the pass with two unheld plans of one served row. No guard is owed; one is cheap if the seat wants the property stated in code and not by reading.
  • The dev's note (2), the ADR places left as written: answered by S15.
  • Red-before and ablation: the report states four planner assertions red before 91ab3f3565, one before 944aa67cb8, and keptRowsChanged ablated turns exactly the two S14 pins red. NOT MEASURED here. Test Core is success on the head.
  • Carried to PR 2, as the report lists: the engine half of the two S14 pins and the both-doors pin for the kept-row shape (N32), N29's pin, N26, N4, N5, N11, N13, N14, N16, the pairFormDestination note, the both-doors pins, steps 5 to 7 of [Decision] What the upgrade to the next major does with a stored form row that is served today at two package addresses of one App (ADR-0159 D7, card #37111) #38661.
  • Rule-change-verified: the template for this file list prints no such line; no path under .claude/**, no Rule-change: on the PR body.
  • SQL push-down: no finding. No read of the store is added.

④ Design judgment

The delta on PASS 7270096541, by id.

  • S14: closed. keptRowsOf (protocol-stored-form-migration.ts line 980) reads, before any hold is given, the served row and every form row behind it of each plan that leaves an internal form in place ahead of a linked row. keptRowsChanged (line 999) is the one predicate: for a plan that is not already a hold or left in place, a kept row it serves and would move or remove, a kept row it keeps and would write a carried withdrawal into, a kept row behind it that a keep or a move would fold, and a kept row among the rows a removal takes. holdChangesToKeptRows (line 1036) holds such a plan, pushes its entry, and lists a kept row behind any hold plan apart. Two planner pins (one further address; two further addresses, each named once). One nit on the pins, N32.
  • N31: closed. The unmeasured sentence is gone from the planner and from "Against D7-c", and an address that only keeps a row behind is named as keeping it.
  • N26, N16: open, nits, carried to PR 2.
  • M1 to M7 and S1 to S13 stay closed; the three earlier passes are unchanged except the refusal's wording and the extraction of servedAppsAt.

The single predicate, tried: does any path that changes a kept row escape it?

Within one form name, none was found. Each way a plan changes a stored row was put against a kept row:

  • The plan serves it and moves it, or removes it: held by the served-apart pass where the keeping address is counted, and by the predicate's first branch otherwise.
  • The plan serves it, keeps it, and takes a folded row's withdrawal into it: the predicate's carries branch.
  • It stands behind the row a keep or move plan serves: held, and listed apart.
  • It stands behind a removed form: held where the removal would take it; where another address serves it the removal already leaves it (servedElsewhere), and nothing changes.
  • It stands behind a plan that already holds, or behind a plan that leaves its rows in place or waits on an unreadable body: nothing is written there; under a hold it is listed apart.
  • It reached another address through the fold step of M6 (servedAheadFromElsewhere): it is in that address's rows, so the same branches read it.
  • A move's destination that is the kept row itself: not reachable, because a stored form row that stands in a destination slot is the first row of the order at its own address and is never the internal form or a row behind one there.
  • The keeping plan held afterwards (S13): the kept rows were read before any hold, so they stay kept.

One bound is the ruling's own and is not an escape: the rule is read per form name. A stored container can be kept for one member name and have another member moved or removed under that member's name, which re-saves the stored row without that member. Ruling record 7249158572 reads "under that name", and the kept member is not touched. N33.

New on this head.

No must-fix.

  • S15 (should-fix) — the ADR, lines 3, 24, 299, 314 and the "precheck refuses" pin (line 346), against line 292 and holdChangesToKeptRows: the row-wide rule is one more case in which the upgrade does not switch, and it holds a different row than S13's case does (the row a further address serves, where a kept row stands behind it). It is stated, and marked as the seat's reading, under "Against D7-d" only. The Status line and "Decided by" still describe the seat's step as a kept row that holds "where another address serves it and would move it or remove it"; the switch bullet's list of what refuses and the "precheck refuses" pin do not list a plan held because it would fold or remove a kept row; D7-d's bullet for the ruling names one exception to "does not hold the upgrade". No sentence is false, but the lists read as complete and the approver who accepts the seat's steps from Status and "Decided by" accepts less than the tree does. One clause in each place, as the dev's note (2) offers.
  • N32 (nit) — the two S14 pins are planner pins; the engine half over the real read, with what the form list serves today asserted first, is carried to PR 2. Accepted as carried, since the rule reads plans the earlier passes already derive from the read's order, and the both-doors pin is PR 2's in any case.
  • N33 (nit) — line 292 says the kept rows "stay as stored at every address". For a member of a stored container that holds under the member's name, as the ruling's record has it; another member of the same container can still be moved or removed under its own name. "Under that name" in the sentence, and one byte-equal assertion on the kept member in PR 2's pin, would say it.

The ADR (hits).

  • "Against D7-d" (line 292): the row-wide sentence agrees with the planner clause by clause (fold, removal with the served row, a withdrawal written into it; the precheck names the row the plan serves; the action names an App only where that address and every keeping address are of one App that can be read; a kept row behind any hold is listed apart; the keeping address stays left in place unless S13's case applies). It is marked as the seat's reading.
  • "Against D7-c" (line 291): the unmeasured clause is replaced by "neither their refusal nor their action says what clearing that hold alone would bring, which was not measured". Agrees with the planner.
  • The other places: S15.
  • Against the execution plan: PR 1 stays read-only; no duty moves between the two PRs.

The page, the CLI and the pin files. The page's "left in place" row states the rule for a move or removal at another package. The CLI lists kept rows apart on hold lines. The pin files hold what they assert.

Implemented-by: claude/project-thread-1v5bvm
Reviewed-by: session_01JQwxbXyLoBzNYY1U8SNPFu (isolated contract-review sub-agent)

VERDICT: PASS

…tep is marked

The row-wide rule holds a different row than the case it widens: the row
a further address serves, where its plan would fold, move or remove a row
another address keeps as stored, or write a folded row's withdrawal into
it. It was stated under "Against D7-d" only.

- Status, "Decided by", D7-d's bullet on the internal form ahead of a
  linked row, the switch bullet and the "precheck refuses" pin each gain
  one clause that states it, marked as the owning seat's step and as an
  exception to ruling record 7249158572's "The upgrade is not blocked",
  as the first case is. The switch bullet's count of exceptions follows.
- "Against D7-d": the kept rows stay as stored at every address under
  that name, as the ruling record reads.

The ruled words are untouched.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JQwxba7sJxPLc8kzW8QTyd
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-warren · session_01JQwxbXyLoBzNYY1U8SNPFu

Contract-review-claim: session_01JQwxbXyLoBzNYY1U8SNPFu · head 24ab30a · 2026-11-30T07:29Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-warren · session_01JQwxbXyLoBzNYY1U8SNPFu

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 24ab30abefaa7a0c6b6a59f762257d13cd5087e3
Local-runs: none
Scope: docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md + packages/metadata-protocol/src/protocol-stored-form-migration.ts, packages/metadata-protocol/src/protocol-form-reads.ts, packages/metadata-protocol/src/index.ts, packages/cli/src/commands/migrate/stored-forms.ts, content/docs/deployment/stored-forms-upgrade.mdx, packages/metadata-protocol/src/protocol-stored-form-migration.test.ts, packages/objectql/src/protocol-stored-form-migration.test.ts
Security-touching: yes

PR #38613 (Part of #37111, PR 1 of 2: the read-only census of stored forms). This is a delta record on PASS 7271195568 at 944aa67cb8ee90cb6a618a87e3b7c59b6d7de086. The new head is one commit on that head (24ab30abef): the ADR alone, +6/−6. Every other file of the PR is the blob of 944aa67cb8, and the merge base is still f5da514b07.

Read for this record: card #37111 (its 28 comments, with dev report 7271395688); record 7271195568; git diff 944aa67cb8 24ab30abef in full, word by word; the six changed lines in the tree at the head beside the planner they describe (holdChangesToKeptRows, keptRowsChanged, unchanged); the net diff's size against the merge base (17 files, +4236/−32); the check-runs on the head. Nothing was built or run. The rest of the diff outside the Scope line is the lane seat's ACCEPT at TIER_DEFAULT.

Check-runs on the head, read at 2026-11-30T07:30Z: 61 runs, 44 success, 17 skipped, none failed, none without a verdict. success: Lint & Repo Gates, TypeScript Type Check, Test Core (all 12 shards), Build Core, Build Docs, Check Changeset, Governed Surface Queue Guard, PR-body guards, Test UI, Live E2E UI, Dogfood Regression Gate. These are the gate verdicts; none was re-run.

① Derived judgments

  • The CLI surface, what the census prints, the package index, the form read, what an author writes: unchanged; no code file moved. Every judgment of record 7271195568 on them stands.
  • The ADR's public claim: the row-wide keeping, stated under "Against D7-d" at the previous head, is now also stated in the Status line, under "Decided by", in D7-d's bullet for the ruling, in the switch bullet and in the "precheck refuses" pin, each time as the owning seat's step and an exception to ruling record 7249158572's "The upgrade is not blocked". The ADR promises nothing the planner does not do, and now says in each of those places what it does. Right.
  • Security-touching: yes. The hunks state which stored rows the upgrade leaves as stored and which hold it, and the PR carries the security label.

② Semver level

  • No package source moved; .changeset/37111-stored-forms-census.md is unchanged and its patch on @objectstack/metadata-protocol and @objectstack/cli still matches. Check Changeset is success. Clause-②: yes and Skills-docs: none stay right.

③ Boundary flags

  • The sub-agent's note: the switch bullet's parenthesis after "What refuses is a row that holds the upgrade". Not wrong; a nit (N34). The parenthesis lists the kinds of D7-c and of ruling record 7265816895. The first two seat exceptions fall under its last kind in substance. The third, the row a further address serves whose plan would change a kept row, is a row one address serves, so it is under none of the listed kinds. The same bullet states it three sentences on, with the words "and is the row the precheck names", so the bullet read whole says what refuses. The list alone reads as complete and is one kind short.
  • open_questions of report 7271395688: none.
  • Carried to PR 2, as the report lists: N32, the N33 byte-equal pin for a kept container member beside a moved sibling, N29's pin, N26, N4, N5, N11, N13, N14, N16, the pairFormDestination note, the both-doors pins, steps 5 to 7 of [Decision] What the upgrade to the next major does with a stored form row that is served today at two package addresses of one App (ADR-0159 D7, card #37111) #38661. Accepted as carried.
  • Rule-change-verified: the template for this file list prints no such line; no path under .claude/**, no Rule-change: on the PR body. The hunks state a product rule and whose reading it is; they change nothing about what an agent may do without the maintainer.
  • SQL push-down: no finding. No code changed.

④ Design judgment

The delta on PASS 7271195568, by id.

  • S15: closed. Each of the five places carries one clause, read against keptRowsChanged:
    • Status (line 3): "the row a further address serves holds the upgrade where its plan would fold, move or remove a row so kept or that internal form, or write a folded row's withdrawal into either", and "Each" of the readings is the seat's step for the approver to accept or strike. The four verbs are the predicate's four branches.
    • "Decided by" (line 24): the same clause under the 2026-11-30 item, with "each" an exception to "The upgrade is not blocked" and the seat's reading, not the maintainer's words.
    • D7-d's bullet for the ruling (line 299): "a further exception, the same seat's step and not the maintainer's words".
    • The switch bullet (line 314): "the three exceptions", each the owning seat's step; the third says the row the further address serves holds and "is the row the precheck names", which is what holdChangesToKeptRows pushes.
    • The "precheck refuses" pin (line 346): a deployment that holds a row "held under the owning seat's reading of the ruling of 2026-11-29 with that one, an exception to that ruling record's 'The upgrade is not blocked'" does not reach major 19.
      The maintainer's words are quoted unchanged in each place, and no clause presents the seat's reading as his. An approver who reads Status and "Decided by" now meets every seat step the tree applies.
  • N33: closed. Line 292 reads "stay as stored at every address under that name"; the byte-equal pin is PR 2's (③).
  • N32: open, a nit, carried to PR 2 by name in the PR body's plan.
  • N26, N16: open, nits, carried to PR 2.
  • M1 to M7 and S1 to S14 stay closed: no code or pin file changed.

New on this head.

No must-fix, no should-fix.

  • N34 (nit) — ADR line 314: the parenthesis after "What refuses is a row that holds the upgrade" does not list the row a further address serves whose plan would change a kept row; the exceptions sentence of the same bullet does (③). One clause in the parenthesis, or "among them" before it, at the next ADR edit.

The ADR (hits). The six changed lines agree with the planner and with each other: the same four acts (fold, move, remove, a folded row's withdrawal written into it), the same held row (the one the further address serves), the same mark. "Against D7-d" (line 292) is the one full statement and the five others point to it. Against the execution plan: PR 1 stays read-only, and no duty moves between the two PRs.

Implemented-by: claude/project-thread-1v5bvm
Reviewed-by: session_01JQwxbXyLoBzNYY1U8SNPFu (isolated contract-review sub-agent)

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-warren · session_01JQwxbXyLoBzNYY1U8SNPFu

维护者速读

  • 这是什么:新增只读命令 os migrate stored-forms。它在升级前清点每个应用里存储的表单,逐条报告升级后由哪份表单在原地址生效;遇到不能自动处理的情况就停下,说明原因和由谁处理。这一步不写任何数据,真正的迁移在第二个 PR。
  • 同时更新 ADR-0159 第 D7 节。席位按你的裁决补了三处「升级前先停下」的例外,每处都标明是席位的判断,你可以逐条接受或删去:
    1. 一个应用的两处地址争同一个位置;
    2. 原地保留的内部表单连带它后面的关联记录;
    3. 任何会改动这类保留记录的计划。
  • 风险:只读,不改数据;改动行数较多(+4,236),又改了 ADR,所以按 Tier H 要人工批准。
  • 要你做什么:审阅 ADR D7 里标出的三处例外,批准或指出要删的;os-zhuang 的审批已请求。

席位核对

ACCEPT · L1 · area o2-S1 (seat-1 takeover) · Head-sha 24ab30abefaa7a0c6b6a59f762257d13cd5087e3 · 2026-11-30T07:32Z

  • Contract review at CONTRACT_REVIEW_TIER, final delta PASS 7271840179 on this head: no must-fix, no should-fix. Across the rounds, M1–M7 and S1–S15 are closed. N16, N26 and N32 are carried to PR 2 in the PR body's plan. N34 (one clause in the switch bullet's parenthesis) is accepted for the next ADR edit.
  • Seat steps marked in the ADR for the approver: S13 (reading A of ruling 7249158572, which the reviewer confirmed follows from the ruling's words) and S14/S15 (the row-wide rule over rows kept under that ruling), each marked as an exception to "The upgrade is not blocked".
  • Pins: planner 82, engine 22, each failing first, and each ablation turns exactly its own pins red (dev reports 7270634803, 7271395688).
  • Checks at this head: 61 runs, 0 failed. Mergeable, clean.
  • Wording on this PR stays planner correctness.
  • Landing: Tier H (ADR) and over the size line. The seat requests approval from the governed approvers. Part of #37111; PR 2 (the write) is not started.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-warren · session_01JQwxbXyLoBzNYY1U8SNPFu

2026-11-30T07:33Z · L1 ACCEPT and hand-off · #37111 PR 1 (the read-only stored-forms census and upgrade precheck, plus the ADR-0159 D7 revision) at its current head.

  • Seat record 7271856739 (维护者速读 + 席位核对 ACCEPT), and same-head contract review PASS 7271840179.
  • The seat's steps marked in ADR D7 for the approver to accept or strike: S13, and S14/S15.
  • Checks: 61 runs, 0 failed.
  • Tier H (ADR, size): requesting approval from the governed approvers.

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 30, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 30, 2026 07:34
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 46374849787 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

分类:failure —— 按下面的日志分诊。

失败的 job(日志抽取,best effort):

  • Dogfood Regression Gate (3/3) — 失败步骤: Boot example apps and exercise real user flows

    @objectstack/dogfood:test:  FAIL   isolated  test/package-move-in.dogfood.test.ts > dogfood: POST /packages/:id/move-in, the move door (#38150) > A3 (#37468) and the set rule: flow, dataset and report
      ↳ 失败原因: @objectstack/dogfood:test: AssertionError: expected 404 to be 200 // Object.is equality
    

↳ 失败原因 是判读的关键:超时(Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言(AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError。 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

历史信号:

  • 本 PR 过去 24h 无队列失败记录(首次)。
  • 过去 24h 队列共有 11 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

Merged via the queue into main with commit 1d959b0 Nov 30, 2026
67 checks passed
@os-zhuang
os-zhuang deleted the claude/project-thread-1v5bvm branch November 30, 2026 08:07
@objectstack-fleet objectstack-fleet Bot removed the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 30, 2026
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…-apply the next major's upgrade command runs (objectstack-ai#38748)

<!-- claude-projects-attribution: {"github_login":"os-steve"} -->
_Requested by **Steve** · [project
thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9SSdM6AYsxMukn8uhMeGEh7)_

Part of objectstack-ai#37111 — PR 2 of 2 (the write half). PR 1 is objectstack-ai#38613 (merged as
`1d959b0910`). Two owed items stay, each with its reason in the table
below, so this PR does not close the card.

Clause-②: yes (widening)
Metadata-protocol: none
Skills-docs: none — stored-row ceremony, nothing an author writes
changes

## 维护者速读

-
用户能看到什么变化:升级到下一个大版本时,升级命令会把数据库里按旧写法存的表单真正迁成表单行(搬移、合并、删除内部记录表单),公开表单的两扇门在迁移前后应答不变。
-
全有或全无:只要预检还有一行拦着,升级命令一行都不写,所有行逐字节不变;写入在一个事务里做完。不能回滚事务的库上,升级命令在写任何东西之前就拒绝,点名驱动并告诉运维怎么做(换支持事务的库跑,或留在当前版本);`os
migrate stored-forms` 在这种库上也会提前说明升级会被拒。
- 独立的 `os migrate stored-forms` 仍然只读,没有 `--apply`(裁决 7142585849)。
- 要你做什么:本 PR 是 Tier H 的 draft,审核后按受管流程批准。你 2026-11-30 的裁决(7277149723)在本
PR 按规则全量落地:今天没有任何一扇门服务的表单,无论绑在哪个包,升级时都原地不动;ADR-0159 D7 单列一条写明「没有门服务」的含义。
- **需要你在批准时定**(席位 L2 7280142300
上报,不评级):上面这条拒绝意味着「默认驱动不能回滚事务、又有要搬的存量表单」的部署拿不到这个大版本,除非换库。批准本 PR
即接受这一点;否则请指示别的做法。
- 风险:写入走仓储底层(不经保存门),所以每条写入都由两门前后钉子和 ablation 守着;Tier H,draft 不转 ready。
- 卡上还剩:两条欠单写明原因留着(见下表);L2 记录 7277980228 与其 delta 7280142300、L1-b delta
7280063801 的各项已在本 PR 修好(见下)。

## What changes

- **`applyStoredFormsOf(protocol, { actor })`**
(`protocol-stored-form-apply.ts`, exported for the major's upgrade
command only). It runs the census and acts on it:
- **All or nothing.** If the precheck counts any row, it writes nothing;
every stored row stays byte-equal.
- **Order.** Each destination `form` row is written and read back at its
own address. Only then are the old rows deleted or re-saved:
    - a view item row is deleted;
- a container is re-saved without the forms that left it (through the
`form` write door's own member removal), its lists byte-equal;
    - a container left with nothing is deleted.
- **One transaction.** The `.custom` pairs the moves land in are ensured
first, before it, and stay after a rollback (an empty pair changes no
answer; the next run reuses it). The registry is healed after the
commit.
- **Refused where the database cannot roll back.** On an engine whose
default driver cannot roll a transaction back, a run that would write or
take a row throws before anything is written (no pair is ensured),
naming the driver and the operator's choice: run against a database
whose driver supports transactions, or stay on the current release. A
run with nothing to write is not refused.
  - **Idempotent.** A second run writes nothing.
- **What a moved row carries.** Its stored body, without the provenance
a container's expansion wears from the shipping package. A declared
override is written as its pair's own row (the store's runtime intent,
as the save door gives it).
- **Planner readings owed by PR 1:**
- N4 and N16: the fold reads a withdrawal the `view` list or another
pair's layer reads today, so it does not name the form newly closed.
  - N14: the pair's own item needs no `basedOn`.
  - N5: the refusal names in words why no pair id can be derived.
- **The census and `--apply` agree:**
- **A sealed destination holds the upgrade.** Every destination but a
declared override is written as an edit of the item a package ships at
the name, and the store seals a `form` a managed package ships (ADR-0131
D6). The census now reads that seal the way the run's write meets it:
such a move, or a kept `form` row the run writes because it carries a
withdrawal, holds the upgrade (cause `app_author`), naming the shipping
package, instead of planning a write the run then refuses inside its
transaction.
- **A form no door serves today is left in place by the upgrade**,
whatever package its row is bound to (maintainer ruling record
7277149723). Every plan that would move a row asks the effective `form`
read whether it lists a form of the name at the address the plan is made
at; where it does not, the move is `left_in_place` with reason
`served_by_no_door`: nothing of it moves, nothing is written, and it is
not counted. A hold the plan takes part in still stands. ADR-0159 D7
states the rule as its own bullet; `os migrate stored-forms` prints the
reason. `StoredFormLeftReason` (an exported output union) gains
`served_by_no_door`: the widening the `Clause-②` arm declares.
- **Census pins forced by the new writers:**
- `protocol.view-expansion-reconcile-call-sites.test.ts` records the
three writes, which use the `module callers` route, healed by
`healStoredFormRows`.
- `protocol.object-registry-write-through-spelling.test.ts` records the
write-through's tenth caller.
- Both files are in the File surface by claim amendment 3 (7276366326).
- **Docs.** `content/docs/deployment/stored-forms-upgrade.mdx` gains
"What the upgrade command writes", the L1 nit's wording for the fold,
the served-today rule for every address, the left-in-place sentence, the
pairs created before the transaction, the refusal on a database that
cannot roll back, and a clearing-table row for a sealed destination.
- **A rest test's budget.** The first served `view` read in a worker
loads `@objectstack/lint` lazily (`metadata-diagnostics.ts`), about 1s
on an idle box and past 5s on a loaded CI runner (Test Core 8/12 at
`5ed2329e`). In `public-form-two-type-withdrawal.test.ts` that read was
the `/meta/form` audience test's first `/meta` read. The describe now
takes the load once in `beforeAll`; the test's own reads measure 55ms.
The same file's base and head measured alike for that test (1431–1544ms
at the merge base, 845–1113ms at the head), so the timeout was not this
PR's change to the read.

## Owed by PR 2 (from objectstack-ai#38613), reconciled

| Item | Status |
|---|---|
| `pair_form` byte-equal pin (ruling 7250977204), destination drops
`overrides` | done at `68b146c3` — rest "the pair's own item (ruling
7250977204)…" |
| …and seed N11's case | done at `d8c26159` — a form no door serves
today is left in place by the upgrade (maintainer ruling of 2026-11-30):
planner, engine and rest pins (red first; ablation turns all three red);
ADR-0159 D7 sentence; one PR 1 engine pin that planned such a member as
a move now reads it left in place |
| N4 | done at `4c77a1e5` — planner "N4: a `view` row a `form` row
outranks…" (red first; ablation turns exactly it red) |
| N5 | done at `ae532d45` — planner "N5: where no pair id can be
derived…" (red first) |
| N13 / L1-b item 1 | done at `e5dd21b2` — engine "N13: the pair door's
refusals and the draft read, through the real protocol" (the earlier
pair's 409 read as that pair, the other owner's 422, a positive control,
the draft read) |
| N14 | done at `4c77a1e5` — planner "N14: …" (red first; ablation) |
| M3 through both doors | done at `3093ce7e` — rest "M3 through both
doors" (two shapes) |
| N16 | done at `4c77a1e5` — planner "a second pair's override that
withdraws the form…" (red first; ablation) |
| ③ a pair held as booted code | stays — not built this round; not
measured |
| L1 nit (fold wording) | done at `a5985f41` — the page's `kept` and
`moves` rows |
| Both-doors pin for a row served at another address | done at
`3093ce7e` — rest "a row the read serves at another address than the
package it is bound to…" (switched off and open) |
| Ruling 7265816895 step 5 | done at `e5dd21b2` — engine "a held row:
applyStoredForms writes nothing at any address" (every stored row
byte-equal; every address's served read equal before and after); rest
"all or nothing" for the two doors at one address |
| Step 6 (clearing-table row for the contested slot) | done in PR 1
(`1d959b0910`); unchanged here |
| Step 7 (a store that enforces one row per slot) | stays — not built;
the engine pins hold the contested slot before any write |
| N32 | done at `e5dd21b2` — engine "S14 over the real read…" (the first
S14 shape); the second shape's engine half is not built separately |
| N33 | done at `e5dd21b2` — engine "N33: a container member kept as
stored beside a sibling member that moves" |
| N29 | done at `e5dd21b2` — engine "the third-address shape…" |
| List-only labeling note | done at `a5985f41`; re-read after M1 and
replaced at `9ecc15b5` by the served-today rule for every address (L2
N2) |

## Last round's finding, fixed here

- **A destination the store seals** (done at `bedc74f7`): planner pin
and controls, rest pin through `listStoredFormsOf` and `--apply` (red
first: the census planned a move); ablating the census read turns the
planner, engine and rest pins red. One PR 1 engine pin planned such a
row as a move the run could not write; it now reads the hold.

## L2 record 7277980228 (FAIL at `4a67c9f2`), fixed here

| Item | Commit | Pins (red first; ablation) |
|---|---|---|
| M1 — the left-in-place rule for every plan that would move a row |
`906d10a8` | planner "a form no door serves today is left in place by
the upgrade, whatever package its row is bound to" (4 shapes + 4
controls) and "a hold stands where no door serves the row today"; rest
"…whatever package its row is bound to: …" (3 shapes, both doors 404
before and after). Red on `4a67c9f2`: planner 4, rest 3. Ablating the
census read at every plan: planner 5, engine 1, rest 4 red. |
| S2 — a kept row the run writes reads the seal | `d61a32a4` | planner
"a kept `form` row the run writes … reads the seal too" + 2 controls;
rest "the census and the run agree where the store seals a kept row the
run writes". Red on `906d10a8`: planner 1, rest 1. Ablation: exactly
those two red. |
| S3 — refuse `--apply` on an engine that cannot roll back | `85c7eebd`
| rest "on a database that cannot roll back a transaction, --apply is
refused before anything is written" (the refusal names the driver and
what to do; no pair ensured; rows byte-equal; doors unchanged) + a
control (nothing to write is not refused). Red on `d61a32a4`; ablation
turns exactly it red. No undo. |
| S1 — the ADR D7 sentence | `9ecc15b5` | its own bullet: what "no door
serves" means, apart from a withdrawn form and an internal record form,
what "its rows stay as stored" covers, cites `7277149723` |
| N1 — pairs before the transaction | `9ecc15b5` | the page and the
module header |
| N2 — the list-only paragraph | `9ecc15b5` | replaced by the
served-today rule for every address |
| N3 — `Clause-②: yes (widening)` | `9ecc15b5` | this body and the
changeset |

## L1-b delta 7280063801 and L2 delta 7280142300, fixed here

| Item | Commit | Pins (red first; ablation) |
|---|---|---|
| L1-b must-fix 1 / L2 S5 — what the environment's address reads |
`bf56df4e` (pin), `7831394d` (D7 and page) | Measured, then reported as
a fork and accepted: a form stored with no package is served by both
doors where the read seats it, under a package that ships only a list of
the name included, so the census reads every such slot at the
environment's address. Rest "a package-less form at the environment's
own address is served today where the read seats it" (0, 1 and 2
list-shipping packages: both doors serve it before, it moves, both doors
answer the same after). Ablating to "the environment only": the 1- and
2-package pins and one engine pin red, the 0-package control green. |
| L2 S4 — an unserved form does not hold at the pair door or a sealed
destination | `11338180` | planner "a form no door serves today is left
in place before a hold its move would take" (pair door; sealed
destination). Red on the previous head: 2. Ablation: exactly those 2
red. |
| L2 N5 — a row another address serves and moves | `7831394d` | the D7
sentence: such a row goes with that move |
| L2 N6 — the report names a database where the run will be refused |
`74b1cfc8` (pin made load-free at `5f0b99fe` | cli "the census report
says where the upgrade's run will be refused" + 2 controls (`runRefused`
in `--json`). Ablation: exactly the first red. |
| L2 ③ — refusing a deployment that cannot roll back | — | escalated to
the maintainer by the seat, decided at the Tier H approval; named in the
summary above. Nothing built. |

## Verification

Head `5f0b99fe`.

- **This round** (L1-b delta 7280063801, L2 delta 7280142300), at the
head's tree: the planner file 106/106 (with the two census pin files,
131/131), engine 38/38, rest 94/94, cli `stored-forms.test.ts` 3/3.
Derived gates: the same 109 commands; 108 exit 0 on the first run and
`check:test-source-alias` exit 1 on the new cli test (it reached the
stack's dynamic imports); the test now mocks those packages, and that
gate exits 0 at the head; `dispatch-gates --ran` on the final record:
109 run, 0 NOT-MEASURED. `overlap-check` at the head's tree: clean
against `origin/main` (`95a49adb80`); no open pull shares a file. The
change set is 13 paths: the 12 before plus the cli command's own test
file.

Previous round, at `9ecc15b5`:

- **That round** (L2 record 7277980228), at the head's tree: the planner
file 104/104 (with the two census pin files, 129/129), engine 38/38,
rest 91/91; metadata-protocol type-check clean. Derived gates:
`dispatch-gates --commands` derived 109 commands (the same list as last
round); all 109 exit 0, each run with `< /dev/null`; `dispatch-gates
--ran`: 109 run, 0 NOT-MEASURED. `overlap-check` at the head's tree:
clean against `origin/main` (`8426fa0c89`); no open pull shares a file.

Earlier, at `4a67c9f2`:

- **This round** (the sealed destination, the rest test's budget, the
left-in-place rule), at the head's tree:
- The three changed test files: planner 92/92, engine 38/38, rest 85/85;
metadata-protocol and CLI type-check clean.
- **Red first:** the sealed-destination planner pin and rest pin failed
on the old source (the census planned a move); the left-in-place planner
pin and rest pin failed on the old source (the census planned a move).
- **Ablations**, each with `scripts/ablation-replace.mjs`, restored to
`HEAD`:
- The census read of the store's seal: the planner pin, the PR 1 engine
pin it now reads, and the rest pin.
- The census read of the forms served today: the planner pin, the PR 1
engine pin it now reads, and the rest pin.
- The rest audience test measured 55ms with the load taken in the hook
(1974ms before, in the same file run).
- **Derived gates at `d8c26159`:** `dispatch-gates --commands` derived
109 commands; all 109 exit 0, each run with `< /dev/null`.
`dispatch-gates --ran`: 109 run, 0 NOT-MEASURED. The changeset commit
after it changes no path in the change set.
- **`overlap-check`** at `4a67c9f2`: clean against `origin/main`
(`db2273d5c4`); no open pull shares a file.
- **Earlier rounds** (head `5ed2329e`): 97 derived gates, all exit 0;
the ablations listed below each turned exactly their own pins red:
- Ignoring the precheck: exactly the 10 all-or-nothing pins (9 engine, 1
rest).
- Keeping the read's provenance on the moved body: the container
withdrawal pin.
  - Keeping an emptied container: the same pin, through its second run.
- Judging a declared override's write as an edit of the shipped item:
the base-ships-a-`form`-item pin.
  - Dropping the folded row's switch: the three fold pins.
  - N4, N16 and N14 each: exactly its own planner pin.
- Reading a row only at the package it is bound to: the two "another
address" pins.
- Planning the pair's override at the pair's own address: the two M3
pins.
- **Not measured locally, CI owns:** the CLI integration tier, the
type-check lanes, and the dogfood and live-database jobs the derivation
names as CI-only.

## Deviations

- **File surface.** The two census pin files and the ADR file were
outside the claim; claim amendment 3 (7276366326) names them. The rounds
after the claim add no path but the cli command's own test file
(`stored-forms.test.ts`). The census pins are forced (each new
stored-row writer is recorded there); the ADR file carries the D7
sentence of the 2026-11-30 ruling.
- **Two PR 1 engine pins change their expected plan.** Each planned a
row as a move that the rules of this round do not move: one into a
destination the store seals (now a hold), one a form no door serves
today (now left in place). Their reads of today are unchanged.
- **Changeset.** It names `@objectstack/metadata-protocol` and
`@objectstack/cli` (the CLI prints the new left-in-place reason); every
other change is tests and docs.
- **No `protocol-stored-form-apply.test.ts`.** The write half is pinned
over the real protocol in `objectql` and through both doors in `rest`.

🤖 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>
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…ooted code as a pair (objectstack-ai#38803)

_Requested by **Steve** · [project
thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9SSdM6AYsxMukn8uhMeGEh7)_

Part of objectstack-ai#37111 — PR 3 (the card's two remaining acceptance items). PR 1
is objectstack-ai#38613 (`1d959b0910`) and PR 2 is objectstack-ai#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 objectstack-ai#38748 left owed on objectstack-ai#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. objectstack-ai#38797 merges cleanly. objectstack-ai#38497 conflicts
in the planner test file only because its head predates objectstack-ai#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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation security size/xl tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants