Skip to content

Commit 83c0b6b

Browse files
docs(adr): ADR-0159 notes that the package-artifact door replays the form move (#39103) (#39172)
Fixes #39103 Clause-②: no (an ADR note records what PR #39120 shipped; no schema, no export, no accept set) Metadata-protocol: none ## 维护者速读 - 用户无感:只给"表单从视图中独立出来"这份决策记录在文末补了一段带日期的说明,原有文字一行未动。 - 属于"表单从视图中独立出来"这次迁移的收尾:记录原先没有提到旧版软件包怎么读,其中一句统计又只数了本仓库,读的人会误以为没有任何已发布的软件包把表单写在视图里。 - 若说明写错,碰到的是之后查这份记录的人,会照着错误的说法判断旧版软件包的读法;本改动只增不改,可直接撤回。 - 请审阅这段说明;决策记录的改动由你落地。 ## What changes One file, `docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md`: 21 lines added at the end, none removed and none edited. The new section is `## Addendum (2026-12-02): the package-artifact forward door replays the form move on a pre-19 body`, in the heading form the registry's other dated addenda use. It says: - **What the door does.** The metadata-core artifact forward door replays `view-forms-to-form-items` and `translation-view-form-tails-to-forms` in its ordinary versioned window, over the definition and each package body, so a pre-19 body reads, for its forms, as the 19 package its migrated source would build. A pre-19 body is one built before the major-19 tombstone, a 19 prerelease build that declares a `^19.0.0-next.N` range included. Names PR #39120 and card #39101. - **A 19 body is unchanged.** The move is replayed only where a view holds form content; a 19 body comes back by reference. - **Stored rows keep the kept reader.** The door writes nothing and rewrites no stored row (`STORED_ROWS_NOT_REWRITTEN`), so a stored withdrawal of a form keeps that form closed after the replay as it does over any package `form` item. Four test files on `main` are cited. - **Why this does not contradict the rule on moves before 19.** The rule stands. What the major-19 tombstone ended is the condition the door's refusal rested on: until then a package's forms were read from `views[]` through the projection. - **The scope of one measurement in D7.** The sentence "Measured at `689e5695b98`, this case is empty: no package that ships metadata to a deployment authors a form in any of the three shapes" covered this repository's packages only. HotCRM's published 6.x and 7.0 versions author their public forms as `formViews` entries. The scope correction is add-only: the measurement sentence in D7 stays as written, and the addendum quotes it and corrects its scope. The Status line carries no new pointer, because that would edit an existing line. No decision, ruling or option text of the record changes. ## Why A reader of ADR-0159 found no mention of package artifacts, and read one measurement as saying that no shipped package authors a view form. Both readings are wrong on `main` since PR #39120 merged. ## Tests Docs only: no test is added and no tested behaviour changes, so no ablation applies. Every statement of the addendum was read from `origin/main` at `360820b420`: - the replay, its window and its reach: the module doc and `holdsViewForms` in `packages/metadata-core/src/artifact-forward-conversion.ts`; - a 19 body by reference: `packages/metadata-core/src/artifact-forward-conversion-39101-pre19-package-forms.test.ts`; - stored rows not rewritten: `STORED_ROWS_NOT_REWRITTEN` in `packages/spec/src/conversions/stored.ts`; - the kept reader over the replayed item: `packages/rest/src/public-form-39101-artifact-replay-withdrawal.test.ts`, `packages/rest/src/public-form-withdrawal-reads-package-bindings.test.ts`, `packages/rest/src/stored-forms-major19-kept-reader.test.ts`; - HotCRM: its pending changeset for objectstack-ai/hotcrm#2843 says both public forms "were `formViews` entries on the lead and case views", and its package version is 7.0.1 with that changeset unreleased. ## Acceptance notes - Changeset: none, with the `skip-changeset` label. `docs/adr/**` publishes nothing from any released package. - The addendum's heading carries no card number, unlike some older addenda: the add-only note reader admits plain heading text only. The numbers are in the first paragraph. - `addOnlyNoteReasons` (`scripts/pm/check-governed-merges.mjs`) over this file's full-context diff against `origin/main` returns no reason. That is a local reading for the reviewer, not a tier verdict. - Second commit `9ad2afe3b7` folds contract review `7358321121` (S1, N1, N2, N3). It edits only lines this PR added; against `main` the diff is still additions only. - The declaration line above is copied from the claim with its parenthesis. The low-risk arm asks for a bare line, so as written the PR reads Tier H there. ## Verification Read first, by risk: 1. The paragraph "Why this does not contradict the rule on moves before 19": it restates rulings 1 and 2 of `7142585849` and the seat decision under them; check that it re-rules nothing. 2. The paragraph "The scope of one measurement in D7": check the quoted sentence against D7 and the HotCRM statement. 3. The paragraph "Stored rows keep the kept reader": check the wording against D6 rule 10 and D7-f. Two-minute check: `git diff --stat origin/main...HEAD` shows one file, 21 insertions and 0 deletions. Local gates at `9ad2afe3b7`, run again on this head, each exit code captured before any pipe. All 21 commands that `node scripts/pm/dispatch-gates.mjs --commands` derives for this diff ran and exited 0; `--ran` reconciles 21 derived, 21 run, 0 unrun. <details> <summary>The 21 derived commands</summary> - `node scripts/check-adr-links.mjs` (1288 relative link destinations under docs/adr/ resolve) and its `--self-test` - `node scripts/check-closing-keyword-parity.mjs` and its `--self-test` - `node scripts/check-comment-mask-corpus.mjs` - `node scripts/ci/plan-test-core-shards.mjs --self-test` - `pnpm --filter @objectstack/lint run check:doc-formula-expressions` (run after building `@objectstack/formula` and `@objectstack/lint`, its declared prerequisites) - `pnpm check:adr-anchors`, `pnpm check:adr-index`, `pnpm check:adr-symbol-anchors` (4660 anchors across 165 records resolve) - `pnpm check:ci-filter-parity`, `pnpm check:closed-ceremony-text`, `pnpm check:cross-package-test-inputs`, `pnpm check:doc-authoring`, `pnpm check:driver-memory-census`, `pnpm check:gitlink-declared`, `pnpm check:nul-bytes`, `pnpm check:pm-governed-merges`, `pnpm check:pm-prior-rulings`, `pnpm check:refd-timer-probe`, `pnpm check:watch-hint-literal` </details> Not measured locally and left to CI: the whole-tree families, `pnpm lint`, and the type-check programs. ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. - [x] 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.) - [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. (Nothing publishes; no changeset.) - [x] 6. `packages/spec` touched: its generated artifacts are regenerated and committed. (Not touched.) - [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_01WGufzivFXq32jQSCUnECPj <!-- signed: repo:objectstack@os-support-ai · os-support-ai · session_01WGufzivFXq32jQSCUnECPj --> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent afc64fc commit 83c0b6b

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

‎docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,3 +630,24 @@ The card cites positions read at `14f4d8f8`. Each was read again. The numbers be
630630
- Review record on PR #36957 at head `737f6f288c4`, folded by the patch round after it: contract review [`7136181190`](https://github.com/objectstack-ai/objectstack/pull/36957#issuecomment-7136181190) (its S8 is card ②'s `narrowed` value, its S9 the projection's "served rows only").
631631
- Review record on PR #36957 at head `102c857d0e9`, folded by the patch round after it: contract review [`7136878154`](https://github.com/objectstack-ai/objectstack/pull/36957#issuecomment-7136878154) (its S10 is "served" asked at each package's address). The same round folds ruling record [`7136809727`](https://github.com/objectstack-ai/objectstack/issues/36868#issuecomment-7136809727) on #36868.
632632
- Touching cards named by #36868: #36797 and #36798 (Studio rail and docs on named default and create forms — re-read against [D1](#d1)), #36860 (the metadata list columns row, [D9](#d9)).
633+
634+
## Addendum (2026-12-02): the package-artifact forward door replays the form move on a pre-19 body
635+
636+
Recorded by card #39103 for card #39101, which PR #39120 landed (merge commit `b706ec6ed2`). This note is add-only. It records what that change does at one door and corrects the scope of one measurement. It changes no decision, ruling or option of this record.
637+
638+
**What the door does.** A package artifact is a built package at rest, and `os migrate meta --from 18` reaches sources only. In this note a pre-19 body is one built before the major-19 tombstone, whatever range it declares: a 19 prerelease build that declares a `^19.0.0-next.N` range is one. A 19 body is one built after it. From major 19 the strict parse refuses a view's form in each of the three old shapes ([D7](#d7)). So the artifact forward door (`packages/metadata-core/src/artifact-forward-conversion.ts`; its versioned window is [ADR-0087](./0087-metadata-protocol-upgrade-contract.md)'s addendum of 2026-09-13) replays [D7](#d7)'s source conversion, `view-forms-to-form-items`, and [D8](#d8)'s translation companion, `translation-view-form-tails-to-forms`, in that window like any other retired entry of step 19, over the definition and over each package body it carries. A pre-19 body then reads, for its forms, as the 19 package its migrated source would build. Each form the conversion moves arrives as a `forms[]` item under the name it was served as, with its `sharing` block and switch as written (D7-a). An internal record form is deleted as the conversion deletes it, and the translation tails of a form the same replay deleted are deleted with it. A form the conversion leaves in place stays in `views[]` and is refused by the strict parse.
639+
640+
**A 19 body is unchanged.** The move is replayed only where a view of the body holds form content. A 19 body holds none, and it comes back by reference.
641+
642+
**Stored rows keep the kept reader.** The door rewrites the artifact in memory at each read and writes nothing. It neither reads nor rewrites a stored row: the stored-row seam still refuses both conversions by id (`STORED_ROWS_NOT_REWRITTEN`, `packages/spec/src/conversions/stored.ts`), so a stored old-shape row keeps the reading this record keeps for it ([D5](#d5), [D6](#d6) rules 10 and 11, D7-f). A stored withdrawal of a form therefore keeps that form closed after the replay exactly as it does over any package `form` item: both public form doors judge the replayed item against the stored rows as they judge the same package rebuilt at 19.
643+
644+
The tests on `main` that pin this:
645+
646+
- `packages/metadata-core/src/artifact-forward-conversion-39101-pre19-package-forms.test.ts`: the replay over a pre-19 body, the 19 body by reference, and the deleted tails;
647+
- `packages/rest/src/public-form-39101-artifact-replay-withdrawal.test.ts`: a stored withdrawal over a replayed `^18.6.0` artifact, beside the same package rebuilt at 19 as the control;
648+
- `packages/rest/src/public-form-withdrawal-reads-package-bindings.test.ts`: the kept reader over a package `form` item, over the replayed artifact and over the same package built at 19;
649+
- `packages/rest/src/stored-forms-major19-kept-reader.test.ts`: the kept reader over a package `form` item on a major-19 build.
650+
651+
**Why this does not contradict the rule on moves before 19.** Rulings 1 and 2 of `7142585849` put the `form` type in no release before major 19, and the seat decision under them makes the upgrade's move all-or-nothing with the switch ([D7](#d7)). Under that rule nothing in an old shape moved outside the switch before 19, and the door refused both conversions by name. The rule stands. What the major-19 tombstone ended is the condition the door's refusal rested on: until then a package's forms were read from `views[]` through the projection, so the refusal kept them in place. On 19 the projection serves no content ([D7](#d7), "After the major") and the strict parse refuses the old shapes, so the refusal kept nothing in place and left a pre-19 artifact unreadable. The replay is a read made on the major. It moves no stored row, and the switch and the ceremony of [D7](#d7) stay as this record states them.
652+
653+
**The scope of one measurement in D7.** Under "A base that has no pair in this version", [D7](#d7) says: "Measured at `689e5695b98`, this case is empty: no package that ships metadata to a deployment authors a form in any of the three shapes". That sentence stays as written, and this paragraph corrects its scope. The `git grep` beside it reads seven package directories of this repository, so the measurement covers the packages this repository ships and no package built outside it. HotCRM's published 6.x and 7.0 versions author their public forms as `formViews` entries on a view (objectstack-ai/hotcrm#2843 moves them to `form` items), and their artifacts are pre-19 bodies. That is why the artifact door must replay the move. What [D7](#d7) concludes from the measurement about a kernel package's form is not re-opened by this note.

0 commit comments

Comments
 (0)