Skip to content

fix(metadata-core): the artifact door replays the form move, so pre-19 package artifacts read again (#39101) - #39120

Merged
objectstack-fleet[bot] merged 20 commits into
mainfrom
claude/issue-39101-artifact-door-form-move
Dec 2, 2026
Merged

objectstack-fleet[bot] merged 20 commits into
mainfrom
claude/issue-39101-artifact-door-form-move

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #39101

Clause-②: no
Metadata-protocol: none

维护者速读

  • 在新版运行时上读取、安装或升级协议 19 之前打包的软件包时,写在视图里的表单(含公开表单链接)会被自动挪成独立表单,被删掉的内部新建/编辑表单的翻译标题和提交后提示也一并删掉,整包不再被拒收;用户无须重新打包。
  • 属于"表单从视图中独立出来"这次迁移的收尾,替已发布旧版软件包的管理员解决升级后整包读不进来的问题。
  • 若有误,碰到的是安装旧版软件包的管理员,表现为某个表单缺失或该包仍被拒收;本改动可直接撤回,撤回后回到整包拒收的现状。
  • 无

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-entry retiredAfter half, 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 behind resolveArtifactPackageEntries) refused a pre-19 package whose views still held form / formViews with INVALID_ARTIFACT_PACKAGE_ENTRY.

  • The by-name refusal list for the two type moves is gone; the door's closed set and its excludeConversionIds now read DEFAULT_FLIPS_NOT_REPLAYED_HERE alone, which is kept unchanged.
  • The module doc gains a section saying why the move replays here, what it does not touch (stored rows: STORED_ROWS_NOT_REWRITTEN), and how an administrator's stored withdrawal is judged against the replayed form item by the public form doors, exactly as for the same package rebuilt at 19.
  • The translation tails of a form the replay deleted. The companion moves a form's title / submitBehavior tails only to a forms[] item, so for an internal record form the move deleted it leaves the tail under objects.OBJECT._views.KEY and 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 in views[], or that names a form the package does not serve, is untouched and still refused. No packages/spec code changed for this.
  • The move runs only over a root whose views hold a form. holdsViewForms asks 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 for type: '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 under plugins, which that read must not walk: without this, os serve objectstack.config.ts --dev on a config with a top-level list view never became ready (Test Core (1/12) on e94d8671b5, serve-config-boot-residual.integration.test.ts row 4).
  • What the replay produces, measured in the new tests: a public, action-targeted or overrides-bearing view form arrives as a form item named OBJECT.KEY; an internal record-slot form with no link, no action and no overrides is removed, as os migrate meta --from 18 removes it; translation tails move from _views.KEY to forms['OBJECT.KEY']. A form the move leaves in place (for example one bound to another object) stays in views[] and is still refused by the strict parse with its prescription. A 19 body comes back by reference.
  • Comment-only edits in four protocol-19 entries (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.
  • One code change in packages/spec: view-forms-to-form-items finds the targets of type: 'form' actions by reading the whole stack, and that read (formActionTargets) now walks each object once, from the shallowest depth it is reached at (a WeakMap of 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.
  • Changesets: @objectstack/metadata-core patch, @objectstack/spec patch.

Serial meet with #39061: it landed on main first (9da8804fcc); this branch reconciled in merge 021c4b079a. main was merged again after #39113 landed, in 221a2c2ab1, with no conflict. Its superseded-fixture table and afterRetiringEntries helper are kept as written there, one table per test file, and the form-view-subforms-removed entry 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 public formViews entry plus translation tails, in three artifact shapes (stack definition, option-B package body, flat package body) across five windows (^18.6.0 and ^19.0.0-next.2 on the runtime label, plus later labels), each asserting the converted artifact passes ArtifactPackageSchema, the moved form item, 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.0 artifact whose internal default form has a translated title and a submitBehavior tail passes ArtifactPackageSchema and ObjectStackDefinitionSchema, the tails are gone and a notice names each; control: in the same replay, the tails of a cross-bound form left in views[] 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.0 root 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 whose plugins[] refers back to itself on several keys, with the opening type: 'form' action reachable only through that graph, beside a formViews.create record form: the target is found (the form moves to fmv_case.create) and plugins comes back by reference.
  • packages/rest/src/public-form-39101-artifact-replay-withdrawal.test.ts (36 tests): boots ObjectKernel with the ObjectQL plugin over a SQL store, registers a pre-19 artifact through the engine's manifest service (artifact door, then the strict parse, then registerApp), 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 a form item. 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 by allowAnonymous: false or by enabled: 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 holds form / formViews registers 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.
  • In 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 deleteTailsOfDeletedForms replaced 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/spec rebuilt 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 excludeConversionIds no 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):

  • metadata-core new file: 17 red, 5 green. Green are the 2 premise cells and the 3 "19 body by reference" cells; every replay cell went red.
  • rest new file: 12 red, 8 green. Red are the 2 controls, the 6 withdrawal cells and the 4 seed-first cells, each with INVALID_ARTIFACT_PACKAGE_ENTRY at register; green are the premise cell and the 7 native-19 control cells.

Acceptance notes

  • Surface: the packages/metadata edits are test-only flips of the old refusal pins; no packages/metadata source changed.
  • Observation, not filed: the manifest service's register path reads an artifact's declared engines.protocol range on the artifact's top level only, so the rest test uses the top-level shape ({...manifest fields, packages}).
  • main advanced 5 commits after the reconcile merge; no conflict was attempted locally.

Verification

Read first, by risk:

  1. packages/metadata-core/src/artifact-forward-conversion.ts: the per-root replay closure and deleteTailsOfDeletedForms / formsTheMoveDeleted at the end of the file (which tails are deleted), then the removed refusal list, with the closed set / excludeConversionIds now reading DEFAULT_FLIPS_NOT_REPLAYED_HERE.
  2. packages/rest/src/public-form-39101-artifact-replay-withdrawal.test.ts: the withdrawal table and the native-19 control.
  3. 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.ts after building the package; expect 28 passed.

All readings below are on the merge head 221a2c2ab1 unless a line names another.

Test suites
  • @objectstack/metadata-core vitest: 31 files, 1159 passed.
  • @objectstack/metadata vitest (full suite): 84 files, 2922 passed.
  • @objectstack/rest vitest, every public-form-* and stored-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, on e94d8671b5.
  • @objectstack/cli test/serve-config-boot-residual.integration.test.ts: 14 passed.
  • @objectstack/spec vitest src/conversions: 28 files, 871 passed; @objectstack/spec typecheck exit 0.
  • typecheck exit 0, all four on the merge head: @objectstack/spec, @objectstack/metadata-core (src and tsconfig.test.json), @objectstack/metadata (src/**/*, tests included), @objectstack/rest (including check:test-typecheck).
  • turbo build of @objectstack/cli and its dependencies, the @objectstack/rest and @objectstack/metadata dependencies and @objectstack/metadata-core: 70 tasks OK.
Derived gate families

node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack derived 89 families at 221a2c2ab1; all 89 ran with exit 0. --ran reconciliation: 89 derived, 89 run, 0 NOT-MEASURED, 0 UNRUN. pnpm lint and the full farm are CI's.

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic.
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; pnpm lint passes. (No formatter ran; pnpm lint is CI's run.)
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec touched: its generated artifacts are regenerated and committed.
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English.
  • The Before Submitting list in CONTRIBUTING.md is done.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WGufzivFXq32jQSCUnECPj

claude added 10 commits December 2, 2026 08:51
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>
…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>
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>
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>
@github-actions github-actions Bot added size/l 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 Dec 2, 2026
@github-actions

github-actions Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 2 package(s): @objectstack/metadata-core, @objectstack/spec, touching 14 documentable anchor(s). ⚠️ 3 changed file(s) yielded no anchor (packages/spec/src/conversions/entries/19/form-view-modal-size-removed.ts, packages/spec/src/conversions/entries/19/form-view-subforms-removed.ts, packages/spec/src/conversions/entries/19/translation-view-form-tails-to-forms.ts), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

8 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/ai/skills-reference.mdx (via REMOVED (symbol, a top-level const object))
  • content/docs/protocol/kernel/i18n-standard.mdx (via submitBehavior (literal, a string literal in FORM_TAIL_KEYS))
  • content/docs/protocol/objectql/query-syntax.mdx (via REMOVED (symbol, a top-level const object))
  • content/docs/protocol/objectql/security.mdx (via REMOVED (symbol, a top-level const object))
  • content/docs/protocol/objectui/actions.mdx (via submitBehavior (literal, a string literal in FORM_TAIL_KEYS))
  • content/docs/ui/forms.mdx (via submitBehavior (literal, a string literal in FORM_TAIL_KEYS))
  • content/docs/ui/public-data-collection.mdx (via submitBehavior (literal, a string literal in FORM_TAIL_KEYS))
  • content/docs/ui/translations.mdx (via submitBehavior (literal, a string literal in FORM_TAIL_KEYS))

⛔ 4 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/v15.mdx (via REMOVED (symbol, a top-level const object))
  • content/docs/releases/v17/17-1.mdx (via submitBehavior (literal, a string literal in FORM_TAIL_KEYS))
  • content/docs/releases/v17/17-7.mdx (via submitBehavior (literal, a string literal in FORM_TAIL_KEYS))
  • content/docs/releases/v17/index.mdx (via submitBehavior (literal, a string literal in FORM_TAIL_KEYS))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • 3 changed file(s) yielded no anchor (packages/spec/src/conversions/entries/19/form-view-modal-size-removed.ts, packages/spec/src/conversions/entries/19/form-view-subforms-removed.ts, packages/spec/src/conversions/entries/19/translation-view-form-tails-to-forms.ts) — pages documenting those are invisible to this run
  • the SDK route bridge reached 71 of 254 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 — 183 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 27ce3c0a0ec111a8d127395e18c04d630d57ed9c → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 92b3bba3afa2038c51e4d849d74ee4dc13bea377 — the merge of head 221a2c2ab1022ea58811e313c02c684b5c51233b into base 27ce3c0a0ec111a8d127395e18c04d630d57ed9c, 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 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

⚠️ 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 27ce3c0a0ec111a8d127395e18c04d630d57ed9c → 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@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>
@github-actions github-actions Bot added size/xl and removed size/l labels Dec 2, 2026
…root whose views hold a form

Claude-Session: https://claude.ai/code/session_01WGufzivFXq32jQSCUnECPj
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzivFXq32jQSCUnECPj

Contract-review-claim: session_01WGufzivFXq32jQSCUnECPj · head 221a2c2 · 2026-12-02T14:24Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzivFXq32jQSCUnECPj

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 221a2c2ab1022ea58811e313c02c684b5c51233b
Local-runs: none
Scope: packages/spec/src/conversions/entries/19/form-view-modal-size-removed.ts, packages/spec/src/conversions/entries/19/form-view-subforms-removed.ts, packages/spec/src/conversions/entries/19/translation-view-form-tails-to-forms.ts, packages/spec/src/conversions/entries/19/view-forms-to-form-items.ts + packages/metadata-core/src/artifact-forward-conversion.ts, packages/metadata-core/src/artifact-forward-conversion-39101-pre19-package-forms.test.ts, packages/spec/src/conversions/entries/19/view-forms-to-form-items.test.ts, packages/rest/src/public-form-39101-artifact-replay-withdrawal.test.ts
Security-touching: yes
Rule-change-verified: none

Delta review. The earlier round read head 021c4b079ac22b8238faaee94e624fee53e665f0; this one reads the PR's own files as they changed from that head to this one, and the whole net diff against main (15 files). Read: card #39101 with its three newer comments (claim amendments 7342504316 and 7345731976, reports 7345675828 and 7348451047), the PR body, the check-runs on this head. Nothing was built or run.

Check-runs on this head, read by this review: 62 success, 15 skipped, 0 failed, none in progress. Check Changeset concluded success with both changesets present.

M1: out of scope for this PR by maintainer ruling; tracked by the seat.

S1: closed

① Derived judgments

  • The tails of a form the replay deleted. Within one replay of one root the door now deletes a title or submitBehavior tail when two things both hold: the companion entry reported that tail left in place, and the tail's form is one the same replay's move deleted. Right: it is the edit the companion's own report asks for, and the published version has no author to make it. One notice per deleted tail, under the companion's id, located under the body like every other notice. An entry left with label or description keeps those keys, which the 19 schema admits; an emptied entry and an emptied _views group are removed.
  • What stays refused, by decision. A tail whose form the move left in views[], and a tail naming a form the root does not serve (another package's), are untouched and meet the strict parse. Right as the loud direction; the docblock and the changeset both say so. A package that only translates another package's form therefore still needs a rebuild.
  • The view-form precondition. The door excludes the move's id for a root none of whose views projects a form or holds unreadable form content. Over exactly those roots moveForms returns the stack by reference and reports nothing (every view takes the forms.length === 0 arm), so the precondition changes no result. It removes the whole-root read from the boot's own definition where there is nothing to move. Right.
  • The walker. formActionTargets reads the same set of objects as before: every object within 40 steps of the root. An object is walked when first reached and again only when reached at a smaller depth, so each is in the end read from its shallowest depth, and its children at that depth plus one; by induction on the shortest path the set equals the old one. The targets found are unchanged. What changed is the cost on a graph that refers back to itself. Right.
  • Public surface. Nothing exported moved in @objectstack/spec or @objectstack/metadata-core. metadata-core gains a value import of projectViewForms from @objectstack/spec/ui, a subpath it already imports elsewhere, and no exported type names it. Right.
  • main merged twice, the second time with fix(metadata-protocol): withdrawal reads in every package binding #39113. No conflict in the PR's files; the PR's files are unchanged by the merges.

② Semver level

  • @objectstack/metadata-core patch, with the new bullet on the deleted form's tails: right.
  • @objectstack/spec patch, new changeset 39101-form-move-walk-once.md: right. The walker is code in a released package, so a changeset is owed; the change adds nothing an author can write and alters no result (Metadata-protocol: none), and no accept set or export moved (Clause-②: no). The changeset body says what a consumer sees: a stack that refers back to itself converts instead of not finishing.
  • The PR body carries the same two lines.

③ Boundary flags

  • Question 1 of the blocked report: answered on the card by claim amendment 7342504316 ("the PR opens; the seat holds the follow-up"). Closed here by the M1 line above.
  • Question 2, the surface extension: recorded by the same amendment, with the three packages/metadata test files and form-view-subforms-removed.ts named. Answered.
  • Spec code in view-forms-to-form-items.ts: recorded by claim amendment 7345731976, the walker only. The diff of that file is the walker and its docblock, nothing else. Within the amended surface.
  • Out-of-scope finding of report 7345675828 (the walker on a self-referencing root): taken into this PR by amendment 2 and fixed. Answered.
  • Out-of-scope finding, the manifest service reading the declared range on the top level only: still "noted, not filed" in both newer reports. It needs a card of its own; not this diff's.
  • security_findings: "withheld": not readable from this review's inputs.
  • SQL push-down: the delta adds no query, no id materialisation and no in-app join.

④ Design judgment

No must-fix, no should-fix.

view-forms-to-form-items.ts (spec code, hits). Judged against the entry's own contract for this read: "an over-read only keeps a form (moved instead of deleted), while a missed target would delete a form an action opens." The new walk misses nothing the old one found (① above), so no form an action opens is deleted that was kept before. It terminates: an object is re-walked only at a strictly smaller depth, so at most 41 times. The record is a WeakMap local to one call, so nothing is retained and the entry stays pure. The new spec test builds the opening action reachable only through a self-referencing plugins[] and expects the form kept and plugins returned by reference; it agrees with the code.

  • N1 (nit): the docblock and the changeset say "each object is walked once". An object first reached deep and later reached shallower is walked again; the bound is the depth limit, not one. The result and the termination claim are unaffected. Left as an accepted deviation.

The other three hits files are unchanged since the earlier round; their sentences still agree with the door.

artifact-forward-conversion.ts.

  • The deleted set is read off the move's own (removed) notices and the left tails off the companion's report channel, so the door restates neither entry's judgement. formsTheMoveDeleted counts a form of a notice's view only when it stands nowhere in the converted root, so a form moved out of the same container, or left in it, is never counted. A record form deleted under a name forms[] already holds is not counted either; its tail was moved by the companion onto that item, so nothing is left to refuse.
  • The tail's name is derived as the companion derives it (OBJECT.KEY, a prefixed key kept), and both bundle shapes are walked as the companion walks them.
  • The synthesized notice has the field set and the at PATH: message form of applyConversions, which locateUnder relies on; the new test reads that form.
  • The docblock paragraph "The translation tails of a deleted form" agrees with the code sentence by sentence. "this door surfaces no TODO" is now the accurate wording: the door reads the report channel and shows none of it.
  • N2 (nit): formsTheMoveDeleted reads before.views[i] on the root as the door received it, while the notice's index is the move's, taken after the earlier entries of the chain ran. No registered entry removes or reorders a views[] element (the ones that touch views delete keys), so the two agree today. If one ever did, the deleted form's tail would be left and refused, which is the loud direction. Left as an accepted deviation.

Notes, not graded:

  • With the precondition, a root that holds a view form and also carries live plugin instances is still read whole by the move, to 40 steps. That read is now bounded, and it only happens for a pre-19 definition booted beside runtime plugins. Its cost on a large live graph is NOT MEASURED.
  • The rest test now pins both withdrawal arms (allowAnonymous: false and enabled: false) in each of its placements, which answers the earlier round's note.
  • No real HotCRM 6.x artifact is read through the door in this PR; cloud#5362's suite at the new pin remains the acceptance the card names.

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: claude/issue-39101-artifact-door-form-move
Reviewed-by: session_01WGufzivFXq32jQSCUnECPj

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzivFXq32jQSCUnECPj

Final green head for L1 · 2026-12-02T14:28Z · zone osa-build

  • Head: 221a2c2ab1022ea58811e313c02c684b5c51233b — 62 check runs success (Test Core 12/12 shards included), 15 skipped, 0 other; mergeable clean. 15 files, +1171/−144.
  • Contract review at CONTRACT_REVIEW_TIER on this head: PASS, comment 7348578349 (S1 closed; two nits left as accepted deviations).
  • Contents: the artifact door replays the major-19 form move and its translation companion; tails of forms the same replay deleted are removed; the move runs only where a view holds forms; the spec walker that finds type: 'form' action targets reads each object from its shallowest depth (bounded on self-referencing roots); two changesets (@objectstack/metadata-core patch, @objectstack/spec patch); test-only pin flips in packages/metadata per claim amendment 1.
  • main merged at 1f0da43f13 with this session's trailer pair; no conflict.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm

L1 review — ACCEPT on 221a2c2ab1022ea58811e313c02c684b5c51233b

The contract L2 at CONTRACT_REVIEW_TIER is record 7348578349 on this head: PASS, no must-fix, no should-fix, nits N1–N2 left as accepted deviations. Check-runs: 62 success, 15 expected-skip, 0 failed, 0 pending; mergeable_state clean. Not governed, 1,315 lines.

Verified on the tree:

  • The door. applyArtifactForwardConversions no longer refuses view-forms-to-form-items and translation-view-form-tails-to-forms by name, and only the default flips stay closed. So a pre-19 artifact reads as the 19 package os migrate meta --from 18 would build, inside the door's usual versioned window. The move is excluded per root unless holdsViewForms(root) holds (projectViewForms finds a form or an unreadable body). That keeps a 19 body, and the cli row-4 boot, off the move.
  • Tails of deleted forms. deleteTailsOfDeletedForms removes a _views.KEY tail only when the companion left it as a todo and the form the move deleted stands nowhere after the move, neither in forms[] nor in views[]. It writes one OS_METADATA_CONVERTED notice per removed tail. A tail whose form stays in views[], or that names a form the package does not serve, is left, and the strict parse still refuses it.
  • The walker. formActionTargets reads each object from its shallowest depth, so a self-referencing root ends. N1 is the precision note on "once".
  • Pin flips. In packages/metadata, these are test-only flips under claim amendments 1 and 2 on 老软件包视图里的表单被新框架拒收:HotCRM 6.x/7.0 等已发布版本读不了(挡云端升级) #39101. The dev's ablations are in the body: the door refusal restored turns 17/22 and 12/20 cells red, the tail deletion removed turns 4 red, and the depth check removed makes the two new cells hang.
  • l1-face's changeset flag. It covers @objectstack/metadata (3 files) and @objectstack/rest (1 file), all test files. Both packages ship dist, so nothing they ship changes. The two patch changesets (metadata-core, spec) are true sentence by sentence, with N1 on the spec one. Clause-②: no, Metadata-protocol: none.

Relation. Fixes #39101. #39113 (merge da4efeae) is in this head, which is the order the seat cleared. Not Tier H: the zone lands it.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzivFXq32jQSCUnECPj

Landing · 2026-12-02T14:31Z · zone osa-build

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 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.

老软件包视图里的表单被新框架拒收:HotCRM 6.x/7.0 等已发布版本读不了(挡云端升级)

2 participants