Repository navigation
fix(metadata-core): the artifact door replays the form move, so pre-19 package artifacts read again (#39101) - #39120
Conversation
The door no longer refuses view-forms-to-form-items and translation-view-form-tails-to-forms by name; both replay in the ordinary window, so a pre-19 package artifact reads as the 19 package its migrated source would build. Comment-only updates in the three step-19 spec entries. Claude-Session: https://claude.ai/code/session_01WGufzivFXq32jQSCUnECPj Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzivFXq32jQSCUnECPj Co-authored-by: Claude <noreply@anthropic.com>
…ve as form items Claude-Session: https://claude.ai/code/session_01WGufzivFXq32jQSCUnECPj Co-authored-by: Claude <noreply@anthropic.com>
…iner placements answer 200) A stored old-shape container withdrawal in the package's declared override or in a dependent package does not close the form, over the replayed artifact and over the same package rebuilt at 19 alike. Reported to the seat; no PR yet. Claude-Session: https://claude.ai/code/session_01WGufzivFXq32jQSCUnECPj Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzivFXq32jQSCUnECPj Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzivFXq32jQSCUnECPj Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzivFXq32jQSCUnECPj Co-authored-by: Claude <noreply@anthropic.com>
The three packages/metadata pins that read the artifact door's answer to a view-held form now read the replayed form move. The door's module doc states what the door does with an administrator's stored row: it neither reads nor writes it. Claude-Session: https://claude.ai/code/session_01WGufzivFXq32jQSCUnECPj Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzivFXq32jQSCUnECPj Co-authored-by: Claude <noreply@anthropic.com>
Reconciles the door's SUPERSEDED_AT_THIS_DOOR tables with the subforms retirement: one table per file, the subforms fixture superseded by the form move and then the subforms delete, in registry order. The subforms entry's comment states that the artifact door replays the move. Claude-Session: https://claude.ai/code/session_01WGufzivFXq32jQSCUnECPj Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 2 package(s): 8 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 4 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 183 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 92b3bba3afa2038c51e4d849d74ee4dc13bea377 && git checkout 92b3bba3afa2038c51e4d849d74ee4dc13bea377
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 27ce3c0a0ec111a8d127395e18c04d630d57ed9c 221a2c2ab1022ea58811e313c02c684b5c51233b && git checkout -B drift-repro 27ce3c0a0ec111a8d127395e18c04d630d57ed9c && git merge --no-ff 221a2c2ab1022ea58811e313c02c684b5c51233b
node scripts/docs-audit/affected-docs.mjs --json 27ce3c0a0ec111a8d127395e18c04d630d57ed9c
|
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzivFXq32jQSCUnECPj Contract-review-claim: session_01WGufzivFXq32jQSCUnECPj · head 021c4b0 · 2026-12-02T10:19Z |
…f the forms its replay deleted Claude-Session: https://claude.ai/code/session_01WGufzivFXq32jQSCUnECPj Co-authored-by: Claude <noreply@anthropic.com>
… the tails that stay Claude-Session: https://claude.ai/code/session_01WGufzivFXq32jQSCUnECPj Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzivFXq32jQSCUnECPj Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzivFXq32jQSCUnECPj Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzivFXq32jQSCUnECPj Co-authored-by: Claude <noreply@anthropic.com>
…root whose views hold a form Claude-Session: https://claude.ai/code/session_01WGufzivFXq32jQSCUnECPj Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzivFXq32jQSCUnECPj Co-authored-by: Claude <noreply@anthropic.com>
…eferencing plugin graph Claude-Session: https://claude.ai/code/session_01WGufzivFXq32jQSCUnECPj Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzivFXq32jQSCUnECPj Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzivFXq32jQSCUnECPj Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzivFXq32jQSCUnECPj Contract-review-claim: session_01WGufzivFXq32jQSCUnECPj · head 221a2c2 · 2026-12-02T14:24Z |
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzivFXq32jQSCUnECPj Contract reviewServed-tier: Delta review. The earlier round read head Check-runs on this head, read by this review: 62 success, 15 skipped, 0 failed, none in progress. M1: out of scope for this PR by maintainer ruling; tracked by the seat. S1: closed ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentNo must-fix, no should-fix.
The other three
Notes, not graded:
The enforcing tests. The metadata-core file pins the deleted form's tails in all three artifact shapes through both gates, the control (a left form's tail and another package's tail stay refused), a form-less root with a self-referencing graph returned by reference, and a root with both. The cells agree with the docblock and the changeset. Implemented-by: VERDICT: PASS |
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzivFXq32jQSCUnECPj Final green head for L1 · 2026-12-02T14:28Z · zone osa-build
|
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm L1 review — ACCEPT on
|
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzivFXq32jQSCUnECPj Landing · 2026-12-02T14:31Z · zone osa-build
|
Fixes #39101
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
The artifact forward door (
applyArtifactForwardConversions,packages/metadata-core/src/artifact-forward-conversion.ts) now replays the protocol-19 form move,view-forms-to-form-items, and its translation companion,translation-view-form-tails-to-forms, inside its ordinary versioned window (label half, per-entryretiredAfterhalf, major-step half, undeclared floor), the same way it replays every other retired entry. Before this change both were refused here by name, so the strict parse (ArtifactPackageSchema, the entry gate behindresolveArtifactPackageEntries) refused a pre-19 package whose views still heldform/formViewswithINVALID_ARTIFACT_PACKAGE_ENTRY.excludeConversionIdsnow readDEFAULT_FLIPS_NOT_REPLAYED_HEREalone, which is kept unchanged.STORED_ROWS_NOT_REWRITTEN), and how an administrator's stored withdrawal is judged against the replayedformitem by the public form doors, exactly as for the same package rebuilt at 19.title/submitBehaviortails only to aforms[]item, so for an internal record form the move deleted it leaves the tail underobjects.OBJECT._views.KEYand reports it as left in place, asking for it to be deleted; the 19 strict parse refuses that tail, which would refuse the whole package again. Within one replay of one root, the door now deletes exactly the tails the companion reported left in place whose form the same replay's move deleted, read off the move's own(removed)notices and the companion's report, with one conversion notice per deleted tail (deleteTailsOfDeletedForms). A tail whose form the move left inviews[], or that names a form the package does not serve, is untouched and still refused. Nopackages/speccode changed for this.holdsViewFormsasks the projection whether any view of the root serves a form or holds form content it cannot read; where none does, the move has nothing to move or report, so the door leaves it out for that root. The move reads the whole root fortype: 'form'action targets, and the boot's own definition (AppPlugin's{ ...manifest, ...collections }) is a root this door converts and can carry live plugin instances underplugins, which that read must not walk: without this,os serve objectstack.config.ts --devon a config with a top-level list view never became ready (Test Core (1/12)one94d8671b5,serve-config-boot-residual.integration.test.tsrow 4).overrides-bearing view form arrives as aformitem namedOBJECT.KEY; an internal record-slot form with no link, no action and no overrides is removed, asos migrate meta --from 18removes it; translation tails move from_views.KEYtoforms['OBJECT.KEY']. A form the move leaves in place (for example one bound to another object) stays inviews[]and is still refused by the strict parse with its prescription. A 19 body comes back by reference.view-forms-to-form-items,translation-view-form-tails-to-forms,form-view-modal-size-removed,form-view-subforms-removed) so their docblocks say the artifact forward door replays the move.packages/spec:view-forms-to-form-itemsfinds the targets oftype: 'form'actions by reading the whole stack, and that read (formActionTargets) now walks each object once, from the shallowest depth it is reached at (aWeakMapof the depth each object was walked from). A root that holds a view form and also refers back to itself, such as a boot definition carrying live plugin instances, converts in one pass; before, the read walked every path to depth 40. The targets found are the same: an object is walked again only when it is reached at a smaller depth, so every object within the bound is read from its shallowest path. No schema, fixture or other entry changed.@objectstack/metadata-corepatch,@objectstack/specpatch.Serial meet with #39061: it landed on
mainfirst (9da8804fcc); this branch reconciled in merge021c4b079a.mainwas merged again after #39113 landed, in221a2c2ab1, with no conflict. Its superseded-fixture table andafterRetiringEntrieshelper are kept as written there, one table per test file, and theform-view-subforms-removedentry it added received the same comment-only docblock fix as the other three.Why
A published package version cannot be rebuilt at rest. Since the protocol-19 strict parse, such a version could not be read, installed or upgraded from on a 19 runtime at all, because the door that exists to carry released artifacts forward refused the one move they all need.
Tests
New:
packages/metadata-core/src/artifact-forward-conversion-39101-pre19-package-forms.test.ts(28 tests): a container with a list, a default internal form and a publicformViewsentry plus translation tails, in three artifact shapes (stack definition, option-B package body, flat package body) across five windows (^18.6.0and^19.0.0-next.2on the runtime label, plus later labels), each asserting the converted artifact passesArtifactPackageSchema, the movedformitem, the removed internal form, the moved tails and the notice order. Also: the premise cells (the unconverted artifact is refused), a 19 body by reference, a switched-off form, and a cross-bound form that stays and is still refused. Tails: in each of the three shapes, a^18.6.0artifact whose internal default form has a translatedtitleand asubmitBehaviortail passesArtifactPackageSchemaandObjectStackDefinitionSchema, the tails are gone and a notice names each; control: in the same replay, the tails of a cross-bound form left inviews[]and of a form the package does not serve stay as written and the entry gate still refuses them. A definition whose views hold no form and which carries a self-referencing plugin graph converts at once, with no notice, by reference; a^18.6.0root that holds the public form AND carries a self-referencing plugin graph converts at once, the form moves as in the canonical package, and the graph comes back as it was.packages/spec/src/conversions/entries/19/view-forms-to-form-items.test.ts, one new cell: a stack whoseplugins[]refers back to itself on several keys, with the openingtype: 'form'action reachable only through that graph, beside aformViews.createrecord form: the target is found (the form moves tofmv_case.create) andpluginscomes back by reference.packages/rest/src/public-form-39101-artifact-replay-withdrawal.test.ts(36 tests): bootsObjectKernelwith the ObjectQL plugin over a SQL store, registers a pre-19 artifact through the engine'smanifestservice (artifact door, then the strict parse, thenregisterApp), and reads both public form doors (GET /api/v1/forms/:slug,POST /api/v1/forms/:slug/submit). Controls: with no stored withdrawal the replayed form is served at its link and its submit reaches the object; the internal default-slot form did not arrive as aformitem. Withdrawal cells: an old-shape withdrawal stored as an item row (in the package's declared override, bound to the read-only package itself, in no package, in a dependent package) or as a container row (bound to the read-only package itself, in no package), withdrawn either byallowAnonymous: falseor byenabled: false, keeps the address closed (404) on both doors, nothing is written and the stored row is unchanged; the four rows outside an installed package are also pinned stored before the artifact registers. The same rows over the package rebuilt at 19 are the control.Flipped pins (test-only,
packages/metadata), each formerly asserting the door's refusal:plugin-artifact-view-container-object.test.ts: a container that still holdsform/formViewsregisters its lists, its form moved by the replay.plugin-unbound-form-predicate-roots.test.ts: the replayed artifact registers and the unbound predicate warning names the moved form's path; the current-floor refusal cell is kept.plugin-artifact-forward-conversion-retired-after.test.ts: the view-form cell registers twice and the moved form exists, with its notice.packages/metadata-core, the two existing door test files read the moves as replayed in every window the door opens.Ablation of the tail deletion (the door's call to
deleteTailsOfDeletedFormsreplaced by returning the converted root, the metadata-core file run, restored; restored blob matches the head): 4 red, 22 green, the red being the three shape cells and the control. A second ablation dropping only the deleted-form condition (so every reported tail is deleted) reds the control alone (1 red, 25 green).Ablation of the walk-once read (the depth check and record removed from
formActionTargets,@objectstack/specrebuilt for the door test, restored; restored file equal to the committed one): the spec cell and the metadata-core cell with the public form beside the plugin graph both never finish (each killed after 90 s, exit 137, no verdict).Ablation of the view-form condition (the root's
excludeConversionIdsno longer adding the move when no view holds a form): the plugin-graph cell never finishes (killed after 90 s, no verdict), restored; the CLI file above fails at row 4 the same way with the condition absent and passes 14 of 14 with it.Ablation of the form move at the door, measured before the tail deletion and the second withdrawal arm were added (reverted the door to its by-name refusal of the two moves, rebuilt
@objectstack/metadata-core, ran both new files, restored; restored blob matches the head):INVALID_ARTIFACT_PACKAGE_ENTRYat register; green are the premise cell and the 7 native-19 control cells.Acceptance notes
packages/metadataedits are test-only flips of the old refusal pins; nopackages/metadatasource changed.manifestservice's register path reads an artifact's declaredengines.protocolrange on the artifact's top level only, so the rest test uses the top-level shape ({...manifest fields, packages}).mainadvanced 5 commits after the reconcile merge; no conflict was attempted locally.Verification
Read first, by risk:
packages/metadata-core/src/artifact-forward-conversion.ts: the per-rootreplayclosure anddeleteTailsOfDeletedForms/formsTheMoveDeletedat the end of the file (which tails are deleted), then the removed refusal list, with the closed set /excludeConversionIdsnow readingDEFAULT_FLIPS_NOT_REPLAYED_HERE.packages/rest/src/public-form-39101-artifact-replay-withdrawal.test.ts: the withdrawal table and the native-19 control.packages/metadata/src/plugin-artifact-view-container-object.test.ts: the flipped registration count.Two-minute check:
pnpm --filter @objectstack/metadata-core exec vitest run --maxWorkers=2 src/artifact-forward-conversion-39101-pre19-package-forms.test.tsafter building the package; expect28 passed.All readings below are on the merge head
221a2c2ab1unless a line names another.Test suites
@objectstack/metadata-corevitest: 31 files, 1159 passed.@objectstack/metadatavitest (full suite): 84 files, 2922 passed.@objectstack/restvitest, everypublic-form-*andstored-forms-*file (the new one, the kept-reader neighbours and fix(metadata-protocol): withdrawal reads in every package binding #39113's): 20 files, 369 passed; the full run, 456 files, 9599 passed, 377 skipped, one94d8671b5.@objectstack/clitest/serve-config-boot-residual.integration.test.ts: 14 passed.@objectstack/specvitestsrc/conversions: 28 files, 871 passed;@objectstack/spectypecheck exit 0.@objectstack/spec,@objectstack/metadata-core(src andtsconfig.test.json),@objectstack/metadata(src/**/*, tests included),@objectstack/rest(includingcheck:test-typecheck).@objectstack/cliand its dependencies, the@objectstack/restand@objectstack/metadatadependencies and@objectstack/metadata-core: 70 tasks OK.Derived gate families
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 89 families at221a2c2ab1; all 89 ran with exit 0.--ranreconciliation: 89 derived, 89 run, 0 NOT-MEASURED, 0 UNRUN.pnpm lintand the full farm are CI's.Human Minimum
packages/specholds no runtime logic.pnpm lintpasses. (No formatter ran;pnpm lintis CI's run.)main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01WGufzivFXq32jQSCUnECPj