Repository navigation
feat(spec)!: a view holds lists only; view-held forms are tombstoned - #38957
Conversation
A view holds lists only (ADR-0159 D7): `view.form`, `view.formViews` and the `form` view kind are retiredKey / enumWithRetiredValues tombstones naming `forms:`, the flattened form overlay is gone, and the served container expansion drops form members while the raw expansion stays for the projection and the conversions. The translation tails `_views.KEY.title` and `.submitBehavior` are tombstoned and the translator no longer reads them (D8). Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8VVAmjLdCQkCPb8p8sKJs
A view item keeps its discriminated-union shape with the list arm alone, and its unmatched discriminator answers the `viewKind: 'form'` prescription. The view ledger grades `form` and `formViews` dead with REMOVED notes; the undrilled-container, key-mention and dropped-refinement baselines shrink by the sites the tombstones closed; generated references follow. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8VVAmjLdCQkCPb8p8sKJs
Every test that asserted a view-held form (the container's form and formViews, the viewKind 'form' item, the flattened form overlay, and the _views form translation tails) now asserts the protocol-19 answer: the door refuses the whole form at its own key with the D7 prescription, and the same body is judged where a form lives now, the form item. No test is deleted; each rewritten case carries an [ADR-0159 D7] or D8 note. A shared testkit holds the four retired view-held doors so the form-key retirement tests judge their old rows in one place. The dropped-refinements header count follows the 22 site lines already removed. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8VVAmjLdCQkCPb8p8sKJs
…ewContainer The served view read uses expandServedViewContainer (lists only). Every other reader keeps the raw expansion of a stored container. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8VVAmjLdCQkCPb8p8sKJs
…oors and in the census Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8VVAmjLdCQkCPb8p8sKJs
… serves no projected item The served view list leaves out stored old-shape form items. The form doors' withdrawal layer reads them through getViewItemsWithStoredForms. The stored-form census keeps the before-the-switch reading. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8VVAmjLdCQkCPb8p8sKJs
GetUiViewResponse is a view for `list` or `{ object, form }` for `form`.
The answer is unchanged, and a test pins it byte-equal.
Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J8VVAmjLdCQkCPb8p8sKJs
Claude-Session: https://claude.ai/code/session_01ADHkmPVdwjc3wMNdnuWeFT Co-authored-by: Claude <noreply@anthropic.com>
The switch marker's docblock said no boot reads the row in this release and that only the command writes it. The served boot now reads it, and a store created from empty records it as a birth marker (details.birth). The docblock also says what the command records on a datastore with no sys_metadata table. Claude-Session: https://claude.ai/code/session_01ADHkmPVdwjc3wMNdnuWeFT Co-authored-by: Claude <noreply@anthropic.com>
The `form` member left `ViewKindSchema` in protocol 19 (ADR-0159 D7), so the discriminated union's key is `viewKind:list`. check:variant-docs reported the old `viewKind:form|list` row as orphaned and the one-arm union as undeclared. Claude-Session: https://claude.ai/code/session_01ADHkmPVdwjc3wMNdnuWeFT Co-authored-by: Claude <noreply@anthropic.com>
…tch is not recorded A served boot now reads the switch marker (sys_migration 'adr-0159-form-type-switch') in the guard's own start(), after the organization-ownership guard, and refuses to start when it is absent, not verified or unreadable, naming `os migrate protocol --to 19` as the boot was started. Nothing skips the check: os serve always composes its own instance and refuses a stack plugin that carries the guard's name. A store the boot observes being created from empty records the marker itself as a birth marker (details.birth), from the served guard, from the birth half createStandaloneStack composes, and from the deferred flush of a CLI boot. The refusing half stays out of createStandaloneStack. The switch command records `applied_at` only when the ceremony ran: on a database with no sys_metadata table the row is the census's verdict alone. Claude-Session: https://claude.ai/code/session_01ADHkmPVdwjc3wMNdnuWeFT Co-authored-by: Claude <noreply@anthropic.com>
…ow the 19 tombstones The view container's `form` / `formViews` and the `viewKind: 'form'` item are tombstones in protocol 19 (ADR-0159 D7), and the `_views` form tails with them (D8). What still described them as live is brought level: - liveness/form.json: the body rows no longer say they are inherited from view.json `form.*` rows that left with the container's tombstone. The two rows view.json had re-cited after the seed (`columns`, `sections`) carry that later verdict, and `sharing`'s evidence no longer says an old shape is answered as the form it projects. - liveness/translation.json: `forms` is the one address of a form's strings; the fallback read of the `_views` tails is gone, and the note says where the tails are registered. - liveness/README.md: the `view`, `form` and `translation` rows record the tombstones. - view.zod.ts: the refusal of a body that is no view and the prose around the wire schema name the list slots only; content/docs/references/ui/view.mdx is the regenerated mirror. - i18n-resolver.ts: the dispatch comment no longer describes the removed fallback read. No schema shape, read path or refusal changes. Claude-Session: https://claude.ai/code/session_01ADHkmPVdwjc3wMNdnuWeFT Co-authored-by: Claude <noreply@anthropic.com>
… the ownership guard Claude-Session: https://claude.ai/code/session_01ADHkmPVdwjc3wMNdnuWeFT Co-authored-by: Claude <noreply@anthropic.com>
`view` is lists only since protocol 19 (ADR-0159 D7). The refusals and the conversion are pinned beside the schema; this adds the playbook's tree-scoped absence leg, in the `repo` project, inside the radius the package already declares. It judges the authoring shape, three arms: `formViews` in key position, the `viewKind: 'form'` item, and a `defineView` container whose own braces hold a `form` member. Inline code is prose, so a page may still say what was removed. The population is what an author copies from: `skills/`, `content/` and `scripts/` whole, the examples' non-code files and each app's `src/`, and under `packages/` what a package teaches (Markdown and YAML). A package's code and JSON are the stated bound: typed authoring there is refused by `tsc` at the tombstone, and the code that names the shapes untyped is the reader of rows stored before 19 with its fixtures, whose job is to spell them. `scripts/cross-package-test-inputs.mjs` names the pin as a further witness on the rows it reads; no glob is added, so `turbo.json` is unchanged. The walk is red at this commit on two files, both outside what this change may edit: `content/docs/concepts/architecture.mdx` (a fenced comment still says a view is authored with a `form` member) and `scripts/codemod/view-to-viewitem.mjs` (its header still prescribes the `form` view item). Claude-Session: https://claude.ai/code/session_01ADHkmPVdwjc3wMNdnuWeFT Co-authored-by: Claude <noreply@anthropic.com>
The depth test beside `keyPosition` was redundant: `keyPosition` is only ever true at the container's own depth. Drop it, say the rule in the doc comment, and add the neighbour that holds it (a `form` key after a comma one level down). Claude-Session: https://claude.ai/code/session_01ADHkmPVdwjc3wMNdnuWeFT Co-authored-by: Claude <noreply@anthropic.com>
An ablation of the line-comment skip left the specimens green: the comment specimen put no `form` where a key can stand. Give the line comment, the block comment and a string at the container's own depth a specimen each that turns red when its skip is removed. Claude-Session: https://claude.ai/code/session_01ADHkmPVdwjc3wMNdnuWeFT Co-authored-by: Claude <noreply@anthropic.com>
… bears it on an empty database protocol.integration.test.ts: the fixture's package ships its public form as a `form` item (a protocol-19 stack is refused at boot with `view.formViews` in it, which left this suite red in beforeAll). New pins: the served boot's guard refuses the database before the switch and after a held --apply, admits it once the command recorded the switch; a database with no sys_metadata table gets a verified record with applied_at unset. apply.organization-ownership-birth.integration.test.ts: os migrate apply records the protocol-19 birth marker on a database it created from empty, and none on one it did not create. Claude-Session: https://claude.ai/code/session_01ADHkmPVdwjc3wMNdnuWeFT Co-authored-by: Claude <noreply@anthropic.com>
…its caller, naming the command schema-migrate.birth-after-flush.test.ts pins formTypeSwitchBirthFailure: the row it names, the cause, and `os migrate protocol --to 19 --apply --yes` (never the organization-ownership ceremony's steps). Both edited cli test files pay the first load of the dist-resolved dependencies their source reaches at module top (check:test-source-alias). Claude-Session: https://claude.ai/code/session_01ADHkmPVdwjc3wMNdnuWeFT Co-authored-by: Claude <noreply@anthropic.com>
…red on the showcase A showcase database an earlier boot left with no switch record is refused naming `os migrate protocol --to 19`; the real CLI binary previews without writing and records the switch with --apply --yes; the next boot is served. A database the boot creates from empty records the switch itself (details.birth) and the boot after it reads that record. Claude-Session: https://claude.ai/code/session_01ADHkmPVdwjc3wMNdnuWeFT Co-authored-by: Claude <noreply@anthropic.com>
…9 switch record serve-form-type-switch-refusal.integration.test.ts pins the wiring only serve.ts owns, on the shipped entrypoint in production posture: a database the boot creates is served and carries details.birth; the same database with the record gone exits non-zero before the banner and names the command, printing no credential; a stack plugin under the guard's name does not take its place; the named command records the switch and the next boot is served. Claude-Session: https://claude.ai/code/session_01ADHkmPVdwjc3wMNdnuWeFT Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmPVdwjc3wMNdnuWeFT Co-authored-by: Claude <noreply@anthropic.com>
…y; a form reads no object off a list
[ADR-0159 D7] Lane C, step 1 of the major-19 form type switch.
- `getMetaItem({ type: 'view', name })` answers no `item` for a stored row
that is not a list (`servedViewItemAnswer`), in every state it serves. The
stored row is neither rewritten nor refused; the raw reads are unchanged.
- `anonymousFormObjectName` no longer reads the container's
`list.data.object`: a `form` item names its object itself (card item 5).
- New pins, `packages/rest/src/stored-forms-major19-kept-reader.test.ts`:
what both public form doors answer on a 19 build at a package's open `form`
item while a stored old-shape row stands (status, `code`, no record), the
served `view` reads, and the save door's refusal of the three old shapes
(`INVALID_METADATA`, 422, located path).
- `stored-forms-switch-37112.test.ts`: every base that shipped the open form
as an old-shape container now ships it as a `form` item (two pins read 200
from a shape 19 no longer serves).
- `protocol.ui-view-response-conformance.test.ts` pays its `@objectstack/lint`
load at module top (`check:test-source-alias`).
Claude-Session: https://claude.ai/code/session_01ADHkmPVdwjc3wMNdnuWeFT
Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmPVdwjc3wMNdnuWeFT Co-authored-by: Claude <noreply@anthropic.com>
…9 build An open stored `form` row beside a stored old-shape row of the name that is switched off, in the package's declared override and in no package: the `form` row is the served row, and both doors answer 404. Claude-Session: https://claude.ai/code/session_01ADHkmPVdwjc3wMNdnuWeFT Co-authored-by: Claude <noreply@anthropic.com>
The guest-grants-channel, guest-owner-stamp, read-back-masking, submit-answer and withdrawal-walled suites authored their public form as `view.formViews.intake`, which the protocol-19 schema refuses, so the package no longer type-checked. Each fixture now keeps its list in the `defineView` container and declares the form with `defineForm` under `forms:` (`OBJECT.intake`, bound by `object`, same sections and sharing). The walled suite reads and writes the form at `/meta/form/NAME` and edits `sharing` at the item's root, where a form item carries it. No assertion is removed or changed: every status, code and landed-row expectation is as it was. Claude-Session: https://claude.ai/code/session_01ADHkmPVdwjc3wMNdnuWeFT Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmPVdwjc3wMNdnuWeFT Co-authored-by: Claude <noreply@anthropic.com>
…FORM_TYPE_SWITCH_REQUIRED; the auth family starts after the guard The refusal is stamped with a registered machine code (error-code ledger, under @objectstack/runtime, door: none, on the precedent of the v18 organization-ownership refusal), and isFormTypeSwitchBootRefusal discriminates on it. The three generated reference pages follow the ledger. AuthPlugin and IdentityObjectsPlugin name the guard in optionalDependencies beside the v18 guard, so nothing they write at start is written before its verdict; form-type-switch-guard-ordering.pin.test.ts proves the declaration is what moves the order. Claude-Session: https://claude.ai/code/session_01ADHkmPVdwjc3wMNdnuWeFT Co-authored-by: Claude <noreply@anthropic.com>
… at module top check:test-source-alias asks it of an added test file whose source reach loads @objectstack/core/egress through a dynamic import. Claude-Session: https://claude.ai/code/session_01ADHkmPVdwjc3wMNdnuWeFT Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmPVdwjc3wMNdnuWeFT Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzj7Sj3euvc1cYXrhNA Contract review brief, delta round 2 — PR #38957 @
|
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm L1 review · PR #38957 (#37112 PR 2) · head 83a0f87 · 2026-12-02T01:40ZVERDICT: ACCEPT on the code and paper faces, with ONE gate owed on this head before the Tier H hand-off: the dogfood battery. I confirm on this same head once the battery reads success.
Next: hang |
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm L1 confirm · PR #38957 (#37112 PR 2) · head 83a0f87 (same head) · 2026-12-02T02:09ZVERDICT: ACCEPT. P1 of L1 7331996090 is closed, and the head has not moved.
Next: the seat's ACCEPT and the Tier H hand-off. |
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm L1 confirm · PR #38957 (#37112 PR 2) · head 11c5252 (merge of main) · 2026-12-02T02:48ZVERDICT: ACCEPT on
Next: the seat's ACCEPT on this head and the Tier H hand-off. |
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhPdWmTd47Fi2bKYZS 席位核对ACCEPT — PR #38957 @
|
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzj7Sj3euvc1cYXrhNA Contract-review-claim: session_01WGufzj7Sj3euvc1cYXrhNA · head 11c5252 · 2026-12-02T02:51Z |
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzj7Sj3euvc1cYXrhNA Contract reviewServed-tier: Delta round 3, after delta round 2 (PASS on head
① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentWhat
The merged tree agrees with the contract round 2 judged. The merge adds no implementing file, so the Scope line is round 2's, unchanged. No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzj7Sj3euvc1cYXrhNA Contract review brief, delta round 3 (merge of main) — PR #38957 @
|
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhPdWmTd47Fi2bKYZS 维护者速读
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzj7Sj3euvc1cYXrhNA
Requested by Yibo Wang · project thread
Fixes #37112
Supersedes #38908, which superseded #38888. The maintainer handed this card to seat
repo:objectstack@os-support-ai(claim 7315188352 on #37112, amendments 1–15). This branch starts at #38908's head573b29bb88(every commit of #38908 and #38888 kept) and mergesmain. #38908 and #38888 close when this PR lands.Clause-②: yes (narrowing)
Metadata-protocol: narrowed
Skills-docs:
skills/objectstack-i18n/SKILL.mdsends a form's heading and thank-you panel to theformsgroup and dropstitle/submitBehaviorfrom the_viewsrow;skills/objectstack-ui/rules/list-views.mdalready teachesforms:and refuses a form inside a view维护者速读
form类型;三种旧写法在校验、defineStack和保存时被拒绝(422),并给出改法;没跑升级命令的部署会拒绝启动,并提示该跑哪条命令。os migrate protocol --to 19 --apply搬走之前一律不对外服务(404),搬走后按原名、原链接恢复服务。其中包括 18 版会在链接上打开的、19 版之前存下的「开着的副本」;自己组装内核、不挂启动守卫的宿主也一样。还包括:某个包已经以form类型发布了一个表单、部署里另有旧格式行也存着它时,18 版在链接上打开它,19 版在搬走前同样回 404,搬走后恢复。已下线的表单在搬之前、搬之后都保持下线。withdrawalsCarried由 0 变为 1(表单下线也会搬到form上,偏向关闭);API 调用方能看到的错误码变化:带表单、撞上已占用公开链接的view保存,原来回FORM_ADDRESS_TAKEN,现在回422 INVALID_METADATA。What changes
PR 2 of 2 for #37112 (PR 1, #38844, shipped the conversions,
os migrate protocol --to 19and the switch marker).@objectstack/spec:view.form,view.formViews, theformview kind, the flattened form overlay, and the_views.KEY.title/.submitBehaviortranslation tails (ADR-0159 D7, D8). New exportsServedViewItem,expandServedViewContainer,isServedViewItem.FORM_TYPE_SWITCH_REQUIREDand names the command; no skip switch. Birth marker (ruling 7308112533): a store created from empty records the marker itself.viewsave door refuses the old shapes with theforms:prescription (422 INVALID_METADATA); saving a served old-shape container back is refused, so no stored state is lost.formtype's write doors and validators moved fromviewtoform; lint stops reading the old shapes;form-view-internal-not-loadedis retired (its successorform-consumer-lessstays).os migrate organization-ownership --applycarries a form withdrawal into the pair at 19.os migrate packageless-overlaysdeletes a view container it cannot move only afteros migrate protocol --to 19 --applyhas moved its form members.ui/): list switcher, Studio view editor and view preview handle lists only..changeset/37112-view-holds-lists-only.md.Why
ADR-0159 card ⑤b: forms are their own metadata type, and major 19 stops reading the three view-held form shapes (ruling record 7142585849 on #36868: convert first, then switch, in the next major).
Deliberate differences from 18 until the ceremony
On protocol 19, before
os migrate protocol --to 19 --apply --yeshas moved them, forms held only in stored old-shape rows answer404on both doors, whoever asks; after the move they are served asformitems under the same name and link. This includes a pre-19 stored copy of a package's form saved open, which 18 served at its link (amendment 10, 7325088362, records the per-cell 18 reading), and it holds on a host that assembles its own kernel without the boot guard. It also includes a form a package ships as aformitem while a stored old-shape row also holds it: 18 served it at its link, and on 19 it answers404until the ceremony moves the row (seat ruling on contract-review round 1). Withdrawn arms are unchanged: closed before and after the move.Rewritten tests (none deleted; every flip is 200→404 within the ruled classes Q2/Q3)
formitem … 404 (ADR-0159 D7)'; 'an old-shape form whosedata.objectdiffers … served on neither door'; the reads-once by-name form read answersundefinedand the door GET 200→404 (×2); the title-i18n overlay case renamed to its 404.--apply, served after' (×3); 'the fold, writable-base twin … closed before and after'; 'retired form and its successor … 404 before, served after'; 'three old shapes … lists only'.public-form-two-type-withdrawal.test.tsnow answer 404 before--applyand serve after it, renamed '(ADR-0159 D7)'.public-form-section-i18n.test.ts: 3 cases (overlay 404; container slots 404)./meta/viewand/meta/formanswers 404 to stranger and holder alike (was 403/200).viewwrite answers422 INVALID_METADATA(wasFORM_ADDRESS_TAKEN; named in the changeset).isDefault-on-default-form assertion is replaced by its refusal case (ADR-0159 D1 refusesisDefaulton form items).withdrawalsCarried1 (was 0; the form carry also closes the servedform, fail-closed); the control case's open list drops the package-less entry (the double servesformitems only); the pair case runsisolated.public-form-two-type-withdrawal.test.ts: two controls and three cells (closed on both doors before and after--apply, the ceremony moves the withdrawal into the pair; a row whose package cannot be told apart reads closed at each; the row's list keeps its name). Ablation: with the new reading reverted the three cells answer 200 instead of 404 and the two controls stay green; restored toblob == HEAD.formitems, each with its named ablation measured red; new twins 'narrowing only, the 19 twin' and 'pin 2b, the 19 twin'. Renames (old → new):viewhalf of the layer)' → 'pin 1 — … closed three ways over (ablate together: the closed reading of a served old-shape row, theformhalf and theviewhalf of the layer; any two of them alone leave it closed, and pin 3 carries theviewhalf alone)'. Measured: red only with all three ablated.formoverride, open as an old-shape item in the base (ablate: theformhalf)' → 'pin 2 — the mirror on 19: aformoverride switched off over a base whose old-shape item serves no form stays closed (theformhalf is carried red by pin 5 forform, "narrowing only, the 19 twin" and "pin 2b, the 19 twin")'.formsave is refused as the sameviewsave is, the withdrawal held in the other type, and nothing is written' → 'rule 9 — an organization-scopedformsave is refused under every posture …: nothing is written, and both doors stay closed'.formitem in the slot declares no link …', red under its named ablation (judge "public" bysharing.enabled === true).Renames change titles and ablation labels only; no assertion was weakened or dropped.
Verification
Gates below ran on head
8b171d71; the M1 fix (head83a0f872) re-ran the metadata-protocol (23,940 tests), rest (9,243), spec (29,057) suites and the dogfood battery (53), all green, plus the typecheck, alias, NUL-byte and changeset gates. Unless noted (logs kept by the card thread). Body refreshed 2026-12-02T02:45Z.node scripts/pm/dispatch-gates.mjs --ran: 176 derived, 176 run, 0 NOT-MEASURED, 0 UNRUN (a derived zero: every line recorded its exit code). 172 ran on22acdd4e(the same tree but one rest test file); the 4 that first refused for want of a build (check-plugin-teardown-shape --self-test,check:skill-examples,check:dual-build-cjs-loads,check:published-readme-exports) passed on8b171d71afterpnpm build.@objectstack/metadata-protocolfull suite: 381 files passed, 9 skipped; 23,940 tests passed.@objectstack/restfull local project: 448 files, 9,238 tests passed, exit 0.public-form-withdrawal-walled,guest-grants-channel,guest-owner-stamp,public-form-read-back-masking,public-form-submit-answer,form-type-switch-boot-refusal,view-container-default-form); every rewritten withdrawal test keeps its 404s and runs.blob == HEAD; the SQLite transaction pins time out without the join; the ownership carry pins go red with the carry pointed at theviewread.11c52522(83a0f872withmainmerged in; a pure merge, the spec regeneration chain and the skills token ratchet re-ran with no change): 66 success, 9 skipped, 1 failure (PR-body guards, below); the opt-in dogfood battery (three shards) is green on this head and on83a0f872.Known red:
Fixes #37112. Every commit of both is in this PR. They close as superseded when this PR lands; until then this guard stays red by design.Follow-ups
GET /api/v1/meta/form?object=Xignoresobject(pre-existing, made visible by 19).Human Minimum
packages/specholds no runtime logic.pnpm lintpasses.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_01WGufzj7Sj3euvc1cYXrhNA