Repository navigation
fix(cli): the protocol-19 switch writes moved stored forms without data, and never switches over a form the form schema refuses - #39478
objectstack-fleet[bot] wants to merge 10 commits into
Conversation
…rms without the old data binding
The stored-form ceremony moved each form "with its body as written", which
kept an 18.x Studio save's `data: { provider: 'object', object }` binding: a
`form` item refuses `data` by name, so every moved form was served invalid.
The move now drops a plain object binding (the source conversion's own test),
and the census judges every body the run writes or keeps with the runtime's
`form` schema: a refused body refuses the run before anything is written,
and the switch is never recorded over one. The action for a kept row names
its package's door (`?package=`).
Claude-Session: https://claude.ai/code/session_016WV4cxRh6Sbfo2Xm49JPx6
Co-authored-by: Claude <noreply@anthropic.com>
…n name, as the runtime door does Claude-Session: https://claude.ai/code/session_016WV4cxRh6Sbfo2Xm49JPx6 Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cxRh6Sbfo2Xm49JPx6 Co-authored-by: Claude <noreply@anthropic.com>
… `data`, and writes nothing under a name the form schema refuses The #37112 pin for a package-less container's member moved it to `OBJECT.intake.contact`, a name ADR-0159 D3 refuses: the row it wrote was served invalid. It now pins the census naming that body and the ceremony refusing before any write; the stored-withdrawal move pins the written row without the old `data` binding. `runSwitch` mirrors the command's verdict. Claude-Session: https://claude.ai/code/session_016WV4cxRh6Sbfo2Xm49JPx6 Co-authored-by: Claude <noreply@anthropic.com>
…ata`, the shape an 18.x Studio save stores Claude-Session: https://claude.ai/code/session_016WV4cxRh6Sbfo2Xm49JPx6 Co-authored-by: Claude <noreply@anthropic.com>
…ol-19 form schema refuses Claude-Session: https://claude.ai/code/session_016WV4cxRh6Sbfo2Xm49JPx6 Co-authored-by: Claude <noreply@anthropic.com>
…lection (check:test-source-alias) Claude-Session: https://claude.ai/code/session_016WV4cxRh6Sbfo2Xm49JPx6 Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 2 package(s): 28 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 14 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 48 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin d37ea8c701a2c2e963616f6a9008844d40c7db1a && git checkout d37ea8c701a2c2e963616f6a9008844d40c7db1a
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin bbc64113715561ef2f58039eae435ccd06e963bb b063f1895915653b05abab4169799e87912d7703 && git checkout -B drift-repro bbc64113715561ef2f58039eae435ccd06e963bb && git merge --no-ff b063f1895915653b05abab4169799e87912d7703
node scripts/docs-audit/affected-docs.mjs --json bbc64113715561ef2f58039eae435ccd06e963bb
|
…for a package-bound row, and a refused container form name gets the remedies that exist `os migrate meta --stored` printed `PUT /api/v1/meta/TYPE/NAME` for a row served invalid; the save door addresses a package's row only by `?package=`, so the printed fix was refused for every package-bound row. A form the switch refuses because its served name is `OBJECT.CONTAINER.KEY` (ADR-0159 D3) cannot be fixed by correcting the body: the upgrade renames no form. Its action now names the two remedies that exist on the running release: delete the container, or save its forms again in a container named after the object, bound to the package that ships it or its customization package. Claude-Session: https://claude.ai/code/session_016WV4cxRh6Sbfo2Xm49JPx6 Co-authored-by: Claude <noreply@anthropic.com>
…medy Claude-Session: https://claude.ai/code/session_016WV4cxRh6Sbfo2Xm49JPx6 Co-authored-by: Claude <noreply@anthropic.com>
…y that works, for any container whose package does not own its object The own-name arm applies wherever the container's package is not the one that owns its object (package-less, a customization pair, any other package), so re-saving the container in the pair does not change the name. The action now says: delete the container, re-create each form as its own `OBJECT.KEY` item, re-point what opened the old name, run again. A unit and a both-doors case pin a container bound to another package. Claude-Session: https://claude.ai/code/session_016WV4cxRh6Sbfo2Xm49JPx6 Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4czfEjskBjZM6jhKWFR 2026-12-04T02:49Z · L1-a verdict: REWORK at head 席位核对What holds in the delta.
Must-fix: the new remedy text deletes more than it tells the admin to re-create. The D3 action now reads: delete the container ( Fix, either way, in the action text and in the changeset bullet "A form whose name cannot move says what can be done":
(a) is the smaller remedy, and it is what the ruled option A ("refusal unchanged, remedy names what works") reads as: the remedy should not cost data the refusal did not touch. Whichever you choose, add a case whose container carries a Gates. At read time: 12 success, 20 skipped, 27 pending. This verdict does not depend on them. The next round needs a final green head. Landing. This stays held for Elon's ruling on #39393, whatever the verdict, as you noted. I'll re-read the remedy delta when the next head is announced. |
repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4cxRh6Sbfo2Xm49JPx6
Requested by Elon · project thread
Part of #39393 — this PR lands the moved-form body (
datadropped), the census verdict, and package-named fix lines in both the switch andos migrate meta --stored. Two things stay open on the card: the flattened 18.6 overlay row (K4), and the maintainer's decision on forms whose served name the 19 naming rule refuses (this PR refuses them, option A). Details under Acceptance notes.Clause-②: no
Metadata-protocol: none
维护者速读
What changes
data(protocol-stored-form-bodies.ts, new). An 18.x Studio save stores each form's binding asdata: { provider: 'object', object }; aformitem refusesdataby name, so every form the switch moved was servedvalid: false. The move now drops a plain object binding, with the same test the source conversionview-forms-to-form-itemsapplies. Any otherdatais kept and refused by the verdict below.servedInvalidVerdict('form', …):StoredFormCensus.bodyRefusals.applyStoredFormsthrows before any write when a body it would write is refused.os migrate protocol --to 19(preview and--apply) exits 1 while one stands,censusVerifiesSwitchnever records the switch over one, andos migrate stored-formsis no longer green over one (canSwitch: falsein--json).PUT /api/v1/meta/form/NAME?package=PKGfor a keptformrow, the form that QA run · upgrade:18.6.0-to-19.0.0-next.4 (2/2) · e009d815 · 2026-12-03 · 0 PASS / 1 PARTIAL / 1 FAIL #39391 D2 measured as the only one the door accepts.os migrate meta --stored's fix line (servedInvalidFix,stored-migration.ts) does the same for every row saved in a package, of any type.OBJECT.CONTAINER.KEY(the runtime door's own-name arm,isAnotherPackagesObject). The upgrade renames no form, and re-saving the container in another package does not change the name. The action says to delete the container on the running release (itsDELETEdoor, with?package=where it is bound), re-create each form as its ownOBJECT.KEYitem, re-point what opened the old name, and run again.formBodyOf,destinationRowandswitchedOffmoved fromprotocol-stored-form-apply.tsinto the new module, because the census (protocol-stored-form-migration.ts, 1,903 lines) must compute the very body the ceremony writes, and the ceremony imports the census. Keeping them inapplywould make a cycle, and the 1,000-line rule keeps the new concern out ofmigration.Tests
packages/metadata-protocol/src/protocol-stored-form-39393.test.ts(new, 10 cases): the written body keeps nodataandFormSchemaaccepts it; a non-plain binding is named; a package-less container named apart from its object, and a container bound to a package that does not own its object, are refused atnamewith the delete door and theOBJECT.KEYremedy; a kept row withdatais named with?package=; a kept row that takes a withdrawal is written withoutdata;os migrate meta --stored's fix line names?package=for a package-bound row (control: none for a package-less row).packages/rest/src/stored-forms-switch-37112.test.ts(through both doors on a real engine and SQL store): a new case moves a stored container's form (formViewswithdata, the D2 shape) and reads the stored row back with nodata. The package-less-container case is triaged (see Acceptance notes), and a container bound to an installed package that does not own the object is refused with nothing written.runSwitchnow mirrors the command's verdict.packages/cli/src/commands/migrate/stored-forms.test.ts:censusVerifiesSwitchis false over a refused kept row (control: true without one).Ablations (each red on mutation, green on restore; metadata-protocol rebuilt and checked in dist both ways where rest reads it)
movedFormBodywithout the strip): rest 4 failed / 11 passed (the container move, the view-item move, idempotence, the name case); unitthe written row keeps no datared. Restored: 15/15.a container stored under a name apart from its object…red (1 failed / 14 passed). Restored and rebuilt: dist marker absent, tree clean.?package=dropped from the door: unit…with the door of the package it is saved inred (1 failed / 6 passed).censusVerifiesSwitchwithout the verdict: clia kept form row the schema refuses…red (1 failed / 4 passed).?package=dropped fromservedInvalidFix: unita row saved in a package: the fix line…red (1 failed / 8 passed).Suites at b063f18
@objectstack/metadata-protocolfull: 387 files passed, 24008 tests passed.@objectstack/restsrc/stored-forms-switch-37112.test.tsandsrc/public-form-two-type-withdrawal.test.ts: 121 passed. The full--project localrun (451 files, 9370 tests) was green at 2e8f486; this round changes no rest source.@objectstack/clisrc/commands/migrate/stored-forms.test.tsandmeta.stored-served-invalid.test.ts: 8 passed. The full--project unitlayer is NOT MEASURED locally (past the foreground limit); CI's Test Core runs it.typecheckof metadata-protocol, rest and cli: exit 0.dispatch-gates --ran: 73 derived, 72 run (all exit 0), 1 NOT-MEASURED (check:dual-build-cjs-loads: prerequisite needs a whole-workspace build).Acceptance notes
OBJECT.CONTAINER.KEY. ADR-0159 D3 refuses that name, and ruled question 2 says the migration renames no form. This PR refuses the switch over such a form (option A of the seat's analysis on the card) and writes nothing; QA run · smoke:npm-19.0.0-next.4 (24/24) · e009d815 · 2026-12-03 · 21 PASS / 1 PARTIAL / 2 FAIL / 0 BLOCKED / 0 NOT-RUN #39390 O-N7's write of a row served invalid no longer happens. The action names the remedy that works: delete the container on the running release, re-create each form as its ownOBJECT.KEYitem, re-point what opened the old name, and run again. The existing Major 19:viewis lists only, the old form shapes are refused with a prescription, and the upgrade command converts stored forms, then switches (ADR-0159, card ⑤b) #37112 case that movedfsw_inquiry.intake.contactpinned that defective write; it now pins the refusal.os migrate meta --stored's fix line (servedInvalidFix) now names?package=for a package-bound row of any type. The save door (meta-item-write-routes.ts) binds the saved row to?package=for every type; QA run · upgrade:18.6.0-to-19.0.0-next.4 (2/2) · e009d815 · 2026-12-03 · 0 PASS / 1 PARTIAL / 1 FAIL #39391 D2 measured it forform.{object, viewKind: 'form', type, sections}, noconfig) still holds the switch. The refusal comes fromprojectViewFormsinpackages/spec, and the remedy text comes fromprotocol-form-reads.ts. Both are outside this claim, so K4 is not done here.stored-migration.ts(servedInvalidFixonly) were added to the claim by amendment 7398253539.origin/mainis 13 or more commits past this branch's last merge (5c00c57). dispatch-gates reports that none of them touch what its answer derives from, and overlap-check merges clean.Verification
Read first (by risk):
packages/metadata-protocol/src/protocol-stored-form-bodies.ts:withoutPlainObjectBindingandstoredFormBodyRefusals.packages/metadata-protocol/src/protocol-stored-form-apply.ts: the guard before any write, and thekeepbranch that now goes throughplannedFormWrite.packages/cli/src/commands/migrate/protocol.ts:censusVerifiesSwitchand the--applyrefusal branch.Two-minute check:
pnpm --filter @objectstack/metadata-protocol build && pnpm --filter @objectstack/rest exec vitest run src/stored-forms-switch-37112.test.tsshows 15 passed, includinga stored container's form moves as a form row without the old data binding.Generated by Claude Code