Repository navigation
Description
repo:objectstack#3 · os-support-ai · session_01WGufzufqmKuir7GiTdwGd3Z
③ maintainer direct order (with ruling) · Source: maintainer (Yibo Wang), 2026-11-24, os-support-ai bug-discussion thread.
- 05:19Z: 「view(视图)类型里面总共有哪些」 → answered: list types grid/kanban/gallery/calendar/timeline/gantt/map/chart/tree/timesheet, form types simple/tabbed/wizard, two shapes (container
form/formViews, itemviewKind: 'form'). - 05:21Z: 「是否建议表单从 view 中更直接拆分出来,比如叫form元数据?」
- 05:22Z: 「用fable分析」 (independent analysis, summarised below; full report linked at the end).
- 05:22Z: 「如果分拆的话,对外表单的功能就不用单独开发了,就合并到这个元数据类型中。」
- 05:23Z: 「现在对外表单开发的任务先暂停」 (recorded on 设置里新增「对外表单」:列出全部对外表单,能开关、复制地址、改字段和标题、新建(现在只能写在应用定义里) #36444, comment 7122924165).
- 05:33Z, decision card 「表单要不要从 view 拆成独立的 form 元数据类型?」 → 「拆成 form 类型,对外表单并入」 (options not taken: keep forms in
viewand retire only the container shape; keep everything as is).
This supersedes the 01:08Z option 「Studio 单独一页,存储不变」 recorded on #36444 as ruling 7118881549 (items 1 and 2: a Studio Developer → Public Forms page, storage unchanged as formViews.<name> in the object's view), and the "Definition (unchanged shape)" part of #36444 ruling 7100386248. The ruling is also recorded on #36444 and #36505.
Grading: area:build · Feature · a new metadata type (form) carved out of view; public forms move into it · builders and administrators who author or publish forms · evidence: read from code (fable analysis + spot checks). A new metadata type is a Feature (filing gate: new metadata type ⇒ separate Feature card). p1 by the blocker rule: #36444 (p1, open, paused) cannot finish until this lands, and it carries Blocked-by: this card. Area is build (Studio builds forms; metadata authoring), not ux.
Dedupe: gh api search/issues (is:issue, closed included) on form metadata type (3628 hits, top: #36860 #35879 #31527 #36505 #36444), defineForm (23), viewKind form retire (20), split form view type (790), public form type (2281). No card on the same mechanism. Touching: #36444 (paused, becomes part of this work), #36505 (items 1–3 + 5 continue independently; item 4 paused), #36797 / #36798 (Studio rail and docs on named default/create forms: re-read once the ADR lands), #36860 (metadata list columns: a form type will need its columns row).
Reader: seat objectstack#3 routes. Step 1 is a design (ADR) card for one dev at contract tier; it names the implementation cards. Paths on main 14f4d8f.
Today (read from code)
viewcarries both lists and forms (packages/spec/src/ui/view.zod.ts):FormViewSchema(~5329,typesimple/tabbed/wizard), the containerViewSchema(~5889:list,form,listViews,formViews) and the ADR-0017 item{ name, object, viewKind: 'list'|'form', config }with per-kind overlay arms (~6368–6900).formis not inMetadataTypeSchema(packages/spec/src/kernel/metadata-plugin.zod.ts). ADR-0084 already listsformbesideviewin the Interface pillar.- Record create and edit read no form view since 内部的新建和编辑表单作废:平台不再加载表单定义,弹窗一律按字段分组和字段规则排;字段加一个「新建时显示」的开关(对外表单不受影响) #36425: create dialog, full-page create, action-opened create and edit lay out by the object's
fieldGroups(ui/packages/app-shell/src/utils/recordFormNavigation.ts:141-150;addRecord.formViewretired,view.zod.ts:2186-2194). No per-role or per-position form assignment exists. - Named forms have three consumers only: public forms at
/f/:slug; actiontype: 'form'→/forms/:name(packages/spec/src/ui/action.zod.ts:693,719;ui/apps/console/src/components/FormPage.tsx); Setup / Studio previews. - Anonymous doors:
resolveFormBySlugliststype: 'view'plus per-package layers and runsanonymousFormIntakeCandidates, which scans three shapes (packages/rest/src/form-routes.ts:236-260;packages/spec/src/ui/anonymous-form-intake.ts:103-121). Withdrawal (anonymousFormIntakeWithdrawnIn) is a narrowing-only kill switch matched by slot or slug onviewbodies. - Write path: intake advisory (
packages/metadata-protocol/src/runtime-authoring-gate.ts,protocol.ts:2169), container collision judgement (protocol-save.ts:175-195). Loader expands containers into items (packages/metadata/src/view-container-expansion.ts, objectqlengine-registration.ts). Overlay:view: listed(packages/spec/src/kernel/customization-package.ts:319). - Shipped public-forms UI: Setup → Configuration → Public forms (feat(setup): Setup → Configuration → Public forms lists and switches every public form #36697,
ui/packages/app-shell/src/views/setup/publicForms.ts, saves aviewoverride in the app's.custompackage); Studioui/apps/console/src/pages/developer/PublicFormsPage.tsx; open draft PR feat(studio): design an object's public forms in Studio's Form tab #36784 (designer,publicFormDesign.ts), paused. - Translations:
objects.<object>._views.<form>.titleand.submitBehavior.*(packages/lint/src/i18n-walk.ts). Lint: ~15 form-view rule files (e.g.validate-internal-form-views.ts,validate-public-form-file-fields.ts). - No runtime list/form coupling remains (view switcher takes list items only,
MetadataProvider.tsx:654-655; app navviewNametargets lists,app.zod.ts:502). Residuals:anonymousFormObjectNamefalls back to the container'slist.data.object; list and form items share the<object>.<key>name space;.customoverride rows and withdrawal matching are keyed onviewbodies. - Size: 81 non-test + 166 test files in
packages/andui/useformViews/viewKind: 'form'; hotcrm 2 source files (lead.view.ts,case.view.ts) + 7 tests.
Decided (the ruling)
- A new metadata type
form, addressed by name, bound to one object (carriesobjectitself), body = today'sFormViewSchema. Its content is named forms that have a consumer: public forms (the main content,sharingincluded) and forms an action oftype: 'form'opens. - Public forms are not a separate feature: they are
formitems. Their list, detail and edit come from theformtype (generic metadata surface plus a dedicated editor), not from a separate Studio page. viewbecomes lists only. The record create/edit form stays on the object'sfieldGroups(already true since 内部的新建和编辑表单作废:平台不再加载表单定义,弹窗一律按字段分组和字段规则排;字段加一个「新建时显示」的开关(对外表单不受影响) #36425) and does not become aformitem.
This card: the design (ADR) step
Write and land the ADR work, then file the implementation cards it names. Settle at least:
- ADRs: amend ADR-0017 (
viewKindlist-only; form arm tombstoned on the schedule below); a new ADR for theformkind that passes ADR-0088's real-consumer test (noformcontent without a consumer: "custom create forms" and "wizards" qualify only when an action opens them); amend ADR-0146 D2 with aformoverride row (the pin test incustomization-package.test.tsforces it). ADR-0084 needs no change. - Migration path: loader dual-reads the three old shapes (
form,formViews.*,viewKind: 'form'items) intoformitems (precedent: container expansion); an ADR-0087 conversion +os migrate metafor sources; a stored-row migration forsys_metadatarows and.customoverrides of typeviewon form items. Old shapes tombstoned only in a major release (Metadata-protocol: narrowed); adding the type isadded. - Security-sensitive door: during dual-read the anonymous doors and the withdrawal judgement must read BOTH types, so a form switched off as a
viewoverride cannot re-open as aform(ablation tests required on the implementation card). - Name space for
formitems (today's<object>.<key>shared with lists; PR feat(studio): design an object's public forms in Studio's Form tab #36784 refuses clashes) and theobjectbinding rule. - Translations: a new key family (e.g.
forms.<name>.*) with the old_views.<form>keys read as fallback. - Disposition of shipped / paused work: feat(setup): Setup → Configuration → Public forms lists and switches every public form #36697 Setup page kept and re-pointed from
'view'to'form'(about 10 call sites inpublicForms.ts, drop theviewKindfilter); feat(studio): design an object's public forms in Studio's Form tab #36784'spublicFormDesign.tsand tests kept and re-hosted as theformtype's editor;PublicFormsPage.tsxand the Form-tab switch inStudioDesignSurface.tsxretired. What the generic metadata surface covers vs what stays dedicated (designer rules, admin on/off as a switch-only override, copy address, tenancy intake advisory, 404 for a switched-off form). - Card split and order (suggested by the analysis): ① this ADR; ② spec + server: type, registry and override rows, dual-read, doors and withdrawal over both types; ③ UI: re-point feat(setup): Setup → Configuration → Public forms lists and switches every public form #36697, land the designer as the
formeditor, retirePublicFormsPage(closes 设置里新增「对外表单」:列出全部对外表单,能开关、复制地址、改字段和标题、新建(现在只能写在应用定义里) #36444); ④ hotcrm source move + translation keys; ⑤ tombstone old shapes + stored-row migration (major). Studio 对象页「表单」页签改成「字段布局」:只编辑对象的字段分组,不再读写表单视图;安装来的对象存到 .custom 的排布里 #36505 items 1–3 + 5 proceed independently.
Hold until this card lands: #36444 / PR #36784 stay paused (no push, ready or queue); #36505 item 4 stays paused.
Acceptance
- ADR PR(s) merged covering every bullet above, with
Metadata-protocol:stated for each implementation step. - Implementation cards ②–⑤ filed with
Blocked-by:lines in order; 设置里新增「对外表单」:列出全部对外表单,能开关、复制地址、改字段和标题、新建(现在只能写在应用定义里) #36444 getsBlocked-by:card ③; Studio 对象页「表单」页签改成「字段布局」:只编辑对象的字段分组,不再读写表单视图;安装来的对象存到 .custom 的排布里 #36505 item 4 closed as superseded or re-pointed. - A ruling comment on 设置里新增「对外表单」:列出全部对外表单,能开关、复制地址、改字段和标题、新建(现在只能写在应用定义里) #36444 and Studio 对象页「表单」页签改成「字段布局」:只编辑对象的字段分组,不再读写表单视图;安装来的对象存到 .custom 的排布里 #36505 points to the ADR.
Analysis: fable read-only report, /mnt/project-files/objectstack-bug-discussion/form-split-fable.md in the fleet project (summarised above; file:line references at main 14f4d8f).
Generated by Claude Code
Activity
objectstack-fleet commentedon Nov 24, 2026
triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE
Triage: lands in
area:build·domain:spec·priority:p1· Feature ·pm:queue. The grade, area and type were set at filing from the maintainer's ruling, and they stay. This touch adds the pm state.Routing: repo:objectstack#7 declined the card (7123126164). The maintainer's seat routing gives every p1 outside
area:cloudandarea:uxto repo:objectstack#4, so the card goes there.objectstack-fleet commentedon Nov 24, 2026
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ
Claim: PM loop round 3 · 2026-11-24T10:28Z
Session:
session_01QSeKYpEsWWE9Y5YtSsDgqZAccount:
os-justinBranch:
claude/issue-36868-form-metadata-type-adrWorktree:
objectstack-issue-36868Domain:
domain:specSeat:
repo:objectstack#4File surface:
docs/adr/**(a new ADR for theformmetadata kind; amendments to ADR-0017 and ADR-0146 D2),docs/adr/README.mdindex row,.changeset/36868-*.mdonly if a gate asks for one (stop on breach; explain in the report). Implementation cards ②–⑤ are filed by the seat from the dev's report, not by the dev.Container & model:
M,mode:subagent,model: CONTRACT_REVIEW_TIER — dispatch-gates --tier: "Model tier — MANDATORY" ('docs/adr/**', the 2026-10-25 order 「adr 这种任务都需要 fable extra」),effort: xhigh(ADR)Clause-②: no
Metadata-protocol: none
Responsibility:
n/a — not a defect cardThread-read: 7123170316
Premise: holds (the card's "Today" readings were taken at main 14f4d8f; the dev re-reads each file:line on current origin/main before writing and reports any that moved)
Serial constraints cleared:
#36444 / PR #36784 stay paused per the ruling; #36505 item 4 paused; #36860 (repo:objectstack#3, in flight) touches metadata list columns — the ADR only names the form type's future columns row, no code overlapdocs(adr): ADR-0159 draft — forms leave view for a form metadata type (…
objectstack-fleet commentedon Nov 24, 2026
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ
os-dev-report
{ "issue": 36868, "status": "done", "branch": "claude/issue-36868-form-metadata-type-adr", "pr": "https://github.com/objectstack-ai/objectstack/pull/36957", "head": "86b607fa944", "session": "session_01QSeKYpEsWWE9Y5YtSsDgqZ", "premise_still_valid": true, "summary": "Draft PR #36957 (Tier H, stays draft; body opens with Part of, not a closing keyword, because filing cards 2 to 5 and the pointer comments remain on this card after the merge). It adds ADR-0159 (Proposed): the form metadata type. The record settles every bullet of the card's design step: D1 admission under ADR-0088 on three existing consumers; D2 shape (name, object, the form body at the top level, one object binding); D3 name space (OBJECT.KEY, the served name, unchanged; ADR-0150 bucket 1); D4 the ADR-0146 D2 override row, landing with the registry row in card 2 because the pin in customization-package.test.ts forces it (no code edited); D5 additive dual-read through one projection; D6 the anonymous doors and the withdrawal judgement over both types, with seven pins and ablations owed by card 2; D7 tombstones only in protocol major 19, an ADR-0087 conversion plus os migrate meta for sources, a stored-row ceremony for sys_metadata rows and .custom overrides; D8 the forms translation family with the old tails as fallback; D9 disposition of shipped and paused work and the generic versus dedicated surface; the card split with Metadata-protocol per step. ADR-0017 and ADR-0146 D2 are amended with dated Status-line pointers; the index is regenerated. Five points the ruling is silent on are written as merge questions with four-axis options and a default, and repeated in open_questions. Premise corrections against the card (read at 14f4d8f8, re-read at 62692b7f8b): several view.zod.ts positions moved (table in the ADR); the Form-tab switch in StudioDesignSurface.tsx is not on main (PR #36784 only); #36505 is closed (merged 5c2d5cf2c4); the Setup module has 6 type arguments plus 1 list read, not about 10; the candidates rule lives in packages/spec, re-exported by metadata-core. Two facts the card does not carry and the design had to absorb: defineForm is already a published export with another meaning (schema-bound Studio forms, 17 spec modules), and no server door refuses a second form on a taken public address.", "tests": "None: the diff is 4 files under docs/adr/ (415 insertions, 5 deletions). No behaviour changed, so no ablation. Readings the record cites were taken on objectstack-ai/objectstack main 62692b7f8b; census: git grep -lE \"formViews|viewKind: 'form'|viewKind === 'form'\" -- packages ui = 256 files, 158 tests.", "gates": "Local, head 86b607fa944, tree clean: node scripts/pm/dispatch-gates.mjs --commands derived 21 families; all 21 exit 0, each code captured before any pipe (list in the PR body). --ran: '21 derived, 21 run, 0 NOT-MEASURED, 0 UNRUN' (the tool notes the ran file carries no exit codes; they are recorded here). First sweep on e50a02fadd8: 13 exit 0 and 8 exit 3 PREREQUISITE NOT MET (no node_modules; then @objectstack/formula and @objectstack/lint unbuilt), read as NOT MEASURED, not red; after pnpm install --frozen-lockfile and two builds under os-verify-lock (VERDICT command-exit 0, twice) all 21 exit 0, and the whole set was re-run on the final head. check-adr-symbol-anchors first reported 10 line-anchor findings in the Readings table of the new record (path:NNN spellings of the card's own citations); rewritten as prose, exit 0. CI: NOT MEASURED: all check-runs, reason: 0 workflow runs and 0 check-runs were registered on head 86b607fa944 when this report was written (about 5 minutes after the draft opened); the combined status read 'pending' with 0 statuses.", "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm", "mcp_calls": "0", "api_writes": "2 — via the fleet-write relay as objectstack-fleet[bot]: (1) pr_create stroke, run 45381423928 = POST /repos/objectstack-ai/objectstack/pulls (draft #36957) + POST /repos/objectstack-ai/objectstack/issues/36957/assignees (os-justin) + POST /repos/objectstack-ai/objectstack/issues/36957/labels (skip-changeset); read-back 6626/6626 bytes identical, assignee and label listed; (2) this os-dev-report = POST /repos/objectstack-ai/objectstack/issues/36868/comments via post-stamped.mjs. git push x4 (the empty branch, a wip commit, the main commit, one polish commit; not REST). Reads: gh api GETs on the card, the cited comments, PR 36784 and PR 36697, and one search for a taken ADR number (0 hits for 0159).", "deviations": [ "PR body opens with `Part of #36868`, not a closing keyword: the card's acceptance has two seat acts left after the merge.", "`pnpm install` was run when the first gate needed it, not at worktree creation.", "One `node scripts/adr-index.mjs` call was made from docs/adr/ and failed on a relative path before writing; re-run from the root.", "Commits carry the model-free trailer pair AGENTS.md requires, not the harness reminder's trailer.", "`skip-changeset` sent as a pr_create label: docs/adr/** publishes nothing.", "HotCRM was not re-read; the record repeats the card's count for it and says so." ], "open_questions": [ { "question": "Q1 (ADR-0159 merge question 1) — the factory name. `defineForm` is a published export that builds schema-bound Studio metadata forms (17 modules under packages/spec/src, 1 file under ui/; outside use NOT MEASURED).", "options": [ "A — defineForm becomes the form type's factory and the Studio helper is renamed defineMetadataForm, both in card 2; a declared compiler-carried export break. Need: one obvious way to declare a public form. Long-term: define + type name holds for every type. AI: the natural guess is right, old callers fail loudly. Scope: rename across 18 files.", "B — new factory under a new name (defineFormItem), defineForm untouched. No break; the obvious name permanently builds something else; an AI's guess fails loudly then needs a second name. Smallest scope.", "C — no factory in card 2; authors write forms entries typed by the schema. Defers the collision; no compile-time help." ], "recommendation": "A, because the long-term name leads and the break is loud, one-time and in a helper measured as platform-internal; if outside use is found before card 2, fall back to B, never a dual-meaning overload." }, { "question": "Q2 (merge question 2) — the form name: OBJECT.KEY or a short name addressed by package.", "options": [ "A — keep OBJECT.KEY (ADR-0150 bucket 1, with view). Need: every served name, action target, deep link and stored override keeps working. Long-term: a form is bound to one object for life. AI: prefix-equals-object refused at parse. Scope: no rename, the withdrawal identity untouched.", "B — short name addressed by (package, name), bucket 2 with page. No measured pull; needs the bucket-2 resolver, an address grammar and a package column on action targets; renames every form inside a security-sensitive migration." ], "recommendation": "A, because B's one advantage has no measured pull and B moves the identity the kill switch matches on." }, { "question": "Q3 (merge question 3) — two forms on one public address. Today no server door refuses it; the first candidate in list order is served.", "options": [ "A — the form write door, os validate and publish refuse a form whose open slug another form holds; a refusal on the new type only. Need: ruling 7100386248 asks for a unique address refused with a clear message, and only a UI enforces it. Long-term: a public identity is unique at the door that stores it. AI: a clash is refused with both names. Scope: one check, one lint rule.", "B — keep first-match; the designer's client check is the only guard. No scope; the API, the CLI and an AI author stay unguarded." ], "recommendation": "A, because it narrows nothing an author has today and removes a silent wrong answer." }, { "question": "Q4 (merge question 4, a permission boundary) — does the reader of old-shape withdrawals follow ADR-0087's kit age-out?", "options": [ "A — exempt: the reader leaves only by a release whose upgrade precheck refuses a deployment that still holds an old-shape form row; major 19's upgrade carries the precheck. Need: a form an administrator switched off stays off across upgrades. Long-term: a kill switch is never removed by a clean-up schedule. Scope: one precheck, one reader kept longer.", "B — no exemption: the ceremony is documented as required and the reader ages out on ADR-0087's clock. One uniform rule, with a fail-open path." ], "recommendation": "A, because the other option can re-open a withdrawn public form; it is put to the maintainer by name because it is a security boundary." }, { "question": "Q5 (merge question 5) — the document shape: body at the top level, or under config.", "options": [ "A — name, object and the body keys at the top level. Need: the ruling says body = today's form view schema. Long-term: the type is the discriminator, the wrapper has no job left. AI: no config to forget or misspell. Scope: the projection and the designer adapt once.", "B — { name, object, config }, the view item's shape without viewKind. Closer to the designer's code as written; keeps a wrapper whose reason is gone." ], "recommendation": "A." }, { "question": "For the seat, not the maintainer: card 2 is written as one releasable change (spec and server). Split it into a spec half and a server half on a trunk branch?", "options": [ "A — one card, one PR (as written)", "B — two cards on a trunk branch, the doors half second" ], "recommendation": "A unless the size estimate passes the 3,000-line human-merge threshold; the security pins must land in the same change as the doors' two-type read either way." } ], "security_findings": "none", "out_of_scope_findings": [ "carrier: #36868 (ADR-0159 merge question 3, then card 2) · noted, not filed · no server door refuses a second form on a public address another form holds; the resolver serves the first candidate in list order. Read from packages/rest/src/form-routes.ts and the header of packages/spec/src/ui/anonymous-form-intake.ts; not driven through a public door, so it is a reading, not a repro. Dedupe words: public form slug duplicate, publicLink unique, form address clash.", "carrier: #36868 (ADR-0159 merge question 1, then card 2) · noted, not filed · `defineForm` and the `*.form.ts` suffix already mean a schema-bound Studio metadata form; the new type's obvious names collide in meaning. Dedupe words: defineForm rename, defineMetadataForm.", "carrier: card 2 · noted, not filed · packages/spec/src/conversions/stored.ts#applyConversionsToStoredItem reads back the collection of the row's own type, so no stored-row conversion can move a row between types; the ADR routes the stored migration to a ceremony for that reason.", "carrier: card 2 · noted, not filed · ViewItemNameSchema does not hold the name's prefix equal to `object`; the form type enforces it from its first release, the view item is left as is." ], "proposed_cards": [ { "n": "②", "repo": "objectstack-ai/objectstack", "title": "Add the `form` metadata type: registry and override rows, the `forms` collection, one projection of the three view shapes, and the anonymous form doors over both types", "labels_guess": [ "enhancement", "priority:p1", "domain:spec", "area:build" ], "note": "type Feature; needs domain:server hands for the doors; contract-tier review; Blocked-by this card's ADR PR merging", "body": "Source: ADR-0159 (PR #36957), decisions D1 to D6 and D8. Parent: #36868, card ② of five. Maintainer ruling 2026-11-24, record 7123091354 on #36444: 「拆成 form 类型,对外表单并入」.\n\nBlocked-by: #36868\nMetadata-protocol: added\nClause-②: no (seat to confirm at claim)\n\nGrading: `area:build` · Feature · adds the `form` metadata type and serves it · builders and administrators who author or publish forms · evidence: ADR-0159's readings at `main` `62692b7f8b`. p1 by the blocker rule (#36444 waits on card ③, which waits on this).\n\n## What to build\n\nOne releasable, additive change. Nothing an author wrote stops loading; `view` reads and old-shape writes behave as before.\n\n1. **The type** (ADR-0159 D2, D3). A `FormSchema` in `packages/spec/src/ui/`, derived by reference from `FormViewSchema`: `name` (qualified `OBJECT.KEY`, the part before the last segment must equal `object`), `object` (required), `label` (optional), the form body at the top level, plus `protection`, the ADR-0010 fields and the ADR-0146 `overrides` declaration. No `viewKind`, `config`, `isDefault`, `order` or `scope`. `data` is refused by name with the prescription to bind with `object`.\n2. **Registration, in one change**: the `MetadataTypeSchema` member, the `DEFAULT_METADATA_TYPE_REGISTRY` row (`page`'s flags; file patterns `**/*.form.ts|yml|json`), the metadata-core lockstep enum, the type-to-schema map, the stack collection `forms` with its plural and singular map entries, and `form: listed` in `OVERRIDE_TYPE_CLASSIFICATION` (the pin in `customization-package.test.ts` fails without it). The showcase's `KIND_COVERAGE` row with one authored `form` item.\n3. **The factory**, as the maintainer accepted merge question 1 of ADR-0159. Default: `defineForm` becomes this type's factory and the Studio metadata-form helper is renamed `defineMetadataForm` (17 modules under `packages/spec/src`, one file under `ui/`), a declared compiler-carried export change. Before starting, measure use of `defineForm` outside this repository (hotcrm, cloud); a hit goes back to the seat, it is not worked around.\n4. **The projection** (D5): one pure function beside `expandViewContainer` that turns a `view` body into the `form` items it carries (the container's `form`, each `formViews` entry, a `viewKind: 'form'` item), under the name each is served as today. It is the only reader of the old shapes for form content: loader, stored-row read, doors, withdrawal judgement and lint all call it.\n5. **Reads and writes of `form`**: authored items plus projected ones, a projected item marked in its read envelope; an authored item shadows a projected one of the same name in the same package; a `form` save, reset or delete at `(package, name)` also removes the old-shape row carrying that form at that address, in the same transaction (an item-shaped `view` row deleted, a stored container re-saved without the form).\n6. **The anonymous doors and the withdrawal judgement over both types** (D6, rules 1 to 9): candidates from the effective `form` read; the withdrawal layer is the effective lists and the per-package layers of both `form` and `view`, old shapes passed through the projection first; narrowing only, in both directions; a stored body the projection cannot read closes the links it names and says so once at `error`. `404 FORM_NOT_FOUND` for a switched-off form is unchanged. The tenancy intake advisory and the organization-scoped refusal judge `form` writes too.\n7. **The public address clash**, as the maintainer accepted merge question 3. Default: the `form` write door, `os validate` and publish refuse a `form` whose open slug another form in the environment holds, naming both.\n8. **Translations** (D8): the `forms` family in the bundle schema, the extractor and the translation lint; the translator reads `forms.NAME` first and the form tails under `objects.OBJECT._views.KEY` as the declared fallback; section copy keeps `objects.OBJECT._sections.SECTION` as its object-level default.\n9. **Lint**: the form walkers read `form` items and the projection; the consumer-less warning of D1 (successor of `form-view-internal-not-loaded`).\n10. Leave the ADR id in the code, and anchor the doors' two-type read in `scripts/adr-anchors/`.\n\n## Done when\n\n- A stack with `forms: [...]` loads, serves `GET /api/v1/meta/form` and `/api/v1/meta/form/NAME`, and publishes; `os validate` refuses a name whose prefix differs from `object`, an authored `data` key, and (question 3) a taken public address.\n- A stack that still authors the three old shapes loads unchanged, and each of its forms is also served as a `form` item under the same name. `GET /api/v1/meta/view` answers exactly what it answered before (pin against a fixture taken before the change).\n- The public form of `examples/app-crm` answers at its address before and after, byte-equal on the resolve door.\n- The seven D6 pins exist, each asserting status, `code` and that no record was written, each with one ablation run recorded in the PR (rebuild, on-disk mutation proof, restore proved by an empty `git diff HEAD`):\n - withdrawn by a `view` override in `.custom`, open as an authored `form` of the same name;\n - the mirror (withdrawn by a `form` override, open as an old-shape item in the base);\n - withdrawn in a container's `formViews` entry, open as a `form` item named for the expansion;\n - withdrawn by slug after the open definition moved to another name;\n - a per-package-layer withdrawal in either type;\n - an unreadable old-shape body closes its links;\n - the submit door refuses wherever the resolve door does.\n- `customization-package.test.ts` is green with the new row; the showcase coverage test is green.\n- Changeset: `minor` on every package the diff moves, `Metadata-protocol: added` in the PR body and the changeset; if question 1 landed as written, the BREAKING banner and the ADR-0087 disposition for the `defineForm` export change, with the FROM and TO mapping.\n- `packages/spec` generated artifacts regenerated and committed.\n\n## Not in this card\n\n- No tombstone, no conversion, no stored-row ceremony (card ⑤).\n- No console change (card ③). The shipped console keeps working against `view`.\n- No move of example or HotCRM sources beyond the one showcase item (card ④).\n\n## Security\n\nThe doors change which metadata type they read an anonymous admission from. A dev that finds a way to re-open a withdrawn form reports it through the private channel and stops; it is not fixed in passing. Contract-tier review is required on this PR.\n\nDedupe words: form metadata type, forms collection, anonymous form doors both types, withdrawal projection, defineForm rename." }, { "n": "③", "repo": "objectstack-ai/objectstack", "title": "Console reads and edits `form` items: re-point Setup's public forms, land the designer as the form editor, retire Studio's Public Forms page", "labels_guess": [ "enhancement", "priority:p1", "domain:ui", "area:build" ], "note": "carries #36444 and PR #36784; #36444 then gets Blocked-by this card", "body": "Source: ADR-0159 (PR #36957), decision D9 and the Execution plan. Parent: #36868, card ③ of five. Carries the paused work of #36444 and draft PR #36784.\n\nBlocked-by: CARD-2 (the seat writes the number of card ②)\nMetadata-protocol: none\nClause-②: no\n\nGrading: `area:build` · Feature · the console reads and edits `form` items; public forms are designed through the `form` type · builders and administrators · evidence: ADR-0159 D9's table, read at `main` `62692b7f8b`. p1.\n\n## What to build\n\n1. **Setup, Configuration, Public forms** (merged in #36697): re-point from `view` to `form`. The list read in the page and the six type arguments in the Setup data module (the two layered reads, the two save paths, the reset, the override save) name `form`; the row reader takes the item itself, with no `viewKind` filter and no `config` hop. Behaviour is unchanged: every public form listed, on and off, copy address, preview, switched-off forms stay listed. A switch written before this card (a `view` override) is found and cleared by the re-pointed switch, through card ②'s write rule.\n2. **The designer of PR #36784** becomes the `form` type's editor in Studio: its design module, its component and their tests are kept; its read and write move from a view item's `config` to the `form` item. Its rules stay: fillable fields only, an object-required field cannot be removed, the address clash message, draft then publish, an installed app's form saved as a declared override in the app's `.custom` pair.\n3. **Do not land** the Form-tab switch PR #36784 adds to the Studio design surface. The object page's field-layout tab stays field groups only.\n4. **Studio's metadata list for `form`**: the columns row (name, label, object, public address, on or off), create, delete, Source, layered view, history, draft and publish, the customization marks. Coordinate the columns row with #36860.\n5. **Retire** Studio Developer, Public Forms: the page, its tests, the `nav_public_forms` entry of the Studio app and its translations; the old route redirects to the `form` list. Setup's own navigation entry stays.\n6. **`FormPage`**: the internal route reads `GET /api/v1/meta/form/NAME`; the anonymous route is unchanged (it reads the server's resolution).\n7. Business wording on every surface, no internal names.\n\n## Done when\n\n- The acceptance list of ruling record 7100386248 on #36444 passes on HotCRM or `examples/app-crm`, driven in a browser:\n - an administrator sees Public forms in Setup and an ordinary member does not;\n - both shipped public forms listed with title, object and address;\n - switch one off: its address shows not-found without signing in and takes no submission; on again: restored; it stays listed while off;\n - in Studio, edit a shipped form (make a field required, remove one, change the title), publish: the change shows anonymously and the required field is enforced;\n - create a public form with four fields at a new address, publish: it takes a submission and the record appears;\n - a taken address is refused with a clear message; removing an object-required field is refused with its reason.\n- An action of type `form` opens its form after the re-point (one live check and one test).\n- No console source reads form content from `view`: `git grep` for `viewKind: 'form'` and `formViews` under `ui/` returns tests of the projection only, with the count in the PR.\n- The removed page, navigation entry and tests are listed in the PR body; screenshots of Setup's list, the Studio list and the editor are attached.\n- The PR body says `Fixes` for #36444 only if the seat confirms it at claim.\n\n## Not in this card\n\n- No server or spec change. A gap found there goes back to card ② as a report.\n- No tombstone (card ⑤).\n\nDedupe words: public forms setup re-point, form editor Studio, PublicFormsPage retire, FormPage meta form." }, { "n": "④a", "repo": "objectstack-ai/objectstack", "title": "Examples, skills and docs author forms as `form` items", "labels_guess": [ "enhancement", "priority:p2", "domain:spec", "area:build" ], "note": "touches skills/** (Tier H) and content/docs; the seat may split the skills diff from the examples diff", "body": "Source: ADR-0159 (PR #36957), Execution plan row ④. Parent: #36868, card ④ of five (this repository's half).\n\nBlocked-by: CARD-2 (the seat writes the number of card ②)\nMetadata-protocol: none\nClause-②: no\n\nGrading: `area:build` · Enhancement · first-party sources and teaching material author forms as `form` items · app authors and AI authors · evidence: `git grep -lE \"formViews|viewKind: 'form'\" -- examples skills content/docs` at `main` `62692b7f8b` (examples: `app-crm` lead view, three showcase views, the showcase contact object and translations; skills: `objectstack-ui`; docs: the forms, public data collection, views, create-versus-edit, i18n-standard and CLI pages). p2.\n\n## What to do\n\n1. Move every named form in `examples/` that has a consumer (a public link, or an action of type `form` targeting it) from its view container to `forms:`, under the same name. Lists stay where they are.\n2. Delete internal record forms nothing opens (the set `form-view-internal-not-loaded` reports); their layout belongs to the object's `fieldGroups`. List each deletion in the PR.\n3. Move the translation tails of the moved forms to the `forms` family.\n4. Rewrite the published skill and the docs pages to teach `forms:` as the one way to declare a form, and `views:` as lists. Report the two size readings a `skills/` diff owes (whole file and whole pack, before and after); pay any growth by deletion.\n5. Update the platform checklist anchors that name moved symbols.\n\n## Done when\n\n- `git grep -lE \"formViews|viewKind: 'form'\" -- examples skills content/docs` (the generated references tree and the releases tree excluded) returns nothing but pages that describe the migration, listed in the PR.\n- `os validate` on both example apps reports no `form-view-internal-not-loaded` and no consumer-less form warning.\n- Each example's public form answers at its address before and after (resolve and submit), and each moved action-opened form still opens.\n- The i18n bundles regenerate clean (`node scripts/check-i18n-bundles.mjs --write`, then `pnpm check:i18n`).\n- `Skills-docs:` line present in the PR body as the claim spells it.\n\n## Not in this card\n\n- HotCRM's sources (its own card in that repository).\n- No spec or server change; no tombstone.\n\nDedupe words: examples forms collection move, skills forms teaching, docs forms page form type." }, { "n": "④b", "repo": "objectstack-ai/hotcrm", "title": "HotCRM's public forms move to the `form` metadata type", "labels_guess": [ "enhancement", "priority:p2" ], "note": "filed where the fix lands, with the back-link", "body": "(To be filed in objectstack-ai/hotcrm.)\n\nSource: objectstack ADR-0159 (objectstack-ai/objectstack PR #36957), Execution plan row ④. Parent: objectstack-ai/objectstack#36868. Touches objectstack-ai/hotcrm#2739 (HotCRM's own form definitions).\n\nBlocked-by: objectstack-ai/objectstack CARD-2, released in a version HotCRM can install (the seat writes the number)\nMetadata-protocol: none\n\nGrading: app · Enhancement · HotCRM authors its public forms as `form` items · HotCRM's authors and its two public forms · evidence: the count on #36868 (two source files, the lead view and the case view, and seven tests), not re-read for the ADR. p2.\n\n## What to do\n\n1. Move the two public forms (the lead \"contact us\" form and the case web-submission form) from their view containers to `forms:`, names and public addresses unchanged.\n2. Move their translation keys to the `forms` family.\n3. Delete or keep each internal record form per objectstack-ai/hotcrm#2739; none becomes a `form` item unless an action opens it.\n4. Update the seven tests.\n\n## Done when\n\n- Both public addresses answer without signing in, before and after, and a submission creates the record with the same defaults as today.\n- `os validate` is clean of form warnings.\n- No source in the repository authors `formViews` or a `viewKind: 'form'` item.\n\nDedupe words: hotcrm public forms form type, web to lead forms collection." }, { "n": "⑤", "repo": "objectstack-ai/objectstack", "title": "Protocol major 19: `view` is lists only — tombstone the three form shapes, convert sources, migrate stored rows", "labels_guess": [ "enhancement", "priority:p2", "domain:spec", "area:build" ], "note": "breaking; held until the maintainer opens major 19; needs domain:server hands for the ceremony and precheck", "body": "Source: ADR-0159 (PR #36957), decision D7 and merge question 4. Parent: #36868, card ⑤ of five. This card is cut only when the maintainer opens protocol major 19.\n\nBlocked-by: CARD-3\nBlocked-by: CARD-4 (both halves; the seat writes the numbers)\nMetadata-protocol: narrowed\nClause-②: yes (narrowing) (seat to confirm at claim)\n\nGrading: `area:build` · Feature (breaking, major) · `view` becomes lists only; the three old form shapes are refused with a prescription and migrated · every app that authored a form inside a view, and every deployment with stored forms · evidence: ADR-0159's census at `main` `62692b7f8b` (256 files name the shapes, 158 of them tests). p2 until the major is opened.\n\n## What to build\n\n1. **Tombstones**: the container's `form` and `formViews`, the `form` member of `ViewKindSchema`, and the `form` arm of the item and wire schemas, each refused with a prescription naming `forms:`. The two form tails under an object's view translations tombstoned with the prescription naming `forms.NAME`. Follow the `spec-property-retirement` playbook; do not rebuild the kit by hand.\n2. **Two ADR-0087 conversions, `toMajor: 19`**: on the stack, move each named form from `views[]` to `forms[]` under the projection's name, lift the binding to `object`, remove a container left empty; on `translations`, move the form tails. Internal record forms nothing opens are deleted and reported per form; one that is public or action-opened is moved. A form whose `data.object` disagrees with its container is left with a structured TODO. Fixture pairs cover the three shapes, a mixed container and the disagreement case.\n3. **The chain entry** for major 19, and `os migrate meta --from 18` listing and applying the edits.\n4. **The stored-row ceremony**: a CLI ceremony in the shape ADR-0131 D10 and ADR-0146 D11 set (read-only by default, `--apply`, idempotent, a per-package report). An item-shaped `view` row with form content becomes a `form` row at the same package and name; a stored container is split; a `.custom` override keeps its package, name, `overrides` declaration and `basedOn`; a package-less overlay row over a packaged form goes to the base's pair as a declared override, and stays a `view` row where the pair cannot be ensured; history stays verbatim; internal record forms are reported, never deleted.\n5. **The upgrade precheck**: the upgrade to major 19 refuses while a stored old-shape form row exists, naming the ceremony.\n6. **`view` reads serve lists only**; the projection serves no content; the list rung of `anonymousFormObjectName` is removed.\n7. **The withdrawal reader stays** (merge question 4 as accepted): a stored old-shape body that withdraws a form keeps closing it; this reader is not on the kit age-out clock.\n8. The `ui/` fixes the removals force ship in the same PR.\n\n## Done when\n\n- Each tombstone refuses at `os validate`, at `defineStack` and at the metadata save door with its prescription (pin the `code`, the status and the located path).\n- The full migration chain replays from the support floor to 19 in CI.\n- The ceremony, run twice on a database seeded with: an item-shaped form row, a container with lists and forms, a `.custom` switch-only override, a package-less overlay, and an internal record form, reports the same result the second time and moves nothing; each row lands as D7 says.\n- **Security pins, each with an ablation**: after the ceremony a form withdrawn before it is still closed on both doors; a deployment that skipped the ceremony is refused by the precheck; a stored old-shape withdrawal left behind (pair not ensurable) still closes its form.\n- Before tombstoning, measured and recorded in the PR: zero first-party sources author an old shape (this repository's examples, skills and docs; HotCRM at its current head).\n- The full dogfood battery on the final head, once.\n- Changeset: BREAKING banner, the FROM and TO mapping with the one-line fix, exactly one ADR-0087 disposition marker, both declaration lines; `Metadata-protocol: narrowed`.\n\n## Not in this card\n\n- Removing the withdrawal reader. That is a later release with its own precheck and its own ruling.\n\nDedupe words: view lists only tombstone formViews, viewKind form retired, migrate forms stored rows ceremony, major 19 form conversion." } ], "pointer_comment_text": "For #36444 and #36505 once the PR merges (the card's third acceptance item): \"The design step #36868 is recorded as ADR-0159 (PR #36957): forms are items of a `form` metadata type, public forms included; `view` is lists only from protocol major 19. Implementation cards: (numbers of cards 2 to 5). #36444 carries Blocked-by: (card 3).\" #36505 is closed, so its comment is a pointer only." }objectstack-fleet commentedon Nov 24, 2026
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ
os-dev-report
Patch round (merge of
origin/main, no content change to ADR-0159), read at 2026-11-24T11:31Z.{ "issue": 36868, "status": "done", "branch": "claude/issue-36868-form-metadata-type-adr", "pr": "https://github.com/objectstack-ai/objectstack/pull/36957", "session": "session_01QSeKYpEsWWE9Y5YtSsDgqZ", "premise_still_valid": true, "summary": "Patch round: the PR was mergeable_state dirty, so CI never started. Merged origin/main (ad92dfde80a) into the branch as a real merge commit 16dcc53d294 (two parents, no rebase, no force-push). The one conflict was ADR-0146's Status line: main's amendment for card 36891 (Studio's one entry) and this PR's amendment (ADR-0159 D4, form joins D2's list) each appended an entry at the same position; both are kept byte-for-byte, main's first. Main's other ten hunks and this PR's D2 sentence merged without conflict, and main's D2 amendment (the pillar rails read as the type lists) does not touch the Which-types sentence this PR extends. docs/adr/README.md: the generator reports unchanged after the merge. ADR-0159's text is untouched; number 0159 is still free on origin/main (re-read at c8d4b908cd5, which landed after the merge and merges clean).", "tests": "No test owed: docs/adr only. Proof of the resolution at 16dcc53d294: diff of ADR-0146 against origin/main shows exactly this PR's two changes (one added Status entry, one extended D2 line); numstat of ADR-0146 against the pre-merge head is 182 added, 4 removed, identical to main's own numstat since the merge base; zero conflict markers; working tree clean.", "gates": "Local at 16dcc53d294, exit codes captured before any pipe: all 21 commands of dispatch-gates --commands exit 0 (check-adr-links and its self-test, check-closing-keyword-parity and its self-test, check-comment-mask-corpus, plan-test-core-shards self-test, lint check:doc-formula-expressions, check:adr-anchors, check:adr-index, check:adr-symbol-anchors, check:ci-filter-parity, check:closed-ceremony-text, check:cross-package-test-inputs, check:doc-authoring, check:driver-memory-census, check:gitlink-declared, check:nul-bytes, check:pm-governed-merges, check:pm-prior-rulings, check:refd-timer-probe, check:watch-hint-literal). Reconciliation line: dispatch-gates --ran: 21 derived famil(ies) accounted for, 21 run, 0 NOT-MEASURED (a DERIVED zero). adr-index --check: OK, README is current and every record parsed. A first pass ran before pnpm install and eight commands answered exit 3 (PREREQUISITE NOT MET); those eight were re-run after install and a build of formula and lint under the verify lock (VERDICT command-exit 0). CI: pr-state reads mergeable_state blocked (was dirty), checks at 16dcc53d29: 0 success, 5 expected skip, 0 failed, 17 pending; conclusions in_progress, not awaited.", "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm", "mcp_calls": "0", "api_writes": "1 — this comment, POST issues/36868/comments via post-stamped; plus one git push (86b607fa944..16dcc53d294)", "open_questions": [], "security_findings": "none", "out_of_scope_findings": [] }objectstack-fleet commentedon Nov 24, 2026
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ
Ruled · 2026-11-24T12:31Z · ADR-0159 merge questions 1–5 — all option A
The maintainer's words, in seat repo:objectstack#4's session, 2026-11-24, verbatim: 「表单拆成独立 form 元数据类型的 5 个合并问题 都同意」 — the answer to the seat's presentation of PR #36957's five merge questions (dev report 7129798720, four-axis options at contract tier), each with recommendation A.
Governing text: this card's ruling (「拆成 form 类型,对外表单并入」, 05:33Z) and ADR-0159 (Proposed, PR #36957); ADR-0088 (real-consumer test), ADR-0087 (conversion kit and age-out), ADR-0150 (name buckets).
defineFormbecomes theformtype's factory; the existing Studio schema-bound metadata-form helper is renameddefineMetadataForm, both in card ②, as a declared compiler-carried export break. Premise: outside use of the currentdefineFormis platform-internal (measured before card ② lands); if outside use is found, card ② falls back to a new factory name and never a dual-meaning overload — that fallback returns here for a word.OBJECT.KEYname (ADR-0150 bucket 1, withview): no rename; action targets, deep links, stored overrides and the withdrawal identity keep working.os validateand publish refuse a form whose open slug another form already holds (a refusal on the new type only; nothing an author has today narrows).formdocument carriesname,objectand the form body keys at the top level.Next: a patch round writes these rulings into ADR-0159 (merge questions → decided, with this comment as the ruling reference), then L1 and the contract review on that head, then the approver. After the ADR merges the seat files cards ②–⑤ from the report's texts and posts the pointers on #36444 / #36505.
6 remaining items
objectstack-fleet commentedon Nov 24, 2026
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ
Ruled · 2026-11-24T15:53Z · ADR-0159's decision owed before major 19 — the held rows get no special disposition
The maintainer's words, in seat repo:objectstack#4's session, 2026-11-24, verbatim: 「两类特殊的旧存储行怎么处置。不考虑」 — the answer to the decision ADR-0159 (PR #36957 at head
102c857d0e9) leaves owed "before major 19 opens", for its two kinds of row: a storedviewrow that carries no form over a linked base, in a binding D5 bounds; and a package-less form row that no layer reads, behind a writable package's own list of the same name.Seat reading, recorded for card ⑤ (the maintainer may correct it): these rows need no disposition of their own. The ceremony does not move them and the upgrade precheck does not hold major 19 for them; they stay as stored. No form that is closed today opens by this: the first kind keeps the address closed through rule 11's replacement check, which ADR-0159 keeps after the major (D7, "After the major"); the second kind is read by no layer before or after. Card ⑤ is written to this ruling when it is filed, and its precheck pin drops the "holds the upgrade" assertion for these two kinds, keeping the "address stays closed" assertion.
The ADR's own text is not edited for this: PR #36957 is approved at
102c857d0e9, and this ruling answers the decision the record leaves owed.objectstack-fleet commentedon Nov 24, 2026
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ
Confirmed · 2026-11-24T16:02Z · the seat reading in ruling 7136809727 is the maintainer's: after the seat explained both kinds of held row in business terms (the no-form row that closes an app's public form by replacing it; the unread package-less form row behind an own app's same-name list), the effect of 「不考虑」 (no disposition, no upgrade hold, rows stay as stored, both addresses stay closed) and its cost (dead rows; reopening the app's form needs the first kind's row removed by hand, with no prompt), the maintainer answered, verbatim, in seat repo:objectstack#4's session: 「同意」.
ADR-0159's round 8 on PR #36957 writes this answer in place of the decision the record left owed.
objectstack-fleet commentedon Nov 24, 2026
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ
os-dev-report
Patch round: delta contract review 7136878154 (on PR #36957 at head
102c857d0e9) and ruling record 7136809727 folded into ADR-0159, new heada9b2da75f7a, read at 2026-11-24T16:28Z. No ruled line changes. Cards 3, 4a and 4b are unchanged.{ "issue": 36868, "status": "done", "branch": "claude/issue-36868-form-metadata-type-adr", "pr": "https://github.com/objectstack-ai/objectstack/pull/36957", "head": "a9b2da75f7aa3bfbf1b8cf55eba2370238fc769d", "session": "session_01QSeKYpEsWWE9Y5YtSsDgqZ", "premise_still_valid": true, "summary": "Patch round folding delta contract review 7136878154 at head 102c857d0e9 (PASS; S10 open, N11 to N15) and ruling record 7136809727 on the card (「两类特殊的旧存储行怎么处置。不考虑」). origin/main had not moved (a73edb3cd78), so no merge; one commit on top, a9b2da75f7a, no rebase, ADR-0159 only (36 insertions, 27 deletions against 102c857d0e9). The ten Ruled: A and Ruling-ref lines are byte-identical (md5 ce1a37ec97b8231d621ca355872475d9 before and after; none is a changed line in git diff -U0). The ruling: every place that left a decision owed before major 19, or held the upgrade for the two kinds of row, now carries the ruled answer as the seat reads it in the ruling record: the rows get no disposition of their own, the ceremony does not move them, the precheck does not hold major 19 for them, they stay as stored. The quote stands in a marked paragraph after question 4, outside the ruled blocks, with no new Ruled: line. S10: the served-row order is asked per package address, in the form read's own two-type resolution, never from the effective view list; the consequence sentence is scoped; D7-d says the same; card 2 has the fixture. N11 to N15 are folded (N15's PR-body half in the replacement body). The count of points past the ruling's words stays five.", "tests": "No test owed: the diff is docs/adr only, no behaviour changed, nothing ablated. Edits applied by a script of 29 exact-substring replacements, each matched exactly once, and one later single-phrase replacement, matched once. A scan of the record for owed, holds the upgrade and until major 19 after the edit finds them only where they still apply (a row whose pair cannot be ensured, a body that cannot be read, the kernel case, the translation fallback). Read for N11: the header of scripts/check-changeset-no-major.mjs (narrowed beside a line without the narrowing arm is a contradiction). git status clean at a9b2da75f7a after the gates.", "gates": "Local at a9b2da75f7a, exit codes captured before any pipe: the 21 commands of dispatch-gates --commands (the same 21 as the last round) all exit 0. Reconciliation line: dispatch-gates --ran: 21 derived famil(ies) accounted for, 21 run, 0 NOT-MEASURED (a DERIVED zero, all 21 recorded an exit code and none of them is 3). check:doc-formula-expressions: the first attempt did not get the verify lock (VERDICT queue-timeout, exit 99, waited 540s), read as NOT MEASURED; the second attempt with the same slot (issue-36868-r8) ran it after turbo build of the lint package: VERDICT command-exit 0, waited 287s, held 10s. The reconciliation was made after that verdict. check:adr-symbol-anchors exit 0, check:adr-index exit 0 (README unchanged), check:nul-bytes exit 0. CI check-runs at a9b2da75f7a when read: 44 runs, all completed, none failed; 25 success, Lint & Repo Gates and TypeScript Type Check among them; 19 skipped.", "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm", "mcp_calls": "0", "api_writes": "1 — this comment, POST issues/36868/comments via post-stamped. Plus one git push (102c857d0e9..a9b2da75f7a). Reads: gh api GET on review comment 7136878154, ruling comment 7136809727, the PR, and the head's check-runs.", "open_questions": [], "security_findings": "none", "out_of_scope_findings": [], "deviations": [ "The gate run was started in the background and waited on in the foreground, because the verify lock queue was longer than one foreground call; its results and both lock verdict lines were read after it ended.", "The harness attribution reminder asks for a model-named Co-Authored-By trailer; the commit carries the model-free pair AGENTS.md requires.", "Every git command of this round named the worktree with git -C; the shared checkout was read once more and is at 4c18c43dfa0, clean." ], "notes_for_the_seat": [ "A consequence of the ruling the seat should read first. Before it, the record ended D5's bounded reading and card 2's refusal at major 19, because no deployment could reach the major holding a row of that reading. Under the ruling such rows reach it as stored, and the seat's reading rests on rule 11's kept replacement check to keep their addresses closed. So the record now has that check cover the row that carries no form, and keeps the bounded reading and the refusal as long as the check, past major 19; card 5 removes neither. Without the refusal a package-less list saved after the major at a form's name could not be told from a row written over the form. The exception to D3 is therefore no longer called temporary: TL;DR 10, D3, D5, Consequences and the quick-read say it outlasts major 19.", "A second consequence: the ruled answer rests on TL;DR 10's fifth point (the replacement check kept on the withdrawal reader's lifetime, past question 4's scope). The record says so in the paragraph after question 4 and under After the major: if the maintainer strikes that point, the address of a no-form row opens when the check ages out, and the question returns to him. The release that one day removes the check owes its own answer for these rows; the record already calls that removal a later release and a new decision.", "What the two kinds cover in the text. Kind one is the no-form row over a linked base in a binding D5 bounds; the form rows that stand behind such a row at the same address (the S7 case) stay as stored with it and are not held either, which I read as part of kind one's answer. Kind two is the package-less form row no layer reads behind a writable package's own list. If the seat reads the ruling more narrowly for the S7 form rows, that is one sentence in D7-d and one fixture line in card 5.", "The report still names these rows, as left in place and with no action; D7-e's rule that no deletion or reset is offered for them is unchanged. Consequences say that serving the base's form in such a deployment is the administrator's own act on the row and that no report prescribes it.", "N12 is answered by the ruling instead of by a new precheck class: the unread package-less form row no longer holds the upgrade, so the precheck names no action for it. Card 5's precheck pin now has a positive half (a deployment whose only such rows are of the two ruled kinds reaches major 19, rows byte-equal, addresses closed before and on the major-19 build) with an ablation of the kept check's read of a no-form row.", "N11: the record and card 2 now say the narrowing arm is required with narrowed, and that card 2's one disposition marker is a registered semantic entry or a category resting on a checked fact. Card 2's Clause line leaves only yes or no to the seat.", "TL;DR 10: still five points past the ruling's words. The line after them names four things: three that touch no ruled word (the fold's newly closed form; the package-less refusal, now outlasting major 19; the unread form that stays unserved) and the later ruling, with the quote.", "PR body: not written by this run. The replacement is the local file /tmp/claude-0/-home-user-objectstack/4ab22c9e-ace8-5531-a47d-60e7382f257d/scratchpad/issue-36868/r8/prbody-r8.md, built from the body on GitHub as read this round. Its quick-read bullet says the major-19 item is ruled, with the quote, and that the refusal outlasts major 19; its D5 bullet is corrected (N15); Read first item 3 names the four. It ends with the signed trailer. The history bullets of earlier rounds are left as written.", "Cards 3, 4a and 4b are unchanged (card 3 from dev report 7131979790, 4a and 4b from 7133812384). Cards 2 and 5 are replaced below; the seat note at the end of card 5's scratchpad text is applied and removed." ], "proposed_cards_changed": [ { "card": "2", "replaces": "the card 2 body in dev report 7136618721", "body": "Source: ADR-0159 (PR #36957), decisions D1 to D6 and D8, and its five ruled merge questions. Parent: #36868, card ② of five. Maintainer ruling 2026-11-24, record 7123091354 on #36444: 「拆成 form 类型,对外表单并入」. The five merge questions are ruled (ruling record 7131569242 on #36868, 2026-11-24: 「表单拆成独立 form 元数据类型的 5 个合并问题 都同意」, all option A); questions 1, 3, 4 and 5 are requirements of this card, marked below. They are decided: ⛔ none is re-opened here.\n\nBlocked-by: #36868\nMetadata-protocol: narrowed\nClause-②: the `(narrowing)` arm is required with `narrowed` (the changeset gate reads `narrowed` beside a line without it as a contradiction; it brings the title's `!` and the dogfood battery); only its yes or no is the seat's at claim\n\nGrading: `area:build` · Feature · adds the `form` metadata type and serves it · builders and administrators who author or publish forms · evidence: ADR-0159's readings at `main` `62692b7f8b`. p1 by the blocker rule (#36444 waits on card ③, which waits on this).\n\n## What to build\n\nOne releasable change. Nothing an author wrote stops loading, and `view` reads behave as before. Old-shape writes save as before with one exception (item 5): a package-less `view` write that would store a list at a name a read-only package authors as a `form` item is refused, and some of those saves are admitted today. That is why the card is `narrowed` and not `added` (a value refused is `narrowed`; several kinds take `narrowed` over `added`).\n\n1. **The type** (ADR-0159 D2, D3). A `FormSchema` in `packages/spec/src/ui/`, derived by reference from `FormViewSchema`: `name` (qualified `OBJECT.KEY`, the part before the last segment must equal `object`), `object` (required), `label` (optional), the form body at the top level (ruled question 5: no `config` wrapper), plus `protection`, the ADR-0010 fields and the ADR-0146 `overrides` declaration. No `viewKind`, `config`, `isDefault`, `order` or `scope`. `data` is refused by name with the prescription to bind with `object`.\n2. **Registration, in one change**: the `MetadataTypeSchema` member, the `DEFAULT_METADATA_TYPE_REGISTRY` row (`page`'s flags; file patterns `**/*.form.ts|yml|json`; the suffix is free once item 3's rename has moved the Studio modules off it), the metadata-core lockstep enum, the type-to-schema map, the stack collection `forms` with its plural and singular map entries, and `form: listed` in `OVERRIDE_TYPE_CLASSIFICATION` (the pin in `customization-package.test.ts` fails without it). The showcase's `KIND_COVERAGE` row with one authored `form` item: a new form, ⛔ not a move of a form the console opens today (the console reads forms from `view` until card ③).\n3. **The factory** (ruled question 1 = A). `defineForm` becomes this type's factory and the existing Studio schema-bound metadata-form helper is renamed `defineMetadataForm`, both in this card, as a declared compiler-carried export break.\n - **Scope of the rename, counted from the tree** (ADR-0159 question 1, \"For the cards\"; at `689e5695b98` `git grep -lw defineForm` names 60 files, 41 of them code). Count again at your own head and put the count in the PR:\n - 17 `*.form.ts` modules under `packages/spec/src` that import and call it;\n - 3 that declare, export or build around it: `packages/spec/src/ui/view.zod.ts`, `packages/spec/src/index.ts`, and `packages/spec/tsup.config.ts`, whose pure-constructor set names it (the renamed helper joins that set);\n - 4 tests: 3 under `packages/spec` that call it, 1 under `packages/lint` that names it in a test title;\n - 17 that name it only in a comment: 10 tests (9 under `packages/spec` and `packages/lint`, 1 under `ui/`) and 7 sources (3 under `packages/lint/src`, 2 under `packages/spec/src/system`, `packages/cli/src/utils/config.ts`, `scripts/i18n-bundle-surface.mjs`);\n - 19 that are not code: 6 generated outputs to regenerate (the `packages/spec` API-surface and export-origin snapshots, the generated reference page), 9 released or historical texts ⛔ not edited (seven `CHANGELOG.md`, a released notes page, an audit), and 4 hand-written (two `packages/spec/liveness/` files, one internal skill under `.claude/`, this ADR). The `.claude/` file is a governed path: leave it out of this PR and name it in the report for the seat.\n - **The file suffix moves with the name** (ADR-0159 D2; the owning seat's routing on question 1, seat record 7132202077 on PR #36957, not the ruling's own words). The `form` type takes `*.form.ts`. The 17 Studio modules are renamed `*.metadata-form.ts`, and `METADATA_FORM_MODULE_SUFFIX` in `scripts/i18n-bundle-surface.mjs` becomes `.metadata-form.ts`. Readers of the suffix, measured at `689e5695b98` (count again at your head):\n - the one matcher, `scripts/i18n-bundle-surface.mjs` (constant and predicate), and the files that spell the suffix beside it: `scripts/pm/dispatch-gates.self-test.mjs` on nine lines across several cases (5641 to 5691, and 5881), one of which asserts `endsWith('.form.ts')` on the live walk (line 5662) and so fails as soon as the modules are renamed; the kind text in `scripts/pm/dispatch-gates.data.mjs`; a fixture path in `scripts/pm/landing-k.mjs`; the comments of `scripts/check-i18n-bundles.mjs` (lines 163 to 170). `scripts/ablation-dist-preflight.mjs` names a temporary fixture file `skill.form.ts` and reads no suffix. `scripts/pm/dispatch-gates.mjs` (Tier H) imports the predicate and spells no suffix: ⛔ do not edit it; if your head shows it must change, stop and report;\n - import specifiers: 31 files under `packages/spec/src` import a `.form` module (the seven domain barrels, `system/metadata-form-registry.ts`, 23 tests). Thirty spell it `./NAME.form`; `packages/spec/src/kernel/repeater-item-titles.test.ts` imports 15 modules as `../DIR/NAME.form`. Sweep by both spellings;\n - **text that teaches the suffix: re-word it, do not re-point it.** Once `*.form.ts` is the new type's suffix, \"a `*.form.ts` module binds `data`\" teaches the wrong root for an app's `lead.form.ts`. Name the Studio modules by their new suffix in: the `data` root explanation in `packages/lint/src/rule-explanations.ts`; the `data` arm of the message in `packages/lint/src/validate-expressions.ts` (it spells `*.form`); the docblock wording of `packages/lint/src/validate-visibility-predicates.ts` together with the two `toContain` pins on it in `validate-visibility-predicates.test.ts`, and a third string pin in the same test file, on the emitted text: the tokens the explanation of the mislayered-root rule must print (the `MOVED` table lists `*.form.ts` for `VISIBILITY_ROOT_MISLAYERED`, line 1904 at `be1c0cbd4da`), which changes with the explanation in `rule-explanations.ts`; and the row \"Metadata-editing forms (`*.form.ts`)\" in `content/docs/protocol/objectui/layout-dsl.mdx`;\n - generated outputs that print the module paths (`packages/spec/export-origins/`): regenerate, never hand-edit;\n - path citations in ledgers, checklists and comments (`packages/spec/liveness/`, `docs/qa/platform-checklist/areas/`, comments under `packages/lint/src`, `packages/cli/src`, `ui/packages/app-shell/src/views/metadata-admin/`): re-point the ones that name a live file; released text (a `CHANGELOG.md`, a released changeset, a migration entry of a past major) is not rewritten;\n - prove the rename with the i18n bundles: `node scripts/check-i18n-bundles.mjs --write` changes no bundle value, and `pnpm check:i18n` is green.\n - **First step, before any edit**: measure use of today's `defineForm` outside this repository (hotcrm, cloud, anything published that imports it) and record the reading in the PR, with the tree and commit it was taken on. The ruling rests on that use being platform-internal.\n - **If outside use is found: stop and report `needs_decision`.** The fallback is a new factory name, ⛔ never a dual-meaning overload, and by the ruling it returns to the maintainer for a word before it is built. It is not the dev's or the seat's to take.\n4. **The projection** (D5): one pure function beside `expandViewContainer` that turns a `view` body into the `form` items it carries (the container's `form`, each `formViews` entry, a `viewKind: 'form'` item), under the name each is served as today, an item's `config` lifted to the top level (ruled question 5). It is the only reader of the old shapes for form content: loader, stored-row read, doors, withdrawal judgement and lint all call it.\n5. **Reads and writes of `form`**: authored items plus projected ones, a projected item marked in its read envelope; an authored item shadows a projected one of the same name in the same package, inside one layer (a package's source item over the projection of its own source; a stored `form` row over the projection of a stored row at the same address), and ⛔ a package's source item never shadows the projection of a stored row; a `form` save, reset or delete at `(package, name)` also removes the old-shape row carrying that form at that address, in the same transaction (an item-shaped `view` row deleted, a stored container re-saved without the form). ⛔ It removes form content only: a list item of type `view` that holds the same `OBJECT.KEY` name is left untouched.\n - **A stored old-shape row keeps replacing its base's form when the base moves to `form`** (ADR-0159 D5, D6 rule 11). The overlay merge runs inside one type today (`mergePackageAwareOverlay`), and a package may move its source to `forms:` while a stored `view` row still stands over the form (card ④ does that to first-party apps). So the effective `form` read resolves a package's form over both types in the one served-row order (`servedOverlayRowCandidates`): the stored `view` row that order picks at the package's address — the pair's declared override, a row bound to the package, a package-less row, a stored container whose expansion writes the name — is served, as the `form` item it projects, over the package's source `form` item of that name. A stored `form` row at the same place in the order wins over the stored `view` row.\n - **A stored `view` row that carries no form at a form's name is read as written over the form only in three bindings** (ADR-0159 D5): two are closed by a write door that exists today, the third by a refusal this card adds. A list and a form of one name are two items (D3), so a list row closes nothing by sharing a form's name. Nothing is served for the name from the package only where the row is: a declared override of the package (the override write gate refuses a declaration of an item its base does not ship in that type, `declared_package_ships_no_such_item`); a row bound to a read-only package (once the package ships the name as a `form` item, a `view` save naming the package there is a new item in a read-only package and is refused, `WRITABLE_PACKAGE_REQUIRED`); or a package-less row, an item or a stored container whose expansion writes the name. ⛔ A list saved in a package beside the form (an app of the environment's own, or the base's pair as the pair's own item with no `overrides`) is never read this way, as an item or as a container's expansion: the form stays served. A row in a writable package is that package's own item, and a read-only package's own `views:` container that expands a list at the name of its own `form` item is its list beside its form.\n - **For the served `form` read the projection reads served rows only** (ADR-0159 D5). A stored `view` row enters the effective `form` read through the projection only where the served-row order serves that row today; a row the order passes over is projected into no served read (it stays in the withdrawal layer, where it may only narrow). ⛔ Do not project every stored `view` row. **\"Served\" is asked at each package's address**, inside the `form` read's own resolution over both types, and ⛔ never taken from the effective `view` list: one row can be the served row at one package's address and be passed over at another's (a package-less row is in every package's order). Once a read-only package authors its form in `forms:` it has left the `view` type, so the `view` merge no longer resolves its address; a package-less row that stands over its form is still the served body there, whatever a writable package holds at the name. The case it decides: a package-less `view` row that carries an open form, behind a writable package's own `view` row that carries a list of the same name, is read by no layer today and both doors answer `404`; they answer `404` after this card too.\n - **Add one refusal, kept as long as rule 11's replacement check is kept (card ⑤ does not remove it): every package-less `view` write that would store a list at a name a read-only package authors as a `form` item** (in `forms:`; a form the projection reads out of a package's old shape does not trigger it). No door of today closes it: ADR-0146 D11's close (`packagelessOverlayWriteRefusal`) refuses only where its ceremony would move the row (it stays open for a name several packages ship, a base whose pair cannot be formed or ensured, a container body, a row whose pair already holds the item), and the container name-collision refusal in `protocol-save.ts` judges names shipped as `view` items. ⛔ Do not build it by extending the D11 close: it must not ask the state of the base's pair or how many packages ship the name. It covers a save, the publish of a draft, and a rollback to a version that carries a list at the name (a delete is not judged: it stores nothing), of an item and of a container whose expansion writes the name (judge the expansion as the readers place it, as the container name-collision refusal does), and a re-save of a row already stored (the stored row keeps its bytes). It sits beside the container name-collision refusal and answers with its envelope (`VALIDATION_ERROR`, `400`); no new error code. The message names the form and the two saves that work whether or not the base has a pair: another key, or the list saved into an app of the environment's own. ⛔ It never prescribes a save under a name another stored row holds. A package-less `view` write that carries a form at the name is an old-shape write of the form and saves as before. **It refuses saves that are admitted today**, where the package's form is still an old-shape `view` item: several read-only packages ship the name; the base has no pair that can be formed or ensured; a re-save of a stored row whose pair already holds the item; a container that overlays the package's own container by its own name. Name these and the door that remains in the changeset.\n - **Known limit, fail-closed**: a package-less row that carries a list at the name and was stored before this refusal judged the write (before the package shipped anything under the name, or through a corner today's doors leave open) is read the same way, an item and a container's expansion alike (today's answer inside one type). The form's layered read names the row that stands over it.\n - **Measure first**: does any write door admit a declared override whose body carries no form at a name its base ships as a form (a list item saved over a form's name)? Record the reading in the PR with the tree and commit, and report it either way. The disposition at major 19 of a row that carries no form over a linked base is ruled (ruling record 7136809727 on #36868 (「两类特殊的旧存储行怎么处置。不考虑」)): it gets none of its own and stays as stored. The measurement says only whether the declared row can exist. If a door admits it, the closed-reading pin below gains that row as a second fixture in this change.\n6. **The anonymous doors and the withdrawal judgement over both types** (D6, rules 1 to 9 and 11): candidates from the effective `form` read, resolved over both types as item 5 says, so a stored row that closes an address by replacing its base's body keeps closing it; the withdrawal layer is the effective lists and the per-package layers of both `form` and `view`, old shapes passed through the projection first; narrowing only, in both directions; identity is the served name and, inside one name, the whole item, so a same-name withdrawal closes the form whatever slug either side declares, and a definition under another name is a different form (rule 6: the slug match decides no case in this layer); a stored body the projection cannot read closes the links it names and says so once at `error`. `404 FORM_NOT_FOUND` for a switched-off form is unchanged. The tenancy intake advisory and the organization-scoped refusal judge `form` writes too.\n - **The reader of old-shape withdrawals is exempt from ADR-0087's kit age-out** (ruled question 4 = A, D6 rule 10, D7; a permission boundary). Build the read of a withdrawal in a stored old-shape body as its own named function inside the two-type layer, and mark the exemption where it lives: ADR-0159's id and the words \"exempt from the ADR-0087 age-out; leaves only by a release whose upgrade precheck refuses a deployment still holding an old-shape form row\" in its docblock, and its own anchor file in `scripts/adr-anchors/`. ⛔ It is not registered as an ADR-0087 conversion-layer entry, so no retirement clock starts on it. No withdrawn public form may re-open. The precheck itself is card ⑤'s (major 19).\n7. **The public address clash** (ruled question 3 = A). The `form` write door, `os validate` and publish each refuse a `form` whose open slug another form already holds, naming both forms. It is a refusal on the new type only: an old-shape `view` write keeps today's first-match behaviour, and nothing an author has today narrows. \"Another form\" is judged over the effective `form` read, so a projected old-shape form holding the slug counts. A form holds an address while its `sharing.publicLink` names it, switched on or off (ADR-0159 question 3, \"What holds means\"): a switched-off form that keeps its link still holds it. The refusal is judged at every `form` save that leaves the form open, Setup's switch included. That reading is the record's own, marked outside the ruled block. It refuses one arrangement that is served today: a retired form that keeps its link, switched off, beside its successor open on the same address. The doors keep serving what is stored; the successor's next `form` save and `os validate` are refused, naming both, until the retired form's link is cleared. A new error code goes through the ledger (`check:error-code-casing`).\n8. **Translations** (D8): the `forms` family in the bundle schema, the extractor and the translation lint; the translator reads `forms.NAME` first and the form tails under `objects.OBJECT._views.KEY` as the declared fallback; section copy keeps `objects.OBJECT._sections.SECTION` as its object-level default. `label` and `description` under `_views.KEY` are not form tails: they are neither moved nor read as a fallback (ADR-0159 D8).\n9. **Lint**: the form walkers read `form` items and the projection; the consumer-less warning of D1 (successor of `form-view-internal-not-loaded`). ⛔ It is not raised for an item that declares `overrides` when the base's form of that name has a consumer: an override with no link over a linked form is what keeps that address closed, and a warning that it steers nothing would invite its removal.\n10. Leave the ADR id in the code, and anchor the doors' two-type read and the exempt withdrawal reader in `scripts/adr-anchors/` (one file per anchor).\n\n## Done when\n\n- A stack with `forms: [...]` loads, serves `GET /api/v1/meta/form` and `/api/v1/meta/form/NAME`, and publishes; `os validate` refuses a name whose prefix differs from `object`, an authored `data` key, and a taken public address; the metadata save door and publish refuse the taken address too. Each of the three refusals has a pin asserting status and `code` and naming both forms, one pin shows an old-shape `view` write on a taken slug still saves as before, and one pin shows a `form` saved open on the address of a switched-off form is refused (ablate: the switched-off half of the holder read).\n- A `form` save, a reset and a delete at a name a list item of type `view` holds each leave the list row byte-equal (ADR-0159 D5; ablate: the form-content test of the old-shape row removal).\n- The row that carries no form at a form's name (ADR-0159 D5), two pins, each with an ablation:\n - the bound: over a package that authors an open `form` item, a list saved package-less at the form's name is refused (status `400`, `code` `VALIDATION_ERROR`), a package-less container whose expansion writes a list at that name is refused, and both are refused where the base's pair cannot be ensured; the same list saved into an app of the environment's own, and into the pair as its own item, saves; after all of them the two doors serve the package's form at its address (ablate: the bound, by letting the reading take any stored `view` row of the name; the doors answer `404`. Ablate: the expansion half of the refusal; the container saves and the doors answer `404`);\n - the closed reading: a package-less `view` row that carries a list at the name, seeded as stored, keeps both doors at `404` at the package's address, and so does a stored package-less container whose expansion writes a list there (ablate: fall through to the package's source `form` item when the stored row projects no form).\n- Served rows only (ADR-0159 D5), one pin with an ablation: a writable package's own `view` row that carries a list, and a package-less `view` row of the same name that carries an open form; both doors answer `404` at the form's address before this card's change and after it (ablate: project every stored `view` row into the `form` read; the address answers). A second fixture, for the address: a read-only package authors an open `form` item, and a package-less `view` row of that name whose form has no link stands over it; a list of the name is then saved into an app of the environment's own, and into the pair as its own item; both doors answer `404` at the package's address before the list is saved and after it (ablate: take the served rows from the effective `view` list; the address answers).\n- A stack that still authors the three old shapes loads unchanged, and each of its forms is also served as a `form` item under the same name. `GET /api/v1/meta/view` answers exactly what it answered before (pin against a fixture taken before the change).\n- The public form of `examples/app-crm` answers at its address before and after, byte-equal on the resolve door.\n- The eight D6 pins exist, each asserting status, `code` and that no record was written, each with one ablation run recorded in the PR (rebuild, on-disk mutation proof, restore proved by an empty `git diff HEAD`):\n - withdrawn by a `view` override in `.custom`, open as an authored `form` of the same name;\n - the mirror (withdrawn by a `form` override, open as an old-shape item in the base);\n - withdrawn in a container's `formViews` entry, open as a `form` item named for the expansion;\n - withdrawn in a body of the same name whose link names another slug than the open definition's: both doors answer `404` at the open definition's address (ablate: the whole-item match of rule 6, by making it require an equal slug);\n - a per-package-layer withdrawal in either type;\n - an unreadable old-shape body closes its links;\n - replacement across the types (rule 11): a stored `view` override in `.custom` whose body has no `publicLink`, over a base that authors the same name as an open `form` item, and its twin with a package-less row: both doors answer `404` at the base's address (ablate: the cross-type resolution of item 5, by serving the package's source `form` item when the stored row is a `view` row);\n - the submit door refuses wherever the resolve door does.\n- The exempt reader: `pnpm check:adr-anchors` is green with its anchor; the unreadable-body and `view`-override pins above are the ones that turn red when it is removed (their ablations say so).\n- The PR records the outside-use reading for `defineForm` (question 1) before the rename's first commit.\n- `customization-package.test.ts` is green with the new row; the showcase coverage test is green.\n- Changeset: `minor` on every package the diff moves, `Metadata-protocol: narrowed` in the PR body and the changeset; the BREAKING banner and the ADR-0087 disposition for the `defineForm` export change (ruled question 1), with the FROM and TO mapping (`defineForm` for a schema-bound Studio form becomes `defineMetadataForm`), and for the refusal of item 5: the saves it refuses that are admitted today, and the one-line fix (another key, or the list saved into an app of the environment's own). Exactly one ADR-0087 disposition marker covers the export break and the refusal together: a registered semantic entry, or a category that rests on a checked fact. ⛔ Not `not-required (no-migration-prescription)`: it is refused on a declared narrowing. The seat settles the `Clause-②:` line and the PR title's `!` at claim against that export break.\n- `packages/spec` generated artifacts regenerated and committed.\n\n## Not in this card\n\n- No tombstone, no conversion, no stored-row ceremony, no upgrade precheck (card ⑤).\n- No rename of any form (ruled question 2 = A: the name stays `OBJECT.KEY`).\n- This card stays one card and one PR, spec and server together, so the doors' two-type read and its security pins land in one change (the seat's call, on the ruling record); it splits only if its size passes the 3,000-line threshold.\n- No console change (card ③). The shipped console keeps working against `view`.\n- No move of example or HotCRM sources beyond the one showcase item (card ④).\n\n## Security\n\nThe doors change which metadata type they read an anonymous admission from. A dev that finds a way to re-open a withdrawn form reports it through the private channel and stops; it is not fixed in passing. Contract-tier review is required on this PR.\n\nDedupe words: form metadata type, forms collection, anonymous form doors both types, withdrawal projection, defineForm rename, metadata-form suffix." }, { "card": "5", "replaces": "the card 5 body in dev report 7136618721", "body": "Source: ADR-0159 (PR #36957), decision D7 and ruled merge question 4 (ruling record 7131569242 on #36868, 2026-11-24: 「表单拆成独立 form 元数据类型的 5 个合并问题 都同意」, all option A). Parent: #36868, card ⑤ of five. This card is cut only when the maintainer opens protocol major 19.\n\nBlocked-by: CARD-3\nBlocked-by: CARD-4 (both halves; the seat writes the numbers)\nMetadata-protocol: narrowed\nClause-②: yes (narrowing) (seat to confirm at claim)\n\nGrading: `area:build` · Feature (breaking, major) · `view` becomes lists only; the three old form shapes are refused with a prescription and migrated · every app that authored a form inside a view, and every deployment with stored forms · evidence: ADR-0159's census at `main` `62692b7f8b` (256 files name the shapes, 158 of them tests). p2 until the major is opened.\n\n## What to build\n\n1. **Tombstones**: the container's `form` and `formViews`, the `form` member of `ViewKindSchema`, and the `form` arm of the item and wire schemas, each refused with a prescription naming `forms:`. The two form tails under an object's view translations tombstoned with the prescription naming `forms.NAME`. Follow the `spec-property-retirement` playbook; do not rebuild the kit by hand.\n2. **Two ADR-0087 conversions, `toMajor: 19`**: on the stack, move each named form from `views[]` to `forms[]` under the projection's name, lift the binding to `object`, remove a container left empty; on `translations`, move the form tails. Internal record forms are deleted and reported per form. The set is defined by ADR-0159 D1's test, ⛔ not by `form-view-internal-not-loaded`'s `sharing.enabled` test: a form in a record-form slot (the default `form`, `formViews.default`, `formViews.create`, an item with `isDefault: true` or named `OBJECT.create`) that declares no `sharing.publicLink` and that no action of type `form` targets. A form that declares a `sharing.publicLink` is never internal, switched on or off, in whatever slot (D7-a): it is moved with its `sharing` block as written, the switch included, and so is an action-opened one. A switched-off form that keeps its link is an explicit withdrawal; deleting it would re-open the app's own form. **A form held by an item or a container that carries an `overrides` declaration is moved whatever its body and slot, with the declaration** (D7-b): the conversion cannot read the base's source, and an override with no link over a base form that declares one is what keeps that address closed. Where the base ships no form of that name in either type (read through the projection), `os validate`, which sees both packages, **refuses** the moved item: an error, the grade the override write gate gives a declaration of an item its base does not ship (`declared_package_ships_no_such_item`). The message names the base and the two ways out (remove the item; correct the name); only there is a removal offered, and `os migrate meta` lists it as an edit for the author. **This sentence goes past ruling item 3's words and is ADR-0159's own reading (its TL;DR 10).** Read the record as merged before any edit: if the maintainer struck the reading, the fallback is to leave such an item in `views[]` with a structured TODO, and that fallback needs its own answer for an override over a linked base before it is built — stop and report `needs_decision`. The conversion's output is judged by question 3's refusal like any `form`: a retired form that keeps its link beside its successor on the same address is moved as written, both forms, and `os migrate meta` lists the pair as an edit for the author (clear the retired form's link). A form whose `data.object` disagrees with its container is left with a structured TODO. Fixture pairs cover the three shapes, a mixed container, an item that declares `overrides` with no link in a record-form slot, and the disagreement case.\n3. **The chain entry** for major 19, and `os migrate meta --from 18` listing and applying the edits.\n4. **The stored-row ceremony**: a CLI ceremony in the shape ADR-0131 D10 and ADR-0146 D11 set (read-only by default, `--apply`, idempotent, a per-package report). An item-shaped `view` row with form content becomes a `form` row at the same package and name; a stored container is split; a `.custom` override keeps its package, name, `overrides` declaration and `basedOn`, whatever its body; a package-less overlay row over a packaged form goes to the base's pair as a declared override, with its body as written (its switch when it has one, no link when it has none); a row bound to a read-only base (a customization saved under the base's own id before that door closed, the class `protocol-packageless-overlay-migration.ts` carries) has the same destination; history stays verbatim; internal record forms are reported, never deleted by the ceremony. A form that declares a `sharing.publicLink` is moved with its switch, by the same test as the conversion.\n - **A row that stands over a base form is classed by its base, never by its own body alone** (D7-b). \"Stands over\" means the read serves it in place of a package's own form of the same name: the pair's declared override, a row bound to the base package, a package-less row, a stored container whose expansion writes the name. Read the base's own document in the deployment, in whichever type the package authors it. Where the base's form declares a `sharing.publicLink`, the row is never internal whatever its own body declares (no link, another address, a switch off): it moves as the override it is, body as written, and ⛔ no report or precheck lists it for removal or reset. Removing it serves the base's form again. The internal set therefore has three parts: no `sharing.publicLink`, no action target, and not standing over a base form that declares a link.\n - **Several stored rows of one form fold into one: the body kept is the one served today, and the fold only narrows** (D7-d). Over a read-only base three rows can head for the pair's declared override: the pair's own override, a row bound to the base, a package-less row. For a writable package two head for the package's own row: that row and a package-less row. **The body kept is the one the served-row order serves today** (`servedOverlayRowCandidates`: the pair's override, then the row bound to the package, then the package-less row), whichever binding and type it is stored in, landed as written (a body with no link stays without one). ⛔ Never decide it by the order rows are moved in or by which row reached the destination first: a link-less row bound to the base, over a linked base, beside an open package-less row is closed today, and taking the package-less row first opens the address. Every other row is folded and carries one thing only: if it explicitly withdraws the form, the destination keeps its link and takes that switch off. Nothing else of a folded row is kept. A folded withdrawal a layer reads today (the first of the bound row and the package-less row, under an open override of the pair) must keep closing. A folded withdrawal no layer reads today (a package-less row behind a bound row, or behind a writable package's own row) closes the form newly: the report names the form as newly closed, and the administrator switches it on again in Setup. The report names every row of the form, the one kept, and which one closes the form. **The served row is found among every stored row at the address, whether it carries a form or not, in either type.** Where the row the order picks carries no form at the name, nothing is served for the name today and ⛔ no row of that name is moved: a form row behind it (bound to the base or package-less) stays where it is, and every stored row of the name stays as stored with the no-form row; none holds the upgrade, and the report names each as left in place. Moved alone, the form row would become the pair's override, first in the served-row order, and the address would answer. The same holds where the row picked is a declared `view` override that carries no form, if card ② found a door for one. **A writable package's own list ahead of a package-less form row** is decided by the same rule: the served row is the package's own `view` row, which carries a list, and the package-less row behind it carries a form no layer reads. ⛔ Move no row of the name (moved to the package's own `form` row, the package-less body would be served). The list is the package's own item: not named for any action, and it holds nothing. The package-less form row stays as stored and does not hold the upgrade (ruling record 7136809727 on #36868 (「两类特殊的旧存储行怎么处置。不考虑」)); the report names it as left in place. ⛔ Offer no deletion for it (it declares a link) and no save that would serve it. This is the rule at the writable package's address only: a package-less row that is also the served row at a read-only base's address keeps there its destination in that base's pair, or the hold where the pair cannot be ensured. Ask the served-row order per package address, ⛔ never from the effective `view` list.\n - **A row that carries no form at a name its base ships as a linked form**, in one of the three bindings ADR-0159 D5 bounds (a declared override, a row bound to a read-only base, a package-less row), gets no disposition of its own (ruling record 7136809727 on #36868 (「两类特殊的旧存储行怎么处置。不考虑」); the seat's reading is recorded there): the ceremony writes nothing for it, the precheck does not hold major 19 for it, and it stays as stored. Its base's address stays closed after the major by rule 11's replacement check (item 7). ⛔ A list saved in a package beside the form is not in the class: neither the ceremony nor the precheck names it.\n - **Where the pair cannot be ensured** the ceremony writes nothing for the row: it stays a `view` row (still read by the doors' withdrawal layer), ⛔ is never moved to a package-less `form` row and is never deleted. The report names the row (type, name, base) and repeats the ensure door's own refusal (`customizationPairEnsureRefusal`), with the action for its cause. **A cause the administrator can remove in the deployment** (a package under the pair's id that is not the pair, another owner of the pair's namespace, the App not installed, an earlier version's per-package pair holding the namespace, for which ADR-0146 D11's ceremony runs first): remove it and run `--apply` again. **A cause only the App's author can remove** (no App namespace, or one too long or not valid for a pair namespace; a non-SemVer App version; several Apps and no single one picked): the precheck names the App and the cause, says the fix is its author's and offers no other action; the deployment stays on major 18 until the App ships a fix or is uninstalled, and the row keeps closing meanwhile. **A body the projection cannot read** is in the same class: not moved, holds the upgrade, keeps closing every link it names, and leaves the class by an old-shape save that repairs it.\n - **A base with no pair in this version** (a kernel package, until the kernel whitelist admits it): measured at `689e5695b98` the case is empty, because no package that ships metadata to a deployment authors a form in any of the three shapes. **Take the reading again before any edit** (`git grep -lE \"formViews|viewKind: 'form'|viewKind === 'form'\" -- packages/platform-objects packages/plugins packages/services packages/triggers packages/drivers packages/connectors packages/apps`). If a kernel package ships a named form, stop and report `needs_decision`: the row has no way out without a new mechanism, and that is the maintainer's to decide before major 19 opens.\n - Internal record forms in stored rows (the three-part set above): the administrator removes them (an item-shaped row deleted, a container that also holds lists re-saved without that member). A row of that set holds no switch and replaces no linked body, so removing it changes no door's answer. ⛔ That holds for this set only.\n5. **The upgrade precheck** (ruled question 4 = A): the upgrade to major 19 refuses while a stored old-shape form row exists — one the ceremony can still move, an internal record form, or a row that holds the upgrade (its pair cannot be ensured, or its body cannot be read) — naming the ceremony, each row, and the action for its class (run the ceremony; remove the internal form; the action for the cause, as item 4 gives it). A list in a package at a form's name is not an old-shape form row and is not named. ⛔ Two kinds of row are not counted and do not stop the upgrade (the ruling above): a row that carries no form over a linked base, and a form row no layer reads behind a served row that carries no form. ⛔ It never offers deletion or a reset for a row that declares a `sharing.publicLink`, or for a row that stands over a base form that declares one (D7-e).\n6. **`view` reads serve lists only**; the projection serves no content; the list rung of `anonymousFormObjectName` is removed.\n7. **The withdrawal reader stays** (ruled question 4 = A, a permission boundary): a stored old-shape body that withdraws a form keeps closing it. The reader card ② built is exempt from ADR-0087's kit age-out and ⛔ is not retired, tombstoned or put on a retirement clock by this card; its ADR anchor stays green. No withdrawn public form may re-open. **Rule 11's replacement check keeps the reader's lifetime**: a stored old-shape row found over a package's form after the major still replaces it, so nothing of that name is served from that package while the row stands; the check is not put on ADR-0087's clock and leaves in the release that removes the reader, by the same precheck. That is ADR-0159's own reading past the scope question 4 rules (\"this one reader\"; its TL;DR 10). Read the record as merged before any edit: if the maintainer struck it, register the check as kit on ADR-0087's clock (it leaves one major after major 19) and say so in the PR. **The check covers a row that carries no form, in the bindings D5 bounds**: such a row reaches major 19 as stored, and this check is what keeps its base's address closed there. So ⛔ this card removes neither D5's bounded reading nor card ②'s refusal of a package-less list at a form's name: both last as long as the check.\n8. The `ui/` fixes the removals force ship in the same PR.\n\n## Done when\n\n- Each tombstone refuses at `os validate`, at `defineStack` and at the metadata save door with its prescription (pin the `code`, the status and the located path).\n- The full migration chain replays from the support floor to 19 in CI.\n- The ceremony, run twice on a database seeded with: an item-shaped form row, a container with lists and forms, a `.custom` switch-only override, a package-less overlay, a package-less overlay whose pair cannot be ensured, a switched-off public form in a default slot, a `.custom` override with no link over an open base form, an open override in the pair beside a package-less row that withdraws the form, a link-less row bound to a read-only base beside an open package-less row, a writable package's own open row beside a package-less row that withdraws the form, a no-form row bound to a read-only base beside a package-less row that holds an open form of that name, a writable package's own list row beside a package-less row of the same name that holds an open form, a list saved in a package at a form's name, and an internal record form, reports the same result the second time and moves nothing; each row lands as D7 says.\n- **Security pins, each with an ablation** (ADR-0159 D7; each asserts status, `code` and that no record was written, on both doors):\n - **the switched-off form in a record-form slot**: a public form in the container's default `form` slot, link kept and `enabled: false`, whose name is open in another layer. After the source conversion, and after the ceremony on the stored twin (Setup's switch-off override of that form), it is a `form` item with its switch, the internal-forms report does not list it, and both doors still answer `404`. Ablate: the `publicLink` test of the internal set (judge \"public\" by `sharing.enabled === true`); the pin turns red because the form is deleted or left behind with its withdrawal;\n - **its twin, the link-less row over an open base**: a `.custom` override in the default `form` slot whose body has no `publicLink`, over a base whose default-slot form is open; and the same body as a package-less row. After the source conversion of the pair's own source, and after the ceremony, it is a `form` override with no link, the internal-forms report does not list it, the precheck names no removal for it, and both doors still answer `404` at the base's address. Ablate: the base half of the internal test (class the row by its own body alone); the pin turns red because the report lists the row for removal, and removing it as the report says serves the base's form;\n - **the ceremony keeps a withdrawal closed**: a form withdrawn before it, by a `.custom` switch-only override and by a member of a stored container, answers `404` after it. Ablate: the carry of the `sharing` block in the move;\n - **the fold keeps the served body and only narrows**, five fixtures:\n - an open override in the pair beside a package-less row that withdraws the form answers `404` before the ceremony and after it, and the destination row keeps its link with the switch off. Ablate: the fold's carry of the folded row's switch;\n - the row bound to a read-only base: a row bound to the base whose body has no `publicLink`, over the base's open form, beside a package-less row whose body is open. Both doors answer `404` at the base's address before the ceremony and after it, and the pair's override has no link. Ablate: the choice of the kept body (take the package-less row first, as the row that reaches the pair first); the address answers;\n - the writable-base twin: a writable package's own open row beside a package-less row that withdraws the form. The form is open before the ceremony and answers `404` after it, and the report names it as newly closed. Ablate: the report's line for a newly closed form;\n - the writable package's list ahead of a form row: a writable package's own `view` row that carries a list, beside a package-less `view` row of the same name that carries an open form. Both doors answer `404` at the form's address before `--apply` and after it, the package holds no `form` row of the name, the list row is byte-equal, the report names the package-less row as left in place, and the precheck does not hold the upgrade for it. Ablate: fold the package-less form row into the package's own `form` row; the address answers;\n - the no-form row ahead of a form row: a row bound to the base that carries no form at the name, over the base's open form, beside a package-less row that holds an open form of that name. Both doors answer `404` at the base's address before `--apply` and after it, the pair holds no row of the name, the report names both rows as left in place, and the precheck does not hold the upgrade for them. Ablate: leave the no-form row out of the fold (find the served row among form rows only); the address answers;\n - each \"before\" half proves one of the record's readings of today's layers (read from the code, not run, for the record). If one is not as stated, stop and report;\n - **the precheck refuses**: a deployment holding a stored old-shape form row of each class (movable, internal, pair not ensurable, body not readable) does not reach major 19, and the refusal names the row and its action; for a row that declares a link or stands over a linked base the action is never a deletion or a reset. Ablate: the precheck's read of each class in turn. A list in a package at a form's name is not named. Ablate: D5's bound;\n - **the precheck does not hold the two ruled kinds, and their addresses stay closed**: a deployment whose only such rows are a row that carries no form over a linked base (in a binding D5 bounds) and a package-less form row behind a writable package's list reaches major 19 with each of those rows byte-equal, and both doors answer `404` at each address before the upgrade and on the major-19 build. Ablate: the kept replacement check's read of a row that carries no form; the base's address answers on the major-19 build;\n - **the kept reader still closes after the tombstone**: on a major-19 build a stored old-shape body that withdraws a form still closes it, a stored old-shape row with no link over a package's open form still keeps that address closed, and so does a stored row that carries no form over it, in a binding D5 bounds. Ablate: the exempt reader, then its replacement half;\n - **the row whose pair cannot be ensured** still closes its form before the upgrade — by its switch in one fixture, by replacing an open base in the other — and `--apply` neither deletes it nor moves it package-less. Ablate: the pair-refusal branch of the ceremony.\n- Before tombstoning, measured and recorded in the PR: zero first-party sources author an old shape (this repository's examples, skills and docs; HotCRM at its current head).\n- The full dogfood battery on the final head, once.\n- Changeset: BREAKING banner, the FROM and TO mapping with the one-line fix, exactly one ADR-0087 disposition marker, both declaration lines; `Metadata-protocol: narrowed`.\n\n## Not in this card\n\n- Removing the withdrawal reader. The ruling would let it leave by a release whose upgrade precheck refuses a deployment still holding an old-shape form row, and major 19 is one; ADR-0159 keeps it through major 19 as the record's own narrowing (D7, question 4). Its removal is a later release with its own precheck, and a new decision.\n\nDedupe words: view lists only tombstone formViews, viewKind form retired, migrate forms stored rows ceremony, major 19 form conversion." } ] }objectstack-fleet commentedon Nov 24, 2026
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ
os-dev-report
Patch round: delta contract review 7137988978 (on PR #36957 at head
a9b2da75f7a) folded into ADR-0159, new headd9a00e5acf5, read at 2026-11-24T17:12Z. No ruled line changes. Cards 3, 4a and 4b are unchanged.{ "issue": 36868, "status": "done", "branch": "claude/issue-36868-form-metadata-type-adr", "pr": "https://github.com/objectstack-ai/objectstack/pull/36957", "head": "d9a00e5acf546c27455be88c53241afe0a9c6061", "session": "session_01QSeKYpEsWWE9Y5YtSsDgqZ", "premise_still_valid": true, "summary": "Last prose round, folding delta contract review 7137988978 at head a9b2da75f7a (PASS; S11 open, N16 to N21). origin/main had moved, so it was merged first (b01d8f97e97, clean, no docs/adr path moved; merge commit f17dd598b3f), then one commit on top, d9a00e5acf5, no rebase, ADR-0159 only (15 insertions, 14 deletions against a9b2da75f7a). The ten Ruled: A and Ruling-ref lines are byte-identical (md5 ce1a37ec97b8231d621ca355872475d9 before and after; none is a changed line in git diff -U0). S11: the three stale sentences are replaced by the review's own one-sentence fixes, and D5's list lead carries its clause. N16: one wording in the three places for which rows the ruling names and which this record reads in; the not-counted test is asked per package address. N17: the maintainer's confirmation (record 7137033870, 「同意」) is cited beside the ruling record and the reading is no longer called open to correction. N18, N20 and N21 are folded as worded; N19 is in the replacement PR body. The two leftovers are fixed. Nothing the review marks closed was reopened. The count of points past the ruling's words stays five.", "tests": "No test owed: the diff is docs/adr only, no behaviour changed, nothing ablated. Edits applied by a script of 15 exact-substring replacements, each matched exactly once. git status clean at d9a00e5acf5 after the gates.", "gates": "Local at d9a00e5acf5, exit codes captured before any pipe: the 21 commands of dispatch-gates --commands (the same 21 as the last round) all exit 0. Reconciliation line: dispatch-gates --ran: 21 derived famil(ies) accounted for, 21 run, 0 NOT-MEASURED (a DERIVED zero, all 21 recorded an exit code and none of them is 3). check:doc-formula-expressions: two attempts did not get the verify lock (VERDICT queue-timeout, exit 99, waited 540s each), read as NOT MEASURED; the third attempt with the same slot (issue-36868-r9) ran it after turbo build of the lint package: VERDICT command-exit 0, waited 141s, held 135s. The reconciliation was made after that verdict. check:adr-symbol-anchors exit 0, check:adr-index exit 0 (README unchanged), check:nul-bytes exit 0. CI check-runs at d9a00e5acf5 when read: 44 runs, all completed, none failed; 25 success, Lint & Repo Gates and TypeScript Type Check among them; 19 skipped.", "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm", "mcp_calls": "0", "api_writes": "1 — this comment, POST issues/36868/comments via post-stamped. Plus one git push (a9b2da75f7a..d9a00e5acf5). Reads: gh api GET on review comment 7137988978, confirmation comment 7137033870, the PR, and the head's check-runs.", "open_questions": [], "security_findings": "none", "out_of_scope_findings": [], "deviations": [ "The gate run was started in the background and waited on in the foreground, because the verify lock queue was longer than one foreground call; its results and all three lock verdict lines were read after it ended.", "The harness attribution reminder asks for a model-named Co-Authored-By trailer; the merge commit and the commit carry the model-free pair AGENTS.md requires.", "Every git command of this round named the worktree with git -C; the shared checkout was not written." ], "notes_for_the_seat": [ "N16, the pin notes on card 5: the precheck pin's positive half now has the form row left behind a no-form row as a third fixture, and a fourth fixture for the address (a package-less row passed over at a writable package's address that is the served row at a read-only base whose pair cannot be ensured still stops the upgrade; ablate: ask not counted by name and not per package address).", "N20: the clause that striking the fifth point returns the later ruling to the maintainer now stands at TL;DR 10's fifth point, in the second marked paragraph after question 4, and in the quick-read's item 5 of the replacement PR body. The quick-read's last item says no closed form opens as long as item 5 stands, and that the reading was confirmed.", "N21: the marked paragraph has a bullet on what a later release owes. Card 5's Not in this card section says the same for the removal of the reader or of the replacement check.", "PR body: not written by this run. The replacement is the local file /tmp/claude-0/-home-user-objectstack/4ab22c9e-ace8-5531-a47d-60e7382f257d/scratchpad/issue-36868/r9/prbody-r9.md, built from the body on GitHub as read this round. N19: its D7 bullet no longer says the rows hold the upgrade, and Read first items 2 and 4 no longer call earlier text new text of this round. It ends with the signed trailer.", "Cards 3, 4a and 4b are unchanged (card 3 from dev report 7131979790, 4a and 4b from 7133812384). Cards 2 and 5 are replaced below; card 2's only change is the withdrawal-layer wording." ], "proposed_cards_changed": [ { "card": "2", "replaces": "the card 2 body in dev report 7137734330", "body": "Source: ADR-0159 (PR #36957), decisions D1 to D6 and D8, and its five ruled merge questions. Parent: #36868, card ② of five. Maintainer ruling 2026-11-24, record 7123091354 on #36444: 「拆成 form 类型,对外表单并入」. The five merge questions are ruled (ruling record 7131569242 on #36868, 2026-11-24: 「表单拆成独立 form 元数据类型的 5 个合并问题 都同意」, all option A); questions 1, 3, 4 and 5 are requirements of this card, marked below. They are decided: ⛔ none is re-opened here.\n\nBlocked-by: #36868\nMetadata-protocol: narrowed\nClause-②: the `(narrowing)` arm is required with `narrowed` (the changeset gate reads `narrowed` beside a line without it as a contradiction; it brings the title's `!` and the dogfood battery); only its yes or no is the seat's at claim\n\nGrading: `area:build` · Feature · adds the `form` metadata type and serves it · builders and administrators who author or publish forms · evidence: ADR-0159's readings at `main` `62692b7f8b`. p1 by the blocker rule (#36444 waits on card ③, which waits on this).\n\n## What to build\n\nOne releasable change. Nothing an author wrote stops loading, and `view` reads behave as before. Old-shape writes save as before with one exception (item 5): a package-less `view` write that would store a list at a name a read-only package authors as a `form` item is refused, and some of those saves are admitted today. That is why the card is `narrowed` and not `added` (a value refused is `narrowed`; several kinds take `narrowed` over `added`).\n\n1. **The type** (ADR-0159 D2, D3). A `FormSchema` in `packages/spec/src/ui/`, derived by reference from `FormViewSchema`: `name` (qualified `OBJECT.KEY`, the part before the last segment must equal `object`), `object` (required), `label` (optional), the form body at the top level (ruled question 5: no `config` wrapper), plus `protection`, the ADR-0010 fields and the ADR-0146 `overrides` declaration. No `viewKind`, `config`, `isDefault`, `order` or `scope`. `data` is refused by name with the prescription to bind with `object`.\n2. **Registration, in one change**: the `MetadataTypeSchema` member, the `DEFAULT_METADATA_TYPE_REGISTRY` row (`page`'s flags; file patterns `**/*.form.ts|yml|json`; the suffix is free once item 3's rename has moved the Studio modules off it), the metadata-core lockstep enum, the type-to-schema map, the stack collection `forms` with its plural and singular map entries, and `form: listed` in `OVERRIDE_TYPE_CLASSIFICATION` (the pin in `customization-package.test.ts` fails without it). The showcase's `KIND_COVERAGE` row with one authored `form` item: a new form, ⛔ not a move of a form the console opens today (the console reads forms from `view` until card ③).\n3. **The factory** (ruled question 1 = A). `defineForm` becomes this type's factory and the existing Studio schema-bound metadata-form helper is renamed `defineMetadataForm`, both in this card, as a declared compiler-carried export break.\n - **Scope of the rename, counted from the tree** (ADR-0159 question 1, \"For the cards\"; at `689e5695b98` `git grep -lw defineForm` names 60 files, 41 of them code). Count again at your own head and put the count in the PR:\n - 17 `*.form.ts` modules under `packages/spec/src` that import and call it;\n - 3 that declare, export or build around it: `packages/spec/src/ui/view.zod.ts`, `packages/spec/src/index.ts`, and `packages/spec/tsup.config.ts`, whose pure-constructor set names it (the renamed helper joins that set);\n - 4 tests: 3 under `packages/spec` that call it, 1 under `packages/lint` that names it in a test title;\n - 17 that name it only in a comment: 10 tests (9 under `packages/spec` and `packages/lint`, 1 under `ui/`) and 7 sources (3 under `packages/lint/src`, 2 under `packages/spec/src/system`, `packages/cli/src/utils/config.ts`, `scripts/i18n-bundle-surface.mjs`);\n - 19 that are not code: 6 generated outputs to regenerate (the `packages/spec` API-surface and export-origin snapshots, the generated reference page), 9 released or historical texts ⛔ not edited (seven `CHANGELOG.md`, a released notes page, an audit), and 4 hand-written (two `packages/spec/liveness/` files, one internal skill under `.claude/`, this ADR). The `.claude/` file is a governed path: leave it out of this PR and name it in the report for the seat.\n - **The file suffix moves with the name** (ADR-0159 D2; the owning seat's routing on question 1, seat record 7132202077 on PR #36957, not the ruling's own words). The `form` type takes `*.form.ts`. The 17 Studio modules are renamed `*.metadata-form.ts`, and `METADATA_FORM_MODULE_SUFFIX` in `scripts/i18n-bundle-surface.mjs` becomes `.metadata-form.ts`. Readers of the suffix, measured at `689e5695b98` (count again at your head):\n - the one matcher, `scripts/i18n-bundle-surface.mjs` (constant and predicate), and the files that spell the suffix beside it: `scripts/pm/dispatch-gates.self-test.mjs` on nine lines across several cases (5641 to 5691, and 5881), one of which asserts `endsWith('.form.ts')` on the live walk (line 5662) and so fails as soon as the modules are renamed; the kind text in `scripts/pm/dispatch-gates.data.mjs`; a fixture path in `scripts/pm/landing-k.mjs`; the comments of `scripts/check-i18n-bundles.mjs` (lines 163 to 170). `scripts/ablation-dist-preflight.mjs` names a temporary fixture file `skill.form.ts` and reads no suffix. `scripts/pm/dispatch-gates.mjs` (Tier H) imports the predicate and spells no suffix: ⛔ do not edit it; if your head shows it must change, stop and report;\n - import specifiers: 31 files under `packages/spec/src` import a `.form` module (the seven domain barrels, `system/metadata-form-registry.ts`, 23 tests). Thirty spell it `./NAME.form`; `packages/spec/src/kernel/repeater-item-titles.test.ts` imports 15 modules as `../DIR/NAME.form`. Sweep by both spellings;\n - **text that teaches the suffix: re-word it, do not re-point it.** Once `*.form.ts` is the new type's suffix, \"a `*.form.ts` module binds `data`\" teaches the wrong root for an app's `lead.form.ts`. Name the Studio modules by their new suffix in: the `data` root explanation in `packages/lint/src/rule-explanations.ts`; the `data` arm of the message in `packages/lint/src/validate-expressions.ts` (it spells `*.form`); the docblock wording of `packages/lint/src/validate-visibility-predicates.ts` together with the two `toContain` pins on it in `validate-visibility-predicates.test.ts`, and a third string pin in the same test file, on the emitted text: the tokens the explanation of the mislayered-root rule must print (the `MOVED` table lists `*.form.ts` for `VISIBILITY_ROOT_MISLAYERED`, line 1904 at `be1c0cbd4da`), which changes with the explanation in `rule-explanations.ts`; and the row \"Metadata-editing forms (`*.form.ts`)\" in `content/docs/protocol/objectui/layout-dsl.mdx`;\n - generated outputs that print the module paths (`packages/spec/export-origins/`): regenerate, never hand-edit;\n - path citations in ledgers, checklists and comments (`packages/spec/liveness/`, `docs/qa/platform-checklist/areas/`, comments under `packages/lint/src`, `packages/cli/src`, `ui/packages/app-shell/src/views/metadata-admin/`): re-point the ones that name a live file; released text (a `CHANGELOG.md`, a released changeset, a migration entry of a past major) is not rewritten;\n - prove the rename with the i18n bundles: `node scripts/check-i18n-bundles.mjs --write` changes no bundle value, and `pnpm check:i18n` is green.\n - **First step, before any edit**: measure use of today's `defineForm` outside this repository (hotcrm, cloud, anything published that imports it) and record the reading in the PR, with the tree and commit it was taken on. The ruling rests on that use being platform-internal.\n - **If outside use is found: stop and report `needs_decision`.** The fallback is a new factory name, ⛔ never a dual-meaning overload, and by the ruling it returns to the maintainer for a word before it is built. It is not the dev's or the seat's to take.\n4. **The projection** (D5): one pure function beside `expandViewContainer` that turns a `view` body into the `form` items it carries (the container's `form`, each `formViews` entry, a `viewKind: 'form'` item), under the name each is served as today, an item's `config` lifted to the top level (ruled question 5). It is the only reader of the old shapes for form content: loader, stored-row read, doors, withdrawal judgement and lint all call it.\n5. **Reads and writes of `form`**: authored items plus projected ones, a projected item marked in its read envelope; an authored item shadows a projected one of the same name in the same package, inside one layer (a package's source item over the projection of its own source; a stored `form` row over the projection of a stored row at the same address), and ⛔ a package's source item never shadows the projection of a stored row; a `form` save, reset or delete at `(package, name)` also removes the old-shape row carrying that form at that address, in the same transaction (an item-shaped `view` row deleted, a stored container re-saved without the form). ⛔ It removes form content only: a list item of type `view` that holds the same `OBJECT.KEY` name is left untouched.\n - **A stored old-shape row keeps replacing its base's form when the base moves to `form`** (ADR-0159 D5, D6 rule 11). The overlay merge runs inside one type today (`mergePackageAwareOverlay`), and a package may move its source to `forms:` while a stored `view` row still stands over the form (card ④ does that to first-party apps). So the effective `form` read resolves a package's form over both types in the one served-row order (`servedOverlayRowCandidates`): the stored `view` row that order picks at the package's address — the pair's declared override, a row bound to the package, a package-less row, a stored container whose expansion writes the name — is served, as the `form` item it projects, over the package's source `form` item of that name. A stored `form` row at the same place in the order wins over the stored `view` row.\n - **A stored `view` row that carries no form at a form's name is read as written over the form only in three bindings** (ADR-0159 D5): two are closed by a write door that exists today, the third by a refusal this card adds. A list and a form of one name are two items (D3), so a list row closes nothing by sharing a form's name. Nothing is served for the name from the package only where the row is: a declared override of the package (the override write gate refuses a declaration of an item its base does not ship in that type, `declared_package_ships_no_such_item`); a row bound to a read-only package (once the package ships the name as a `form` item, a `view` save naming the package there is a new item in a read-only package and is refused, `WRITABLE_PACKAGE_REQUIRED`); or a package-less row, an item or a stored container whose expansion writes the name. ⛔ A list saved in a package beside the form (an app of the environment's own, or the base's pair as the pair's own item with no `overrides`) is never read this way, as an item or as a container's expansion: the form stays served. A row in a writable package is that package's own item, and a read-only package's own `views:` container that expands a list at the name of its own `form` item is its list beside its form.\n - **For the served `form` read the projection reads served rows only** (ADR-0159 D5). A stored `view` row enters the effective `form` read through the projection only where the served-row order serves that row today; a row the order passes over is projected into no served read (it stays in whichever withdrawal layer reads it today, where it may only narrow). ⛔ Do not project every stored `view` row. **\"Served\" is asked at each package's address**, inside the `form` read's own resolution over both types, and ⛔ never taken from the effective `view` list: one row can be the served row at one package's address and be passed over at another's (a package-less row is in every package's order). Once a read-only package authors its form in `forms:` it has left the `view` type, so the `view` merge no longer resolves its address; a package-less row that stands over its form is still the served body there, whatever a writable package holds at the name. The case it decides: a package-less `view` row that carries an open form, behind a writable package's own `view` row that carries a list of the same name, is read by no layer today and both doors answer `404`; they answer `404` after this card too.\n - **Add one refusal, kept as long as rule 11's replacement check is kept (card ⑤ does not remove it): every package-less `view` write that would store a list at a name a read-only package authors as a `form` item** (in `forms:`; a form the projection reads out of a package's old shape does not trigger it). No door of today closes it: ADR-0146 D11's close (`packagelessOverlayWriteRefusal`) refuses only where its ceremony would move the row (it stays open for a name several packages ship, a base whose pair cannot be formed or ensured, a container body, a row whose pair already holds the item), and the container name-collision refusal in `protocol-save.ts` judges names shipped as `view` items. ⛔ Do not build it by extending the D11 close: it must not ask the state of the base's pair or how many packages ship the name. It covers a save, the publish of a draft, and a rollback to a version that carries a list at the name (a delete is not judged: it stores nothing), of an item and of a container whose expansion writes the name (judge the expansion as the readers place it, as the container name-collision refusal does), and a re-save of a row already stored (the stored row keeps its bytes). It sits beside the container name-collision refusal and answers with its envelope (`VALIDATION_ERROR`, `400`); no new error code. The message names the form and the two saves that work whether or not the base has a pair: another key, or the list saved into an app of the environment's own. ⛔ It never prescribes a save under a name another stored row holds. A package-less `view` write that carries a form at the name is an old-shape write of the form and saves as before. **It refuses saves that are admitted today**, where the package's form is still an old-shape `view` item: several read-only packages ship the name; the base has no pair that can be formed or ensured; a re-save of a stored row whose pair already holds the item; a container that overlays the package's own container by its own name. Name these and the door that remains in the changeset.\n - **Known limit, fail-closed**: a package-less row that carries a list at the name and was stored before this refusal judged the write (before the package shipped anything under the name, or through a corner today's doors leave open) is read the same way, an item and a container's expansion alike (today's answer inside one type). The form's layered read names the row that stands over it.\n - **Measure first**: does any write door admit a declared override whose body carries no form at a name its base ships as a form (a list item saved over a form's name)? Record the reading in the PR with the tree and commit, and report it either way. The disposition at major 19 of a row that carries no form over a linked base is ruled (ruling record 7136809727 on #36868 (「两类特殊的旧存储行怎么处置。不考虑」)): it gets none of its own and stays as stored. The measurement says only whether the declared row can exist. If a door admits it, the closed-reading pin below gains that row as a second fixture in this change.\n6. **The anonymous doors and the withdrawal judgement over both types** (D6, rules 1 to 9 and 11): candidates from the effective `form` read, resolved over both types as item 5 says, so a stored row that closes an address by replacing its base's body keeps closing it; the withdrawal layer is the effective lists and the per-package layers of both `form` and `view`, old shapes passed through the projection first; narrowing only, in both directions; identity is the served name and, inside one name, the whole item, so a same-name withdrawal closes the form whatever slug either side declares, and a definition under another name is a different form (rule 6: the slug match decides no case in this layer); a stored body the projection cannot read closes the links it names and says so once at `error`. `404 FORM_NOT_FOUND` for a switched-off form is unchanged. The tenancy intake advisory and the organization-scoped refusal judge `form` writes too.\n - **The reader of old-shape withdrawals is exempt from ADR-0087's kit age-out** (ruled question 4 = A, D6 rule 10, D7; a permission boundary). Build the read of a withdrawal in a stored old-shape body as its own named function inside the two-type layer, and mark the exemption where it lives: ADR-0159's id and the words \"exempt from the ADR-0087 age-out; leaves only by a release whose upgrade precheck refuses a deployment still holding an old-shape form row\" in its docblock, and its own anchor file in `scripts/adr-anchors/`. ⛔ It is not registered as an ADR-0087 conversion-layer entry, so no retirement clock starts on it. No withdrawn public form may re-open. The precheck itself is card ⑤'s (major 19).\n7. **The public address clash** (ruled question 3 = A). The `form` write door, `os validate` and publish each refuse a `form` whose open slug another form already holds, naming both forms. It is a refusal on the new type only: an old-shape `view` write keeps today's first-match behaviour, and nothing an author has today narrows. \"Another form\" is judged over the effective `form` read, so a projected old-shape form holding the slug counts. A form holds an address while its `sharing.publicLink` names it, switched on or off (ADR-0159 question 3, \"What holds means\"): a switched-off form that keeps its link still holds it. The refusal is judged at every `form` save that leaves the form open, Setup's switch included. That reading is the record's own, marked outside the ruled block. It refuses one arrangement that is served today: a retired form that keeps its link, switched off, beside its successor open on the same address. The doors keep serving what is stored; the successor's next `form` save and `os validate` are refused, naming both, until the retired form's link is cleared. A new error code goes through the ledger (`check:error-code-casing`).\n8. **Translations** (D8): the `forms` family in the bundle schema, the extractor and the translation lint; the translator reads `forms.NAME` first and the form tails under `objects.OBJECT._views.KEY` as the declared fallback; section copy keeps `objects.OBJECT._sections.SECTION` as its object-level default. `label` and `description` under `_views.KEY` are not form tails: they are neither moved nor read as a fallback (ADR-0159 D8).\n9. **Lint**: the form walkers read `form` items and the projection; the consumer-less warning of D1 (successor of `form-view-internal-not-loaded`). ⛔ It is not raised for an item that declares `overrides` when the base's form of that name has a consumer: an override with no link over a linked form is what keeps that address closed, and a warning that it steers nothing would invite its removal.\n10. Leave the ADR id in the code, and anchor the doors' two-type read and the exempt withdrawal reader in `scripts/adr-anchors/` (one file per anchor).\n\n## Done when\n\n- A stack with `forms: [...]` loads, serves `GET /api/v1/meta/form` and `/api/v1/meta/form/NAME`, and publishes; `os validate` refuses a name whose prefix differs from `object`, an authored `data` key, and a taken public address; the metadata save door and publish refuse the taken address too. Each of the three refusals has a pin asserting status and `code` and naming both forms, one pin shows an old-shape `view` write on a taken slug still saves as before, and one pin shows a `form` saved open on the address of a switched-off form is refused (ablate: the switched-off half of the holder read).\n- A `form` save, a reset and a delete at a name a list item of type `view` holds each leave the list row byte-equal (ADR-0159 D5; ablate: the form-content test of the old-shape row removal).\n- The row that carries no form at a form's name (ADR-0159 D5), two pins, each with an ablation:\n - the bound: over a package that authors an open `form` item, a list saved package-less at the form's name is refused (status `400`, `code` `VALIDATION_ERROR`), a package-less container whose expansion writes a list at that name is refused, and both are refused where the base's pair cannot be ensured; the same list saved into an app of the environment's own, and into the pair as its own item, saves; after all of them the two doors serve the package's form at its address (ablate: the bound, by letting the reading take any stored `view` row of the name; the doors answer `404`. Ablate: the expansion half of the refusal; the container saves and the doors answer `404`);\n - the closed reading: a package-less `view` row that carries a list at the name, seeded as stored, keeps both doors at `404` at the package's address, and so does a stored package-less container whose expansion writes a list there (ablate: fall through to the package's source `form` item when the stored row projects no form).\n- Served rows only (ADR-0159 D5), one pin with an ablation: a writable package's own `view` row that carries a list, and a package-less `view` row of the same name that carries an open form; both doors answer `404` at the form's address before this card's change and after it (ablate: project every stored `view` row into the `form` read; the address answers). A second fixture, for the address: a read-only package authors an open `form` item, and a package-less `view` row of that name whose form has no link stands over it; a list of the name is then saved into an app of the environment's own, and into the pair as its own item; both doors answer `404` at the package's address before the list is saved and after it (ablate: take the served rows from the effective `view` list; the address answers).\n- A stack that still authors the three old shapes loads unchanged, and each of its forms is also served as a `form` item under the same name. `GET /api/v1/meta/view` answers exactly what it answered before (pin against a fixture taken before the change).\n- The public form of `examples/app-crm` answers at its address before and after, byte-equal on the resolve door.\n- The eight D6 pins exist, each asserting status, `code` and that no record was written, each with one ablation run recorded in the PR (rebuild, on-disk mutation proof, restore proved by an empty `git diff HEAD`):\n - withdrawn by a `view` override in `.custom`, open as an authored `form` of the same name;\n - the mirror (withdrawn by a `form` override, open as an old-shape item in the base);\n - withdrawn in a container's `formViews` entry, open as a `form` item named for the expansion;\n - withdrawn in a body of the same name whose link names another slug than the open definition's: both doors answer `404` at the open definition's address (ablate: the whole-item match of rule 6, by making it require an equal slug);\n - a per-package-layer withdrawal in either type;\n - an unreadable old-shape body closes its links;\n - replacement across the types (rule 11): a stored `view` override in `.custom` whose body has no `publicLink`, over a base that authors the same name as an open `form` item, and its twin with a package-less row: both doors answer `404` at the base's address (ablate: the cross-type resolution of item 5, by serving the package's source `form` item when the stored row is a `view` row);\n - the submit door refuses wherever the resolve door does.\n- The exempt reader: `pnpm check:adr-anchors` is green with its anchor; the unreadable-body and `view`-override pins above are the ones that turn red when it is removed (their ablations say so).\n- The PR records the outside-use reading for `defineForm` (question 1) before the rename's first commit.\n- `customization-package.test.ts` is green with the new row; the showcase coverage test is green.\n- Changeset: `minor` on every package the diff moves, `Metadata-protocol: narrowed` in the PR body and the changeset; the BREAKING banner and the ADR-0087 disposition for the `defineForm` export change (ruled question 1), with the FROM and TO mapping (`defineForm` for a schema-bound Studio form becomes `defineMetadataForm`), and for the refusal of item 5: the saves it refuses that are admitted today, and the one-line fix (another key, or the list saved into an app of the environment's own). Exactly one ADR-0087 disposition marker covers the export break and the refusal together: a registered semantic entry, or a category that rests on a checked fact. ⛔ Not `not-required (no-migration-prescription)`: it is refused on a declared narrowing. The seat settles the `Clause-②:` line and the PR title's `!` at claim against that export break.\n- `packages/spec` generated artifacts regenerated and committed.\n\n## Not in this card\n\n- No tombstone, no conversion, no stored-row ceremony, no upgrade precheck (card ⑤).\n- No rename of any form (ruled question 2 = A: the name stays `OBJECT.KEY`).\n- This card stays one card and one PR, spec and server together, so the doors' two-type read and its security pins land in one change (the seat's call, on the ruling record); it splits only if its size passes the 3,000-line threshold.\n- No console change (card ③). The shipped console keeps working against `view`.\n- No move of example or HotCRM sources beyond the one showcase item (card ④).\n\n## Security\n\nThe doors change which metadata type they read an anonymous admission from. A dev that finds a way to re-open a withdrawn form reports it through the private channel and stops; it is not fixed in passing. Contract-tier review is required on this PR.\n\nDedupe words: form metadata type, forms collection, anonymous form doors both types, withdrawal projection, defineForm rename, metadata-form suffix." }, { "card": "5", "replaces": "the card 5 body in dev report 7137734330", "body": "Source: ADR-0159 (PR #36957), decision D7 and ruled merge question 4 (ruling record 7131569242 on #36868, 2026-11-24: 「表单拆成独立 form 元数据类型的 5 个合并问题 都同意」, all option A). Parent: #36868, card ⑤ of five. This card is cut only when the maintainer opens protocol major 19.\n\nBlocked-by: CARD-3\nBlocked-by: CARD-4 (both halves; the seat writes the numbers)\nMetadata-protocol: narrowed\nClause-②: yes (narrowing) (seat to confirm at claim)\n\nGrading: `area:build` · Feature (breaking, major) · `view` becomes lists only; the three old form shapes are refused with a prescription and migrated · every app that authored a form inside a view, and every deployment with stored forms · evidence: ADR-0159's census at `main` `62692b7f8b` (256 files name the shapes, 158 of them tests). p2 until the major is opened.\n\n## What to build\n\n1. **Tombstones**: the container's `form` and `formViews`, the `form` member of `ViewKindSchema`, and the `form` arm of the item and wire schemas, each refused with a prescription naming `forms:`. The two form tails under an object's view translations tombstoned with the prescription naming `forms.NAME`. Follow the `spec-property-retirement` playbook; do not rebuild the kit by hand.\n2. **Two ADR-0087 conversions, `toMajor: 19`**: on the stack, move each named form from `views[]` to `forms[]` under the projection's name, lift the binding to `object`, remove a container left empty; on `translations`, move the form tails. Internal record forms are deleted and reported per form. The set is defined by ADR-0159 D1's test, ⛔ not by `form-view-internal-not-loaded`'s `sharing.enabled` test: a form in a record-form slot (the default `form`, `formViews.default`, `formViews.create`, an item with `isDefault: true` or named `OBJECT.create`) that declares no `sharing.publicLink` and that no action of type `form` targets. A form that declares a `sharing.publicLink` is never internal, switched on or off, in whatever slot (D7-a): it is moved with its `sharing` block as written, the switch included, and so is an action-opened one. A switched-off form that keeps its link is an explicit withdrawal; deleting it would re-open the app's own form. **A form held by an item or a container that carries an `overrides` declaration is moved whatever its body and slot, with the declaration** (D7-b): the conversion cannot read the base's source, and an override with no link over a base form that declares one is what keeps that address closed. Where the base ships no form of that name in either type (read through the projection), `os validate`, which sees both packages, **refuses** the moved item: an error, the grade the override write gate gives a declaration of an item its base does not ship (`declared_package_ships_no_such_item`). The message names the base and the two ways out (remove the item; correct the name); only there is a removal offered, and `os migrate meta` lists it as an edit for the author. **This sentence goes past ruling item 3's words and is ADR-0159's own reading (its TL;DR 10).** Read the record as merged before any edit: if the maintainer struck the reading, the fallback is to leave such an item in `views[]` with a structured TODO, and that fallback needs its own answer for an override over a linked base before it is built — stop and report `needs_decision`. The conversion's output is judged by question 3's refusal like any `form`: a retired form that keeps its link beside its successor on the same address is moved as written, both forms, and `os migrate meta` lists the pair as an edit for the author (clear the retired form's link). A form whose `data.object` disagrees with its container is left with a structured TODO. Fixture pairs cover the three shapes, a mixed container, an item that declares `overrides` with no link in a record-form slot, and the disagreement case.\n3. **The chain entry** for major 19, and `os migrate meta --from 18` listing and applying the edits.\n4. **The stored-row ceremony**: a CLI ceremony in the shape ADR-0131 D10 and ADR-0146 D11 set (read-only by default, `--apply`, idempotent, a per-package report). An item-shaped `view` row with form content becomes a `form` row at the same package and name; a stored container is split; a `.custom` override keeps its package, name, `overrides` declaration and `basedOn`, whatever its body; a package-less overlay row over a packaged form goes to the base's pair as a declared override, with its body as written (its switch when it has one, no link when it has none); a row bound to a read-only base (a customization saved under the base's own id before that door closed, the class `protocol-packageless-overlay-migration.ts` carries) has the same destination; history stays verbatim; internal record forms are reported, never deleted by the ceremony. A form that declares a `sharing.publicLink` is moved with its switch, by the same test as the conversion.\n - **A row that stands over a base form is classed by its base, never by its own body alone** (D7-b). \"Stands over\" means the read serves it in place of a package's own form of the same name: the pair's declared override, a row bound to the base package, a package-less row, a stored container whose expansion writes the name. Read the base's own document in the deployment, in whichever type the package authors it. Where the base's form declares a `sharing.publicLink`, the row is never internal whatever its own body declares (no link, another address, a switch off): it moves as the override it is, body as written, and ⛔ no report or precheck lists it for removal or reset. Removing it serves the base's form again. The internal set therefore has three parts: no `sharing.publicLink`, no action target, and not standing over a base form that declares a link.\n - **Several stored rows of one form fold into one: the body kept is the one served today, and the fold only narrows** (D7-d). Over a read-only base three rows can head for the pair's declared override: the pair's own override, a row bound to the base, a package-less row. For a writable package two head for the package's own row: that row and a package-less row. **The body kept is the one the served-row order serves today** (`servedOverlayRowCandidates`: the pair's override, then the row bound to the package, then the package-less row), whichever binding and type it is stored in, landed as written (a body with no link stays without one). ⛔ Never decide it by the order rows are moved in or by which row reached the destination first: a link-less row bound to the base, over a linked base, beside an open package-less row is closed today, and taking the package-less row first opens the address. Every other row is folded and carries one thing only: if it explicitly withdraws the form, the destination keeps its link and takes that switch off. Nothing else of a folded row is kept. A folded withdrawal a layer reads today (the first of the bound row and the package-less row, under an open override of the pair) must keep closing. A folded withdrawal no layer reads today (a package-less row behind a bound row, or behind a writable package's own row) closes the form newly: the report names the form as newly closed, and the administrator switches it on again in Setup. The report names every row of the form, the one kept, and which one closes the form. **The served row is found among every stored row at the address, whether it carries a form or not, in either type.** Where the row the order picks carries no form at the name, nothing is served for the name today and ⛔ no row of that name is moved: a form row behind it (bound to the base or package-less) stays where it is, and every stored row of the name stays as stored with the no-form row; none holds the upgrade, and the report names each as left in place (the no-form row is one of the two kinds the ruling names; a form row left behind it is not held by ADR-0159's reading of that answer). Moved alone, the form row would become the pair's override, first in the served-row order, and the address would answer. The same holds where the row picked is a declared `view` override that carries no form, if card ② found a door for one. **A writable package's own list ahead of a package-less form row** is decided by the same rule: the served row is the package's own `view` row, which carries a list, and the package-less row behind it carries a form no layer reads. ⛔ Move no row of the name (moved to the package's own `form` row, the package-less body would be served). The list is the package's own item: not named for any action, and it holds nothing. The package-less form row stays as stored and does not hold the upgrade (ruling record 7136809727 on #36868 (「两类特殊的旧存储行怎么处置。不考虑」)); the report names it as left in place. ⛔ Offer no deletion for it (it declares a link) and no save that would serve it. This is the rule at the writable package's address only: a package-less row that is also the served row at a read-only base's address keeps there its destination in that base's pair, or the hold where the pair cannot be ensured. Ask the served-row order per package address, ⛔ never from the effective `view` list.\n - **A row that carries no form at a name its base ships as a linked form**, in one of the three bindings ADR-0159 D5 bounds (a declared override, a row bound to a read-only base, a package-less row), gets no disposition of its own (ruling record 7136809727 on #36868 (「两类特殊的旧存储行怎么处置。不考虑」); the the maintainer confirmed the seat's reading in record 7137033870, 「同意」): the ceremony writes nothing for it, the precheck does not hold major 19 for it, and it stays as stored. Its base's address stays closed after the major by rule 11's replacement check (item 7). ⛔ A list saved in a package beside the form is not in the class: neither the ceremony nor the precheck names it.\n - **Where the pair cannot be ensured** the ceremony writes nothing for the row: it stays a `view` row (still read by the doors' withdrawal layer), ⛔ is never moved to a package-less `form` row and is never deleted. The report names the row (type, name, base) and repeats the ensure door's own refusal (`customizationPairEnsureRefusal`), with the action for its cause. **A cause the administrator can remove in the deployment** (a package under the pair's id that is not the pair, another owner of the pair's namespace, the App not installed, an earlier version's per-package pair holding the namespace, for which ADR-0146 D11's ceremony runs first): remove it and run `--apply` again. **A cause only the App's author can remove** (no App namespace, or one too long or not valid for a pair namespace; a non-SemVer App version; several Apps and no single one picked): the precheck names the App and the cause, says the fix is its author's and offers no other action; the deployment stays on major 18 until the App ships a fix or is uninstalled, and the row keeps closing meanwhile. **A body the projection cannot read** is in the same class: not moved, holds the upgrade, keeps closing every link it names, and leaves the class by an old-shape save that repairs it.\n - **A base with no pair in this version** (a kernel package, until the kernel whitelist admits it): measured at `689e5695b98` the case is empty, because no package that ships metadata to a deployment authors a form in any of the three shapes. **Take the reading again before any edit** (`git grep -lE \"formViews|viewKind: 'form'|viewKind === 'form'\" -- packages/platform-objects packages/plugins packages/services packages/triggers packages/drivers packages/connectors packages/apps`). If a kernel package ships a named form, stop and report `needs_decision`: the row has no way out without a new mechanism, and that is the maintainer's to decide before major 19 opens.\n - Internal record forms in stored rows (the three-part set above): the administrator removes them (an item-shaped row deleted, a container that also holds lists re-saved without that member). A row of that set holds no switch and replaces no linked body, so removing it changes no door's answer. ⛔ That holds for this set only.\n5. **The upgrade precheck** (ruled question 4 = A): the upgrade to major 19 refuses while a stored old-shape form row exists — one the ceremony can still move, an internal record form, or a row that holds the upgrade (its pair cannot be ensured, or its body cannot be read) — naming the ceremony, each row, and the action for its class (run the ceremony; remove the internal form; the action for the cause, as item 4 gives it). A list in a package at a form's name is not an old-shape form row and is not named. ⛔ Not counted, and not stopping the upgrade, are the two kinds of row the ruling above names (a row that carries no form over a linked base; a package-less form row no layer reads behind a writable package's own list) and, by ADR-0159's reading of that answer, a form row left behind a no-form row. Ask \"not counted\" per package address, as the read asks \"served\": a package-less row passed over at a writable package's address still holds the upgrade at a read-only base's address whose pair cannot be ensured. ⛔ It never offers deletion or a reset for a row that declares a `sharing.publicLink`, or for a row that stands over a base form that declares one (D7-e).\n6. **`view` reads serve lists only**; the projection serves no content; the list rung of `anonymousFormObjectName` is removed.\n7. **The withdrawal reader stays** (ruled question 4 = A, a permission boundary): a stored old-shape body that withdraws a form keeps closing it. The reader card ② built is exempt from ADR-0087's kit age-out and ⛔ is not retired, tombstoned or put on a retirement clock by this card; its ADR anchor stays green. No withdrawn public form may re-open. **Rule 11's replacement check keeps the reader's lifetime**: a stored old-shape row found over a package's form after the major still replaces it, so nothing of that name is served from that package while the row stands; the check is not put on ADR-0087's clock and leaves in the release that removes the reader, by the same precheck. That is ADR-0159's own reading past the scope question 4 rules (\"this one reader\"; its TL;DR 10). Read the record as merged before any edit: if the maintainer struck it, register the check as kit on ADR-0087's clock (it leaves one major after major 19) and say so in the PR. **The check covers a row that carries no form, in the bindings D5 bounds**: such a row reaches major 19 as stored, and this check is what keeps its base's address closed there. So ⛔ this card removes neither D5's bounded reading nor card ②'s refusal of a package-less list at a form's name: both last as long as the check.\n8. The `ui/` fixes the removals force ship in the same PR.\n\n## Done when\n\n- Each tombstone refuses at `os validate`, at `defineStack` and at the metadata save door with its prescription (pin the `code`, the status and the located path).\n- The full migration chain replays from the support floor to 19 in CI.\n- The ceremony, run twice on a database seeded with: an item-shaped form row, a container with lists and forms, a `.custom` switch-only override, a package-less overlay, a package-less overlay whose pair cannot be ensured, a switched-off public form in a default slot, a `.custom` override with no link over an open base form, an open override in the pair beside a package-less row that withdraws the form, a link-less row bound to a read-only base beside an open package-less row, a writable package's own open row beside a package-less row that withdraws the form, a no-form row bound to a read-only base beside a package-less row that holds an open form of that name, a writable package's own list row beside a package-less row of the same name that holds an open form, a list saved in a package at a form's name, and an internal record form, reports the same result the second time and moves nothing; each row lands as D7 says.\n- **Security pins, each with an ablation** (ADR-0159 D7; each asserts status, `code` and that no record was written, on both doors):\n - **the switched-off form in a record-form slot**: a public form in the container's default `form` slot, link kept and `enabled: false`, whose name is open in another layer. After the source conversion, and after the ceremony on the stored twin (Setup's switch-off override of that form), it is a `form` item with its switch, the internal-forms report does not list it, and both doors still answer `404`. Ablate: the `publicLink` test of the internal set (judge \"public\" by `sharing.enabled === true`); the pin turns red because the form is deleted or left behind with its withdrawal;\n - **its twin, the link-less row over an open base**: a `.custom` override in the default `form` slot whose body has no `publicLink`, over a base whose default-slot form is open; and the same body as a package-less row. After the source conversion of the pair's own source, and after the ceremony, it is a `form` override with no link, the internal-forms report does not list it, the precheck names no removal for it, and both doors still answer `404` at the base's address. Ablate: the base half of the internal test (class the row by its own body alone); the pin turns red because the report lists the row for removal, and removing it as the report says serves the base's form;\n - **the ceremony keeps a withdrawal closed**: a form withdrawn before it, by a `.custom` switch-only override and by a member of a stored container, answers `404` after it. Ablate: the carry of the `sharing` block in the move;\n - **the fold keeps the served body and only narrows**, five fixtures:\n - an open override in the pair beside a package-less row that withdraws the form answers `404` before the ceremony and after it, and the destination row keeps its link with the switch off. Ablate: the fold's carry of the folded row's switch;\n - the row bound to a read-only base: a row bound to the base whose body has no `publicLink`, over the base's open form, beside a package-less row whose body is open. Both doors answer `404` at the base's address before the ceremony and after it, and the pair's override has no link. Ablate: the choice of the kept body (take the package-less row first, as the row that reaches the pair first); the address answers;\n - the writable-base twin: a writable package's own open row beside a package-less row that withdraws the form. The form is open before the ceremony and answers `404` after it, and the report names it as newly closed. Ablate: the report's line for a newly closed form;\n - the writable package's list ahead of a form row: a writable package's own `view` row that carries a list, beside a package-less `view` row of the same name that carries an open form. Both doors answer `404` at the form's address before `--apply` and after it, the package holds no `form` row of the name, the list row is byte-equal, the report names the package-less row as left in place, and the precheck does not hold the upgrade for it. Ablate: fold the package-less form row into the package's own `form` row; the address answers;\n - the no-form row ahead of a form row: a row bound to the base that carries no form at the name, over the base's open form, beside a package-less row that holds an open form of that name. Both doors answer `404` at the base's address before `--apply` and after it, the pair holds no row of the name, the report names both rows as left in place, and the precheck does not hold the upgrade for them. Ablate: leave the no-form row out of the fold (find the served row among form rows only); the address answers;\n - each \"before\" half proves one of the record's readings of today's layers (read from the code, not run, for the record). If one is not as stated, stop and report;\n - **the precheck refuses**: a deployment holding a stored old-shape form row of each class (movable, internal, pair not ensurable, body not readable) does not reach major 19, and the refusal names the row and its action; for a row that declares a link or stands over a linked base the action is never a deletion or a reset. Ablate: the precheck's read of each class in turn. A list in a package at a form's name is not named. Ablate: D5's bound;\n - **the precheck does not hold the two ruled kinds, and their addresses stay closed**: a deployment whose only such rows are a row that carries no form over a linked base (in a binding D5 bounds), a package-less form row behind a writable package's list, and a form row left behind a no-form row bound to a read-only base reaches major 19 with each of those rows byte-equal, and both doors answer `404` at each address before the upgrade and on the major-19 build. Ablate: the kept replacement check's read of a row that carries no form; the base's address answers on the major-19 build. A fourth fixture, for the address: a package-less row that is passed over at a writable package's address and is the served row at a read-only base's address whose pair cannot be ensured still stops the upgrade. Ablate: ask \"not counted\" by name and not per package address;\n - **the kept reader still closes after the tombstone**: on a major-19 build a stored old-shape body that withdraws a form still closes it, a stored old-shape row with no link over a package's open form still keeps that address closed, and so does a stored row that carries no form over it, in a binding D5 bounds. Ablate: the exempt reader, then its replacement half;\n - **the row whose pair cannot be ensured** still closes its form before the upgrade — by its switch in one fixture, by replacing an open base in the other — and `--apply` neither deletes it nor moves it package-less. Ablate: the pair-refusal branch of the ceremony.\n- Before tombstoning, measured and recorded in the PR: zero first-party sources author an old shape (this repository's examples, skills and docs; HotCRM at its current head).\n- The full dogfood battery on the final head, once.\n- Changeset: BREAKING banner, the FROM and TO mapping with the one-line fix, exactly one ADR-0087 disposition marker, both declaration lines; `Metadata-protocol: narrowed`.\n\n## Not in this card\n\n- Removing the withdrawal reader, or rule 11's replacement check. Major 19's precheck no longer refuses a deployment that holds a row of the kinds the later ruling leaves as stored, so the release that removes either owes its own answer for those rows. The ruling would let it leave by a release whose upgrade precheck refuses a deployment still holding an old-shape form row, and major 19 is one; ADR-0159 keeps it through major 19 as the record's own narrowing (D7, question 4). Its removal is a later release with its own precheck, and a new decision.\n\nDedupe words: view lists only tombstone formViews, viewKind form retired, migrate forms stored rows ceremony, major 19 form conversion." } ] }objectstack-fleet commentedon Nov 24, 2026
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ
Rulings recorded · 2026-11-24T19:46Z · ADR-0159 implementation, release sequencing and stored internal record forms. All four were given in seat repo:objectstack#4's session; quoted verbatim.
sharing.publicLink, or stands over a linked base, is never removed (D7-e unchanged); removal happens only in the run that switches, and a deployment that does not switch keeps every row; the upgrade report names each removed form, writes out its body, and says per object that New and Edit now follow the object's field groups and whether it has any; a container that also holds lists is re-saved without the member, its lists byte-equal.Seat decisions under these rulings (maintainer veto window): the upgrade's move is all-or-nothing with the switch (a deployment that does not switch holds every stored row as it was, so no withdrawn public form re-opens — ruled question 4); HotCRM's source move lands with its own bump to the major, so the major-19 card does not wait on the HotCRM card.
ADR-0159 text these rulings revise is collected on the ADR-revision card filed with ⑤a and ⑤b.
objectstack-fleet commentedon Nov 24, 2026
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ
Addendum to 7142585849 · 2026-11-24T19:49Z
Seat decision (maintainer veto window), from the all-or-nothing rule: the stored-row ceremony's
--applyis reached only from the major's upgrade command; the standalone command is read-only. A complete move run on a deployment that then never switches would leave its running release reading no switch-off.objectstack-fleet commentedon Nov 24, 2026
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ
Released for close-out · 2026-11-24T19:54Z · this card's acceptance is met (ADR-0159 merged in PR #36957; implementation cards filed; pointers on #36444 and #36505).
pm:dispatched→pm:queueonly so the close-out tool can act; it closes in the same round.objectstack-fleet commentedon Nov 24, 2026
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ
Closed as completed · 2026-11-24T19:55Z · the design step is done.
formitems (ADR-0159, card ②) #37086 (② theformtype), Console reads and editsformitems: Setup public forms re-pointed, the PR #36784 designer becomes theformeditor in Studio (ADR-0159, card ③) #37087 (③ console reads and editsform), First-party sources author forms asformitems: examples move toforms:, skills and docs teachforms:(ADR-0159, card ④a) #37088 (④a examples and docs), Skills teachforms:as the one way to declare a form, andviews:as lists only (ADR-0159, card ④s) #37105 (④ skills), Upgrade to the major converts stored forms: the stored-row ceremony and the precheck report (ADR-0159, card ⑤a) #37111 (⑤a stored-row ceremony and precheck report), Major 19:viewis lists only, the old form shapes are refused with a prescription, and the upgrade command converts stored forms, then switches (ADR-0159, card ⑤b) #37112 (⑤b major 19). HotCRM's source move is its own card in that repository, done with its bump to the major (ruling addendum 7142658348).Blocked-by: #37087) and Studio 对象页「表单」页签改成「字段布局」:只编辑对象的字段分组,不再读写表单视图;安装来的对象存到 .custom 的排布里 #36505 (7142462079; item 4 resumes).docs(adr): ADR-0159 — forms are their own metadata type; amend ADR-00…
docs(adr): ADR-0159 records the major-release rulings (one major, con…