From 63dbd5817f2cd86ceb7e8193a35ec57fccf95d4e Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 24 Nov 2026 10:41:35 +0000 Subject: [PATCH 01/13] =?UTF-8?q?docs(adr):=20ADR-0159=20draft=20=E2=80=94?= =?UTF-8?q?=20forms=20leave=20view=20for=20a=20form=20metadata=20type=20(#?= =?UTF-8?q?36868=20wip)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Claude-Session: https://claude.ai/code/session_01QSeKYpEsWWE9Y5YtSsDgqZ Co-authored-by: Claude --- ...forms-are-form-items-view-is-lists-only.md | 397 ++++++++++++++++++ 1 file changed, 397 insertions(+) create mode 100644 docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md diff --git a/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md b/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md new file mode 100644 index 00000000000..e5cf9a778e1 --- /dev/null +++ b/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md @@ -0,0 +1,397 @@ +# ADR-0159: Forms are their own metadata type — a `form` item is a named form with a consumer, public forms are `form` items, and `view` is lists only + +**Status**: Proposed — 2026-11-24, written for objectstack#36868 on the maintainer's ruling of that day (ruling records [`7123091354`](https://github.com/objectstack-ai/objectstack/issues/36444#issuecomment-7123091354) on #36444 and [`7123091586`](https://github.com/objectstack-ai/objectstack/issues/36505#issuecomment-7123091586) on #36505). `docs/adr/**` is Tier H (Prime Directive #14): this record becomes **Accepted** by an authorized approval or the maintainer's merge of the PR that carries it, and is in force from that merge. **This record declares; it implements nothing** — no schema, no code, no changeset; every mechanism below is cut as a card after the merge ([Execution plan](#execution-plan-after-acceptance)). It **amends** [ADR-0017](./0017-object-has-many-view.md) (`viewKind` becomes list-only; the form arm is tombstoned on [D7](#d7)'s schedule) and [ADR-0146](./0146-studio-designs-setup-administers-one-editor-per-item-paired-customize-package.md) D2 (`form` joins the overridable types) — each record's Status line carries the dated pointer. + +- **Date**: 2026-11-24 +- **Decided by**: the maintainer, 2026-11-24, verbatim and untranslated, as the card and the two ruling records carry them: + - 05:21Z: 「是否建议表单从 view 中更直接拆分出来,比如叫form元数据?」 + - 05:22Z: 「如果分拆的话,对外表单的功能就不用单独开发了,就合并到这个元数据类型中。」 + - 05:23Z: 「现在对外表单开发的任务先暂停」 (pause record [`7122924165`](https://github.com/objectstack-ai/objectstack/issues/36444#issuecomment-7122924165)). + - 05:33Z, on the decision card 「表单要不要从 view 拆成独立的 form 元数据类型?」, option picked: **「拆成 form 类型,对外表单并入」**. Not taken: keep forms in `view` and retire only the container shape; keep everything as is. +- **The ruling, as the card records it** (this record executes it; ⛔ none of it is re-opened here): + 1. A new metadata type **`form`**, addressed by name, bound to one object (it carries `object` itself), body = today's form view schema. Its content is named forms that have a consumer: **public forms** (the main content, `sharing` included) and forms an action of `type: 'form'` opens. + 2. **Public forms are not a separate feature**: they are `form` items. Their list, detail and edit come from the `form` type, not from a separate Studio page. + 3. `view` becomes **lists only**. The record create and edit form stays on the object's `fieldGroups` and does not become a `form` item. +- **Supersedes, among rulings**: items 1 and 2 of ruling record [`7118881549`](https://github.com/objectstack-ai/objectstack/issues/36444#issuecomment-7118881549) (the 2026-11-24T01:08Z option 「Studio 单独一页,存储不变」) and the "Definition (unchanged shape)" paragraph of ruling record [`7100386248`](https://github.com/objectstack-ai/objectstack/issues/36444#issuecomment-7100386248). The rest of 7100386248 stands and is carried here: Studio designs and Setup operates (its items 2 to 10), and a switched-off form answers `404 FORM_NOT_FOUND` like a form that does not exist (its F3 = A). +- **Builds on**: [ADR-0005](./0005-metadata-customization-overlay.md) (one Zod source per type), [ADR-0049](./0049-no-unenforced-security-properties.md) (enforce or remove), [ADR-0050](./0050-form-layout-vs-presentation.md) (a form declares layout, the caller chooses where it opens), [ADR-0084](./0084-application-builder-information-architecture.md) (the Interface pillar already lists `form` beside `view`; no change there), [ADR-0087](./0087-metadata-protocol-upgrade-contract.md) (conversions, the migration chain, stored rows), [ADR-0088](./0088-metadata-kind-admission-and-retirement.md) (the kind admission test), [ADR-0138](./0138-guest-model-anonymous-principal-doors-grants-and-organization.md) D2 (the public form doors' admission condition and grant, unchanged), [ADR-0146](./0146-studio-designs-setup-administers-one-editor-per-item-paired-customize-package.md) (declared overrides in the paired `.custom`), [ADR-0150](./0150-behavioural-metadata-addressed-by-package-objects-keep-the-literal-prefix.md) D1 (object-derived names keep the literal prefix). +- **Inputs**: the card's read-only analysis, taken at `main` `14f4d8f8`. Every reading below was taken again for this record on `objectstack-ai/objectstack` `main` at `62692b7f8b`; where a position moved, [Readings](#readings-re-taken-at-62692b7f8b) says so. + +--- + +## TL;DR + +1. **`form` is a metadata type.** A `form` item is `name` + `object` + the form body. Its name is `OBJECT.KEY`, the name the form is served under today, so no served name changes ([D2](#d2), [D3](#d3)). +2. **It passes ADR-0088's admission test on three consumers that exist today**: the anonymous form doors, an action of `type: 'form'`, and Setup's public-forms list. A record create or edit form is not `form` content ([D1](#d1)). +3. **Adding the type is additive.** From the release that adds it until the next protocol major, the loader projects the three old shapes into `form` items, `view` reads are unchanged, and nothing an author wrote stops loading ([D5](#d5)). +4. **The anonymous doors and the withdrawal judgement read both types through one projection.** A form switched off in either type is closed in both; a stored body the projection cannot read closes the slugs it names ([D6](#d6)). +5. **The old shapes are tombstoned only in the next protocol major**, with an ADR-0087 conversion for sources and a ceremony for stored rows, `.custom` overrides included ([D7](#d7)). +6. **`form` is overridable by declaration** in the paired `.custom`, like `page` ([D4](#d4)). +7. **Translations get a `forms` family**; the form tails under `objects.OBJECT._views` are read as a fallback until the major ([D8](#d8)). +8. **Shipped work is kept and re-pointed**: Setup's page reads `form`, the paused designer becomes the `form` editor, the Studio Developer page and the Form-tab switch retire ([D9](#d9)). +9. **Five cards, in order**; ②, ③ and ④ are additive, ⑤ is the major ([Execution plan](#execution-plan-after-acceptance)). +10. **Five points the ruling is silent on are decided here with a default** and listed for the maintainer's merge, each with its options on four axes ([Decided here where the ruling was silent](#decided-here-where-the-ruling-was-silent-for-the-maintainers-merge)). + +--- + +## Context + +### What `view` carries today + +One type carries two unrelated things. `packages/spec/src/ui/view.zod.ts` declares: + +- the form body, `packages/spec/src/ui/view.zod.ts#FormViewSchema` (`type`: `simple`, `tabbed`, `wizard`; `sections`; `sharing`; `submitBehavior`); +- the container, `packages/spec/src/ui/view.zod.ts#ViewSchema`, with four members: `list`, `form`, `listViews`, `formViews`; +- the ADR-0017 item, `packages/spec/src/ui/view.zod.ts#ViewItemSchema`: `{ name, object, viewKind: 'list' | 'form', config }`, one arm per kind, and its wire twin `packages/spec/src/ui/view.zod.ts#ViewItemWireSchema`. + +So a form reaches the platform in **three shapes**: the container's `form`, a `formViews` entry, and a `viewKind: 'form'` item. `form` is not a member of `packages/spec/src/kernel/metadata-plugin.zod.ts#MetadataTypeSchema`. + +### No record form reads a form view + +Since #36425 the console's create dialog, full-page create, action-opened create and edit lay out by the object's `fieldGroups` and the rules on its fields. The docblock of `ui/packages/app-shell/src/utils/recordFormNavigation.ts#FormViewDefinition` says it in these words: "No record create or edit reads one". `addRecord.formView` is a tombstone in `packages/spec/src/ui/view.zod.ts`. The lint rule `form-view-internal-not-loaded` (`packages/lint/src/validate-internal-form-views.ts`) reports an internal create or edit form as steering nothing. No per-role or per-position form assignment exists. + +### Named forms have three consumers + +1. **Public forms.** `GET` and `POST` under `/api/v1/forms/:slug` (`packages/rest/src/form-routes.ts#registerFormEndpoints`), rendered by the console at `/f/:slug`. +2. **A form an action opens.** `packages/spec/src/ui/action.zod.ts#ActionType` has the member `form`; its `target` is the form's name, routed to `/forms/:name`, where `ui/apps/console/src/components/FormPage.tsx` reads `GET /api/v1/meta/view/:name`. +3. **Administration and design surfaces**: Setup → Configuration → Public forms (#36697, merged as `c45dd80ff9`), the Studio Developer → Public Forms page, and previews. + +Nothing on the list side reads a form: the view switcher takes list items only (`ui/packages/app-shell/src/providers/MetadataProvider.tsx` routes `viewKind: 'form'` items away from `listViews`), and an app navigation entry's `viewName` targets a list (`packages/spec/src/ui/app.zod.ts`). + +### The anonymous doors and the withdrawal judgement + +Both doors read the form through one resolution inside `packages/rest/src/form-routes.ts#registerFormEndpoints`: it lists type `view` (the effective read, beside the per-package layer), and offers a form only when `packages/spec/src/ui/anonymous-form-intake.ts#anonymousFormIntakeCandidates` yields it. That function scans the three shapes in a fixed order. A form is open when its `sharing` declares `enabled: true`, `allowAnonymous: true` and a `publicLink`; ADR-0138 D2 row 1 names exactly this as the doors' admission condition. + +`packages/spec/src/ui/anonymous-form-intake.ts#anonymousFormIntakeWithdrawnIn` is the kill switch: a body of the same name that keeps the link and sets a switch to `false` closes the form, matched by slot or by slug, and layering may only narrow. Identity is the item **name**. The object a form submits into is resolved by `packages/spec/src/ui/anonymous-form-intake.ts#anonymousFormObjectName` over four rungs, one of which is the container's `list.data.object` — a form reading its binding off a list. + +Two write-time judgements read the same candidates: the tenancy intake advisory in `packages/metadata-protocol/src/runtime-authoring-gate.ts` (it returns nothing for a type other than `view`), and the container name-collision refusal in `packages/metadata-protocol/src/protocol-save.ts`. + +**No door refuses a second form on a slug another form already publishes.** The resolver takes the first candidate in list order; the header of `packages/spec/src/ui/anonymous-form-intake.ts` says "Another row that publishes or withdraws the same slug is a different form and closes nothing". The only clash refusal is client-side, in the paused designer. + +### Loading, overriding, translating + +- The loader expands a container into items: `packages/spec/src/ui/view.zod.ts#expandViewContainer`, called from `packages/metadata/src/plugin.ts`, `packages/objectql/src/engine-registration.ts` and, for stored rows, `packages/metadata/src/view-container-expansion.ts#expandRuntimeViewContainer`. +- `view` is `listed` in `packages/spec/src/kernel/customization-package.ts#OVERRIDE_TYPE_CLASSIFICATION`. Setup's switch saves a `view` override in the app's paired `.custom` (`ui/packages/app-shell/src/views/setup/publicForms.ts#switchPublicForm`), a body that holds the switch and nothing else of its own. +- Form copy is translated at `objects.OBJECT._views.KEY.title` and `.submitBehavior.title` / `.message`, and section copy at `objects.OBJECT._sections.SECTION` (`packages/spec/src/system/translation.zod.ts#ObjectTranslationDataSchema`; emitted by `packages/lint/src/i18n-walk.ts`). +- The stored-row conversion pass wraps one row in **its own type's** stack collection and reads that collection back (`packages/spec/src/conversions/stored.ts#applyConversionsToStoredItem`). It cannot move a row from one type to another. + +### Size + +Measured on `62692b7f8b` with `git grep -lE "formViews|viewKind: 'form'|viewKind === 'form'" -- packages ui`: 256 files, of which 158 are tests. Among the non-test source files: `packages/spec` 33, `packages/lint` 15, `ui/packages` 11, `packages/cli` 4, `packages/metadata-protocol` 4, `packages/rest` 3, `packages/metadata-core` 2, and one each in `packages/metadata`, `packages/objectql` and `ui/apps`. The card's own count at `14f4d8f8` was 81 non-test and 166 test files with a pattern it does not record; the two are the same order. In this repository's examples the shapes are authored in `examples/app-crm/src/views/lead.view.ts` and three showcase view files. The card reads two HotCRM source files (`lead.view.ts`, `case.view.ts`) and seven tests; HotCRM was not re-read for this record. + +### One name already taken + +`packages/spec/src/ui/view.zod.ts#defineForm` is a published export, and it is **not** this type's factory: it builds a schema-bound form for Studio's metadata editors (`data.provider: 'schema'`), used by 17 `*.form.ts` modules under `packages/spec/src`. The obvious factory name and the obvious file suffix for the new type both collide with it in meaning. Merge question 1 below. + +--- + +## Decision + +### D1 — `form` is admitted as a metadata kind, on consumers that exist {#d1} + +ADR-0088's three clauses, each on a fact measured above: + +1. **Independent lifecycle.** A form is created, published, switched off, overridden and deleted under its own name. The public address and the action target each name one form. Nothing reads it as a facet of a list: the switcher and the app navigation take lists only, and a form shares with its object's lists only the `OBJECT.` prefix. +2. **Declarative governability.** It ships as a standalone document from a package, is authored at runtime through Studio and the metadata API (`allowRuntimeCreate`), is versioned, and takes a declared override ([D4](#d4)). +3. **A real consumer.** The anonymous form doors serve it; an action of `type: 'form'` opens it; Setup switches it. All three exist before this record. + +**What is `form` content, and what is not.** A `form` item is a named form that something opens: a public form (it declares a `sharing.publicLink`), or a form an action of `type: 'form'` targets. A "custom create form" or a "wizard" is `form` content only when an action opens it. The object's record create and edit form is **not** a `form` item (ruling item 3): it is the object's `fieldGroups`, and the type has no `isDefault`, no `create` or `edit` role and no key that binds a form to a record page, a role or a position. A request for a per-role record form is a new decision, not a reading of this one. + +**A `form` item with no consumer is reported, not refused.** `os validate` and the lint report an item that declares no `sharing.publicLink` and that no `type: 'form'` action in the stack targets, as a warning — the successor of `form-view-internal-not-loaded`, by the same matching rule (the target must equal the name the form is served under). It is a warning because a form is legitimately consumer-less for a moment while it is being built: the form is saved first and the action that opens it second. + +### D2 — The shape: `name`, `object`, and the form body at the top level {#d2} + +```ts +// forms: [ … ] in a stack; one document per form +{ + name: 'crm_lead.web_to_lead', // OBJECT.KEY — D3 + object: 'crm_lead', // the one binding + label: 'Web to lead', // optional; the row's name in lists + type: 'simple', + title: 'Contact us', + sections: [ /* … */ ], + sharing: { enabled: true, allowAnonymous: true, publicLink: '/forms/contact-us' }, + submitBehavior: { kind: 'thank-you', title: 'Thank you' }, +} +``` + +- **One Zod source** (Prime Directive 7): a `FormSchema` in `packages/spec/src/ui/`, derived **by reference** from `FormViewSchema`'s shape, never transcribed. `FormViewSchema` stays as the body schema; the schema-bound Studio forms and the React form block keep using it. +- **The body is at the top level.** There is no `viewKind` and no `config` wrapper: the type is the discriminator, and "body = today's form view schema" is read literally. Merge question 5 records the wrapped alternative. +- **Identity keys**: `name` and `object` required; `label` optional (the display name in lists and in Setup; when absent a surface shows `title`, then the name). The item carries the envelope every standalone item carries: `protection`, the ADR-0010 fields, and ADR-0146's `overrides` declaration. +- **Not carried over from the view item**: `viewKind`, `config`, `isDefault` (a record-form role, ruling item 3), `order` (the switcher's order) and `scope` (the registry's provenance already says package or runtime). +- **The object binding has one rung.** A `form` item's object is its `object`. The body's `data` key is not authored on a `form` item: the schema refuses it by name with the prescription "bind the form with `object`". A form bound to a JSON Schema (`data.provider: 'schema'`) is not a `form` item — it has no consumer among the three. The four-rung resolution of `anonymousFormObjectName` survives only inside the projection of the old shapes ([D5](#d5)) and leaves with them. +- **`object` must name an object** the package can reference, judged where a view's object is judged today (`os validate`, publish). It is not editable after the form is created: the name carries it ([D3](#d3)). +- **Stack collection** `forms`, file patterns `**/*.form.ts`, `**/*.form.yml`, `**/*.form.json`, REST plural `/api/v1/meta/form` for items as every type has. +- **Registry row**: `supportsOverlay: true`, `allowEnvironmentOverlay: false`, `allowRuntimeCreate: true`, `supportsVersioning: true`, `executionPinned: false`, `loadOrder: 50`, `domain: 'ui'` — `page`'s row. `allowEnvironmentOverlay` is `false` because a new type takes ADR-0005's default and ADR-0146 D11 retires that tier as a write door; a customization is a declared override ([D4](#d4)). + +### D3 — The name space: `OBJECT.KEY`, the served name, unchanged {#d3} + +- **Grammar.** A `form` name is the dot-required qualified name the view item uses today (`packages/spec/src/ui/view.zod.ts#ViewItemNameSchema`). The part before the last segment **must equal `object`**; a mismatch is refused at parse. The view item never enforced that equality; the new type does from its first release. +- **Why this name.** It is the name every form is served under today — a stored item's own `name`, and for a container's form the name `expandViewContainer` gives it. An action's `target`, a `/forms/:name` link, a `.custom` override's key and the withdrawal judgement's identity are all this string. Keeping it means the migration renames nothing, and a withdrawal recorded against a name keeps closing that name ([D6](#d6)). Under ADR-0150 D1 it is an object-derived literal name, the bucket `view` is in; `form` takes the same bucket and no (package, name) resolution. +- **Separate from lists.** After the split a list `crm_lead.all` and a form `crm_lead.all` are items of two types and do not collide. Until the old shapes are tombstoned they still share the `view` type's name space wherever the old shapes are stored, and the container name-collision refusal keeps judging them there. +- **One form per name per package.** Inside a base's dependency closure ADR-0146 D2's rule applies unchanged: an undeclared same-name item of a dependent is refused at publish. +- **The public address (slug) is a second identity**, declared in `sharing.publicLink`. Two different forms on one slug are not refused today. Merge question 3 decides that the `form` write door refuses it. + +Merge question 2 records the alternative (a short name addressed by package). + +### D4 — Overrides: `form` joins ADR-0146 D2's list {#d4} + +`form` is overridable by declaration: an item of the base's paired `.custom` that carries the base form's name and `overrides: { package, basedOn }` replaces the base's form whole (ADR-0146 D2, D8). This is what Setup's on/off switch writes and what the designer writes when it edits an installed app's form. + +- **The classification row** is `form: listed` in `OVERRIDE_TYPE_CLASSIFICATION`, basis `adr_0146_d2_listed`, no conditions. `packages/spec/src/kernel/customization-package.test.ts` fails when a registry type has no row there and when a row names no registry type, so the row lands in the **same change** as the registry row — card ②. This record changes no code. +- **Whole-document replace stands.** The switch-only override Setup writes is the base's whole document with one key changed; `ui/packages/app-shell/src/views/setup/publicForms.ts#overrideHoldsOnlySwitch` is how the page tells such an override from a redesign. +- **`form` is not a security-catalog type** (ADR-0146 D6): the anonymous grant is derived from the resolved form's object at the door (ADR-0138 D2), not held by name in the security catalog. What an override may do to anonymous intake is bounded by [D6](#d6), not by excluding the type. + +### D5 — Adding the type is additive: one projection reads the three old shapes {#d5} + +From the release that adds the type until the next protocol major: + +- **The projection.** One pure function in `packages/spec` — beside `expandViewContainer`, built on it — turns a `view` body into the `form` items it carries: the container's `form`, each `formViews` entry, and a `viewKind: 'form'` item's `config`. Each projected item takes the name it is served under today, `object` from the old four-rung resolution, and the body unchanged. It is the **only** reader of the old shapes for form content: the loader, the stored-row read, the anonymous doors, the withdrawal judgement and the lint all call it, and none re-reads `formViews` by hand. +- **`form` reads serve authored items and projected ones.** A projected item is marked as such in its read envelope so a surface can say "defined in a view" and offer the move. +- **An authored `form` item shadows a projected one of the same name in the same package.** It never shadows a withdrawal ([D6](#d6)). +- **`view` reads are unchanged** until the major: `GET /api/v1/meta/view` keeps listing `viewKind: 'form'` items, and `GET /api/v1/meta/view/:name` keeps answering a form's name. They are frozen: they serve the old shapes only and are not the picture of an environment's forms once a `form` item exists. Every platform reader moves to `form` — the anonymous doors in card ②, the console in card ③. +- **Old-shape writes still save** until the major. A new `view` save that carries a form is stored as a `view` row and projected. +- **A `form` write acts on the form whichever type stores it.** A save, reset or delete of a `form` at `(package, name)` also removes the old-shape row that carries the same form at the same address, in the same transaction: an item-shaped `view` row is deleted, a stored container is re-saved without that form. One address holds one definition of a form; the Setup switch written before the re-point (a `view` override) is found and cleared by the re-pointed switch. +- **No conversion notice and no new warning for an old shape before the major.** The existing `form-view-internal-not-loaded` warning is the only advisory. Skills and docs teach the new shape from card ④. + +### D6 — The anonymous doors and the withdrawal judgement read both types {#d6} + +This is the security-sensitive part. ADR-0138 D2 row 1 is unchanged: the admission condition is still the form's own `sharing` declaration, and the grant is still insert and read-back on the form's one object. What changes is where the declaration is read from. The rules: + +1. **One resolution.** Every anonymous door keeps reading the form through the one resolution in `registerFormEndpoints`. No door gets its own copy of "is this form public". +2. **One candidate rule.** `anonymousFormIntakeCandidates` gains the `form` item as a fourth shape (the item itself is the form). The three-part open test does not change. +3. **Candidates come from the effective `form` read** — authored items and projections ([D5](#d5)). +4. **The withdrawal layer is both types, every layer.** A candidate named `N` is served only when no body that carries `N` explicitly withdraws it, across: the effective list of `form`, the effective list of `view`, and the per-package layer of each. Old-shape bodies are passed through the projection first, so a container's `formViews` entry is judged under the name it is served as. +5. **Narrowing only, in both directions.** A `form` item cannot re-open a form an old-shape body withdraws, and an old-shape body cannot re-open a form a `form` item withdraws. The shadowing of [D5](#d5) selects which body is *served*; it never removes a body from the withdrawal layer. +6. **Matched by name, then by whole item or by slug.** For a `form` body the slot is the item, so an explicit withdrawal in a body named `N` closes `N`. The slug match is kept: a withdrawn form does not escape by pointing its link at a new slug. The known limit recorded in the module's header (a withdrawal of a name closes that name in every package) is kept, because it fails closed. +7. **A body that cannot be read closes what it names.** A stored `view` body that carries form content the projection cannot turn into items is not skipped: every public link it names is treated as withdrawn, and the boot says so once at `error`, naming the row and the ceremony of [D7](#d7). +8. **A switched-off form answers `404 FORM_NOT_FOUND`**, as a form that does not exist (ruling record 7100386248, F3 = A). The tenancy intake rule is unchanged and runs after the match. +9. **Write-time judgements cover `form`.** The tenancy intake advisory and the organization-scoped refusal of a save that would leave a withdrawn form open judge a `form` write as they judge a `view` write, over the same two-type layer. +10. **The reader of old-shape withdrawals outlives the old shapes.** See [D7](#d7) and merge question 4. + +**Pins card ② owes, each with an ablation** (remove the named read, watch the pin turn red, restore): + +- a form withdrawn by a `view` override in `.custom`, with an authored `form` item of the same name open: both doors answer `404` (ablate: the `view` half of the layer); +- the mirror: withdrawn by a `form` override, open as an old-shape item in the base (ablate: the `form` half); +- withdrawn in a container's `formViews` entry, open as a `form` item named for the expansion (ablate: the projection step of the layer); +- withdrawn by slug after the open definition moved to another name (ablate: the slug match); +- a per-package-layer withdrawal in either type (ablate: `getMetaItemsPerPackage` for that type); +- an unreadable old-shape body closes its links (ablate: rule 7); +- the submit door refuses where the resolve door does, on each case above. + +Each pin asserts the refusal's status and `code` and that no record was written, not a bare status. + +### D7 — The old shapes retire in the next protocol major, with their migration {#d7} + +**Schedule.** The protocol is at major 18 (`packages/spec/src/kernel/protocol-version.ts#PROTOCOL_VERSION`). The three old shapes are tombstoned in **major 19** and not before: `ViewSchema.form`, `ViewSchema.formViews`, and the `form` member of `packages/spec/src/ui/view.zod.ts#ViewKindSchema` with the `form` arm of `ViewItemSchema` and `ViewItemWireSchema`. Each tombstone carries its prescription ("a form is a `form` item: move it to `forms:` …") as `retiredKey()` and `enumWithRetiredValues` do today. `Metadata-protocol: narrowed`. From that release `view` reads serve lists only. + +**Sources — an ADR-0087 conversion and `os migrate meta`.** + +- One D2 conversion, `toMajor: 19`, on the stack: it moves each named form out of `views[]` into `forms[]` under the projection's name, lifts the binding to `object`, and leaves the lists where they are. A container left with no member is removed. It is lossless for every form it moves. +- It is the first conversion that moves an item between two stack collections; its fixture pairs cover the three shapes, a container holding both lists and forms, and a form whose `data.object` disagrees with its container (left in place, with a structured TODO). +- **Internal record forms are not moved** (ruling item 3). The set is the one `form-view-internal-not-loaded` already defines — the container's default `form`, `formViews.default`, `formViews.create`, an item with `isDefault: true` or named `OBJECT.create` — when the form is not public and no `type: 'form'` action in the stack targets it. The conversion deletes those and says so per form; their layout belongs to the object's `fieldGroups` (HotCRM's own are objectstack-ai/hotcrm#2739's). A form of that set that is public or action-opened is moved like any other. +- The translation tails move with them ([D8](#d8)), by a second conversion on `translations`. +- A D3 chain entry for major 19 carries the semantic half; `os migrate meta --from 18` lists the edits and `--write` applies the ones it can prove. + +**Stored rows — a ceremony, because the stored pass cannot change a row's type.** `applyConversionsToStoredItem` reads back the collection of the row's own type, so the move from a `view` row to a `form` row is a migration of rows, in the shape ADR-0131 D10 and ADR-0146 D11 set: a CLI ceremony the administrator runs, read-only by default, `--apply` to write, idempotent, reporting per package what it moved and what it could not. + +- A stored `view` item with `viewKind: 'form'` becomes a `form` row at the same `(package, name)`; a stored container is split — its lists stay a `view` row, each form becomes a `form` row. +- A **`.custom` override** of a form keeps its package, its name and its `overrides` declaration, `basedOn` unchanged: it is the same override in the type its base now has. This covers every switch Setup has written. +- A **package-less overlay row** over a packaged form (ADR-0146 D11's unmigrated class) is moved to the destination D11 gives it — a declared `form` override in the base's pair — and where the pair cannot be ensured it stays a `view` row, still read by rule 4 and rule 7 of [D6](#d6). +- History rows stay verbatim under the type they were written as (ADR-0087: the version layer is not converted); the new row's history starts with the move. +- Internal record forms in stored rows are reported and left for the administrator to delete; the ceremony deletes nothing it did not move. +- The ceremony can be run from the release that adds the type. It **must** be run before a deployment moves to major 19: that release's upgrade refuses to proceed while a stored old-shape form row exists, naming the ceremony. + +**The withdrawal reader is exempt from the kit age-out** (merge question 4). ADR-0087, as amended on 2026-10-26, lets a retired conversion and its tombstone leave the tree one major after they retire. The reader that finds a withdrawal in a stored old-shape body does not follow that clock: it stays as long as such a row can exist, and it is removed only by a release whose upgrade precheck has refused every deployment that still holds one. A withdrawal nobody reads would re-open a form, and that direction is never taken by a clean-up. + +**After the major**: `ViewSchema` is lists (`list`, `listViews`), `ViewKindSchema` is `list` alone, the projection serves no content, and `anonymousFormObjectName`'s list rung is gone. + +### D8 — Translations: a `forms` family, the old form tails as fallback {#d8} + +- **The family.** `forms` is a top-level family of the translation bundle, a record keyed by the form's full name, beside `pages` and `dashboards`: + - `forms.NAME.label`, `.title`, `.description`; + - `forms.NAME.submitBehavior.title` and `.message`; + - `forms.NAME.sections.SECTION.label`, `.description`, and `.fields.FIELD.label` / `.placeholder` / `.helpText`. +- **Section copy keeps its object-level default.** A section that has no key under `forms.NAME.sections` reads `objects.OBJECT._sections.SECTION`, as today. That is not a legacy fallback: field groups and forms of one object share section names on purpose, and `_sections` stays live for field groups. +- **The form tails under `_views` are the fallback.** `objects.OBJECT._views.KEY.title` and `.submitBehavior.*` are read when `forms.NAME` has no value for the key, until major 19. `title` and `submitBehavior` are form-only tails, so the conversion that moves them needs no other signal. At the major the two tails are tombstoned on the `_views` shape with the prescription naming `forms.NAME`. +- The fallback is one declared read in the translator, not a reader-side `??`: it is the translation half of [D5](#d5)'s projection and retires with it. +- The extractor and the translation lint emit and accept the new family from card ② and stop emitting the old tails for an authored `form` item. + +### D9 — Shipped and paused work: kept, re-pointed, or retired {#d9} + +| Work | State on `62692b7f8b` | Disposition | +|:--|:--|:--| +| Setup → Configuration → Public forms (#36697) | merged; reads and writes type `view` | **Kept, re-pointed to `form`.** The list read in the page and the six type arguments in `ui/packages/app-shell/src/views/setup/publicForms.ts` (`layered` twice, the two save paths, `reset`, the override save) name `form`; `ui/packages/app-shell/src/views/setup/publicForms.ts#publicFormRowOf` reads the item itself and drops the `viewKind` filter and the `config` hop. Behaviour is unchanged: list every public form, switch, copy address, preview. | +| The designer of PR #36784 (the `publicFormDesign` module and its tests, the `PublicFormsDesigner` component) | open draft, paused at `1f9f234303` | **Kept, re-hosted as the `form` type's editor.** Its rules stay: fillable fields only, an object-required field cannot be removed, the address clash refusal, draft then publish, an installed app's form saved as a declared override. Its input and output move from a view item's `config` to the `form` item. | +| The Form-tab switch PR #36784 adds to `StudioDesignSurface.tsx` | in that PR only; not on `main` | **Not landed.** The object page's field-layout tab stays field groups only (#36505, merged). | +| Studio Developer → Public Forms (`ui/apps/console/src/pages/developer/PublicFormsPage.tsx`, `nav_public_forms` in `packages/platform-objects/src/apps/studio.app.ts`) | on `main` | **Retired** with the card that lands the editor; its route redirects to the `form` list. | +| The lint rules over form views (15 source files under `packages/lint/src`) | on `main` | **Kept**; their walker (`packages/lint/src/view-walk.ts#formViewSites`) reads `form` items and, until the major, the projection. | + +**What the generic metadata surface covers, and what stays dedicated.** + +- **Generic** (Studio's metadata list and item page, as for every type): the list of an app's forms with its columns row (name, label, object, public address, on or off — the row #36860's list-columns work owes this type), create, delete, Source, layered view, history and rollback, draft and publish, the "customization" and "overrides" marks. +- **Dedicated editor** (the `form` type's one editor, ADR-0146 D1): the designer above with its live preview. A form is not edited through the schema-derived form; the designer is the item's editor. +- **Dedicated, in Setup** (operations, administrators only): the environment-wide list, the on/off switch as a switch-only override, copy address, preview, and switched-off forms staying listed. No field editing, no create, no delete (ruling record 7100386248 items 6 to 10). +- **On the server, for both**: the tenancy intake advisory, the address rules, and `404` for a switched-off form. + +### D10 — What this record does to other records {#d10} + +- **ADR-0017** is amended: `viewKind` is list-only from major 19 and a form is a `form` item from this record's acceptance. Its container, its item identity and its switcher query are untouched for lists. The dated pointer is on its Status line, with a note at the bullet it governs. +- **ADR-0146 D2** is amended: `form` is in "Which types". +- **ADR-0084** needs no change: its Interface pillar row already reads "app · page · view · form · dashboard · report". +- **ADR-0138** is not changed: D2 row 1's condition and grant stand; [D6](#d6) changes only which metadata type carries the `sharing` declaration. +- **ADR-0150** D1's table has no `form` row. This record places `form` with `view` ([D3](#d3)); when merge question 2 is accepted as written, the landing seat adds the row to the open "ADR revisions" card, as for any record a later change makes incomplete. +- **ADR-0088** is applied, not amended ([D1](#d1)). + +--- + +## Execution plan (after acceptance) + +Five cards, in this order. ⛔ None lands before this record is accepted. The dev agent that wrote this record files none of them; the owning seat files them from the texts in the card's report. + +| # | Card | Lane | `Metadata-protocol:` | Blocked by | +|:--|:--|:--|:--|:--| +| ① | This record (#36868) | `domain:spec`, contract tier | `none` | — | +| ② | Spec and server: the `form` type, its registry and override rows, the `forms` collection and translation family, the projection, `form` reads and writes, the doors and the withdrawal judgement over both types | `domain:spec` with `domain:server` | `added` | ① | +| ③ | Console: re-point Setup's page, land the designer as the `form` editor, re-point `FormPage`, retire the Studio Developer page (closes #36444) | `domain:ui` | `none` | ② | +| ④ | Sources and teaching: move this repository's examples and HotCRM's forms to `forms:`, their translation keys, the skills and docs | `domain:spec` (examples, skills, docs) and HotCRM's lane | `none` | ② | +| ⑤ | Major 19: tombstone the three old shapes, the two conversions and the chain entry, the stored-row ceremony and the upgrade precheck, `view` reads lists only | `domain:spec` with `domain:server` | `narrowed` | ③ and ④ | + +- **② is one releasable change.** It adds and removes nothing an author wrote: `view` reads, old-shape writes and the shipped console behave as before. It owes [D6](#d6)'s pins and ablations, the showcase's `examples/app-showcase/src/coverage.ts#KIND_COVERAGE` row (its coverage test holds exact registry membership), and the same-change override row of [D4](#d4). +- **③ carries PR #36784's work.** #36444 stays paused until ③ is filed and then carries `Blocked-by:` ③. #36505 is closed (merged as `5c2d5cf2c4`); the public-forms part of its item 4 is superseded by this record and needs no card. +- **④ may run beside ③.** After ④ no first-party source authors an old shape, which is what lets ⑤ measure "zero first-party" before it tombstones. +- **⑤ is cut only when the maintainer opens major 19.** It is the one card with a breaking banner, an ADR-0087 disposition and a migration in its changeset. + +--- + +## Decided here where the ruling was silent (for the maintainer's merge) + +Merging accepts each default; an objection names the number. Each is analysed on the four fixed axes: the real business need, long-term soundness, how hard it is for an AI author to get wrong, and not spreading scope at this stage. + +### 1. The factory name: `defineForm` is taken {#q1} + +`defineForm` is a published export that builds a schema-bound Studio metadata form. The new type needs a factory, and `define` + the type name is the pattern every type follows (`defineView`, `defineFlow`, `defineApp`). + +- **A — `defineForm` becomes the `form` type's factory; the Studio one is renamed `defineMetadataForm`, both in card ②** (default). A published export changes meaning: a compiler-carried break (ADR-0087 D9's category), declared in card ②'s changeset. +- **B — the new factory takes a new name (`defineFormItem`); `defineForm` is untouched.** No break. +- **C — no factory in card ②**; authors write `forms: [{ … }]` entries typed by the schema, and the name is decided later. + +| Axis | A | B | C | +|:--|:--|:--|:--| +| Business need | App authors need one obvious way to declare a public form. Measured users of today's `defineForm`: 17 modules in `packages/spec/src` and one file under `ui/`; use outside this repository was not measured | Same need met under a second-best name | Need met without a typed helper | +| Long-term soundness | `define` + type name holds for every type; the Studio helper's new name matches its translation family, `metadataForms` | The obvious name permanently builds something else | Defers the collision; it returns with the first helper | +| AI-author error | An AI that guesses `defineForm({ name, object, … })` is right. An old caller fails to compile and fails to parse: loud | The guess fails loudly (`schemaId` is required), then the AI must find the other name | No wrong name to guess; no compile-time help either | +| Scope now | One rename across 18 files plus a declared export change | Smallest | Smallest | + +Recommendation: **A**. The long-term name leads; its cost is a loud, one-time, compiler-carried break in a helper measured as platform-internal. If outside use of `defineForm` is found before card ②, the fallback is B, not a dual-meaning overload. + +### 2. The name: `OBJECT.KEY`, or a short name addressed by package {#q2} + +- **A — keep `OBJECT.KEY`, ADR-0150 bucket 1 with `view`** (default, [D3](#d3)). +- **B — a short name (`web_to_lead`) addressed by (package, name), ADR-0150 bucket 2 with `page`.** + +| Axis | A | B | +|:--|:--|:--| +| Business need | Every served name, action target, deep link and stored override keeps working; measured consumers address forms by this string today | No consumer asks for a short name | +| Long-term soundness | A form is bound to one object for life; the prefix states it, as for a view. One more object-derived type in bucket 1 | Matches the presentation tier's direction, but needs the bucket-2 resolver, an address grammar for `/forms/…` and a package column on action targets | +| AI-author error | The prefix-equals-`object` check refuses a mismatch at parse | A bare short name is ambiguous across packages until resolved | +| Scope now | No rename, no reference rewrite; the withdrawal identity carries over untouched | Renames every form and rewrites every reference inside a security-sensitive migration | + +Recommendation: **A**. B's one advantage has no measured pull, and B moves the identity the kill switch matches on. + +### 3. Two forms on one public address {#q3} + +Today nothing server-side refuses it; the first candidate in list order is served. + +- **A — the `form` write door, `os validate` and publish refuse a `form` whose open `publicLink` slug another form in the environment already holds** (default). A new refusal, on the new type only; old-shape writes keep today's behaviour until they retire. +- **B — keep first-match; the designer's client-side check is the only guard.** + +| Axis | A | B | +|:--|:--|:--| +| Business need | Ruling record 7100386248 asks for "the public address (unique, refused with a clear message on a clash)"; today only a UI enforces it | Leaves the API, the CLI and an AI author unguarded | +| Long-term soundness | The address is a public identity; an identity is unique at the door that stores it | Which form answers an address depends on list order | +| AI-author error | A clash is refused with both names | A second form on a taken slug saves clean and is silently never served, or silently takes over | +| Scope now | One check at one door, and one lint rule | None | + +Recommendation: **A**. It is a refusal on a new type, so it narrows nothing an author has today. + +### 4. The withdrawal reader is exempt from the retirement-kit age-out {#q4} + +ADR-0087 (amended 2026-10-26) removes a retired conversion one major after it retires. Applied here without exception, a stored old-shape body that withdraws a form would stop being read two majors on, and the form would re-open. + +- **A — the reader of old-shape withdrawals is exempt: it leaves only by a release whose upgrade precheck refuses a deployment that still holds an old-shape form row** (default, [D7](#d7)); and major 19's own upgrade carries that precheck. +- **B — no exemption: the ceremony is documented as required, and the reader ages out on ADR-0087's clock.** + +| Axis | A | B | +|:--|:--|:--| +| Business need | An administrator who switched a public form off expects it to stay off across upgrades | Relies on every operator having run a ceremony | +| Long-term soundness | A security kill switch is never removed by a clean-up schedule; the precheck makes the removal provable | One uniform rule, at the price of a fail-open path | +| AI-author error | Not an authoring surface | Not an authoring surface | +| Scope now | One precheck and a reader kept longer | None | + +Recommendation: **A**. This is a permission boundary, so it is put to the maintainer by name and not left as a reading of ADR-0087. + +### 5. The document shape: body at the top level, or under `config` {#q5} + +- **A — `name`, `object` and the body keys at the top level** (default, [D2](#d2)). +- **B — `{ name, object, config: FormView }`, the view item's shape without `viewKind`.** + +| Axis | A | B | +|:--|:--|:--| +| Business need | The ruling says body = today's form view schema | Same content | +| Long-term soundness | The type is the discriminator, so the wrapper has no job left; one level for authors, overrides and diffs | Keeps a wrapper whose reason (two kinds in one type) is gone | +| AI-author error | No `config` to forget or misspell; an unknown top-level key is refused by name. The view item's history records `confg` parsing clean before it was closed | One more nesting level to get wrong | +| Scope now | The projection and the designer's read and write adapt once | The designer's code is closer to as written | + +Recommendation: **A**. + +--- + +## Consequences + +- **Authors and AI authors** get one place for a form (`forms:`) and one for lists (`views:`). A public form no longer hides inside a list container, and its object is a key on the form. +- **`view` gets simpler in major 19**: one kind, two container members. +- **Until major 19 there are two readers of form content** (the type and the projection). The cost is bounded by the rule that the projection is the only reader of the old shapes. +- **The anonymous doors read two types for at least one major.** [D6](#d6)'s pins are the price; a withdrawal is honoured in both. +- **A deployment must run a ceremony before major 19**, and that upgrade refuses without it. +- **`defineForm` changes meaning** if merge question 1 is accepted as written. +- **First-party work**: about 100 non-test source files and about 160 test files name the old shapes; they move in ②, ③ and ④ and the remainder falls to ⑤. + +## Alternatives considered + +- **Keep forms in `view` and retire only the container shape.** On the decision card; not taken by the maintainer. +- **Keep everything as is.** On the decision card; not taken. +- **A separate `public_form` type, leaving action-opened forms in `view`.** Not taken: two types for one schema, and ruling item 1 names both consumers as `form` content. +- **Tombstone the old shapes in a minor.** Not taken: the card fixes the tombstone to a major, and HotCRM and stored rows carry the shapes today. +- **Migrate stored rows through the read-seam conversion pass.** Not possible: that pass cannot change a row's type ([Context](#loading-overriding-translating)). +- **Make the record create and edit form a `form` item with a default role.** Refused by ruling item 3. + +## Readings, re-taken at `62692b7f8b` + +The card cites positions read at `14f4d8f8`. Each was read again; this record cites symbols, never line numbers. + +| The card's citation | On `62692b7f8b` | +|:--|:--| +| `view.zod.ts` `FormViewSchema` near 5329 | moved: declared at line 5411 | +| `view.zod.ts` container `ViewSchema` near 5889 | moved: 5971 | +| `view.zod.ts` item and overlay arms, 6368 to 6900 | moved: `ViewKindSchema` 6168, the arm shape 6324, `ViewItemSchema` 6450, `ViewItemWireSchema` 6650 | +| `view.zod.ts:2186-2194`, `addRecord.formView` retired | moved: the tombstone text at 2191, the key at 2224 | +| `recordFormNavigation.ts:141-150` | holds | +| `action.zod.ts:693,719` | holds | +| `form-routes.ts:236-260`, the slug resolution | holds at 236; it now runs to 271 | +| `anonymous-form-intake.ts:103-121`, the candidates | moved slightly: 101 to 121 | +| `protocol.ts:2169`, the intake posture note | moved: 2171 | +| `protocol-save.ts:175-195`, the container collision judgement | moved: the function starts at 205; its docblock covers the cited lines | +| `customization-package.ts:319`, `view: listed` | holds | +| `MetadataProvider.tsx:654-655` | holds (655) | +| `app.zod.ts:502`, `viewName` | holds | +| `packages/metadata-core/src/anonymous-form-intake.ts` as the home of the candidates rule | moved before the card: the rule lives in `packages/spec/src/ui/anonymous-form-intake.ts`; `metadata-core` re-exports it | +| "about 10 call sites in `publicForms.ts`" | counted: six type arguments in that module and one list read in the page | +| "the Form-tab switch in `StudioDesignSurface.tsx`" | not on `main`: it exists only in PR #36784 | +| #36505 "items 1–3 + 5 continue" | #36505 is closed, merged as `5c2d5cf2c4` | +| "~15 form-view rule files" | 15 non-test files under `packages/lint/src` name the shapes | + +## Refs + +- Card: [#36868](https://github.com/objectstack-ai/objectstack/issues/36868). Paused work: [#36444](https://github.com/objectstack-ai/objectstack/issues/36444), PR [#36784](https://github.com/objectstack-ai/objectstack/pull/36784). Merged: PR [#36697](https://github.com/objectstack-ai/objectstack/pull/36697), [#36505](https://github.com/objectstack-ai/objectstack/issues/36505), [#36425](https://github.com/objectstack-ai/objectstack/issues/36425). +- Ruling records: `7123091354`, `7123091586`, `7122924165`, `7118881549`, `7100386248`. +- Touching cards named by #36868: #36797 and #36798 (Studio rail and docs on named default and create forms — re-read against [D1](#d1)), #36860 (the metadata list columns row, [D9](#d9)). From e50a02fadd88febb8d0c2e56711abeb990b30ba9 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 24 Nov 2026 10:42:54 +0000 Subject: [PATCH 02/13] =?UTF-8?q?docs(adr):=20ADR-0159=20=E2=80=94=20forms?= =?UTF-8?q?=20are=20their=20own=20metadata=20type;=20amend=20ADR-0017=20an?= =?UTF-8?q?d=20ADR-0146=20D2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A new record for the form kind (admission, shape, name space, overrides, dual-read, the anonymous doors over both types, the major-19 retirement and its migration, translations, disposition of shipped work, card split), the dated pointers on ADR-0017 and ADR-0146, and the regenerated index. Claude-Session: https://claude.ai/code/session_01QSeKYpEsWWE9Y5YtSsDgqZ Co-authored-by: Claude --- docs/adr/0017-object-has-many-view.md | 13 +++++++++- ...ditor-per-item-paired-customize-package.md | 3 ++- ...forms-are-form-items-view-is-lists-only.md | 24 +++++++++---------- docs/adr/README.md | 7 +++--- 4 files changed, 30 insertions(+), 17 deletions(-) diff --git a/docs/adr/0017-object-has-many-view.md b/docs/adr/0017-object-has-many-view.md index 915f7aa9609..fdbfb3824f8 100644 --- a/docs/adr/0017-object-has-many-view.md +++ b/docs/adr/0017-object-has-many-view.md @@ -1,6 +1,6 @@ # ADR-0017: Object has-many View (Independent View Entities) -**Status**: Accepted · Implemented Phases 1–4 (2026-05-30) · Phase 5 (Studio designer) deferred · **Amended** (2026-09-04, [ADR-0131](./0131-total-organization-ownership-no-null-organization-id.md) D13 — §3.4's `sys_view_definition` store and §3.6's objectui repointing are **retired as inert**: verified on 2026-09-04 that no framework writer or reader of its rows exists, that `objectui` never referenced the object in its history (its runtime-view CRUD writes the ADR-0005 `view` overlay via `client.meta.saveItem`), and that a per-user view scope is a parked v18 direction. Runtime-authored views are environment metadata; §3.5's `GET /meta/view?object=` filter stands) +**Status**: Accepted · Implemented Phases 1–4 (2026-05-30) · Phase 5 (Studio designer) deferred · **Amended** (2026-09-04, [ADR-0131](./0131-total-organization-ownership-no-null-organization-id.md) D13 — §3.4's `sys_view_definition` store and §3.6's objectui repointing are **retired as inert**: verified on 2026-09-04 that no framework writer or reader of its rows exists, that `objectui` never referenced the object in its history (its runtime-view CRUD writes the ADR-0005 `view` overlay via `client.meta.saveItem`), and that a per-user view scope is a parked v18 direction. Runtime-authored views are environment metadata; §3.5's `GET /meta/view?object=` filter stands) · **Amended** (2026-11-24, [ADR-0159](./0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md) D7 and D10, on the maintainer's ruling 「拆成 form 类型,对外表单并入」, ruling record [`7123091354`](https://github.com/objectstack-ai/objectstack/issues/36444#issuecomment-7123091354) — **a view is a list**: a form is an item of the `form` metadata type, not a view item. `viewKind`'s `form` value, the `form` arm of the item and the container's `form` and `formViews` members keep loading until protocol major 19, read through ADR-0159 D5's projection, and are tombstoned in that major with the ADR-0087 conversion and the stored-row ceremony ADR-0159 D7 names. The container, the item identity and the switcher query are unchanged for lists. The note at §2's ViewItem bullet governs how §2, §3.1 and §3.2 are read. It lands by an authorized approval or the maintainer's merge of the PR cut from #36868) **Deciders**: ObjectStack Protocol Architects **Builds on**: [ADR-0003](./0003-package-as-first-class-citizen.md) (package as first-class citizen), [ADR-0005](./0005-metadata-customization-overlay.md) (one Zod source per type, org overlay), [ADR-0010](./0010-metadata-protection-model.md) (L1/L2/L3 protection) **Consumers**: `@objectstack/spec`, `@objectstack/metadata`, `@objectstack/objectql`, `@objectstack/rest`, `@objectstack/platform-objects`, `../objectui` (runtime switcher + Studio designer) @@ -64,6 +64,17 @@ has-many ViewItem.** - **`ViewItem`** — name `.` (qualified, globally unique), an `object` foreign key, a `viewKind` (`list` | `form`), a `scope`, and the existing `ListView`/`FormView` payload under `config`. + + > **Note (2026-11-24, [ADR-0159](./0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md), ruling record `7123091354` on + > [#36444](https://github.com/objectstack-ai/objectstack/issues/36444), 「拆成 form 类型,对外表单并入」) — a form is a `form` + > item, and `viewKind` is list-only.** The `form` kind this bullet, §3.1's `ViewKindSchema` and `ViewItemSchema`, and §3.2's + > per-`formViews` expansion describe is carved out of `view` into its own metadata type. Until protocol major 19 the three + > shapes that carry a form in a view (the container's `form`, a `formViews` entry, a `viewKind: 'form'` item) keep loading + > and are read as `form` items through one projection (ADR-0159 D5); in major 19 they are tombstoned, `ViewKindSchema` is + > `list` alone, and the migration is ADR-0159 D7's. Everything this record says about lists stands as written: the + > container as authoring sugar, the qualified `OBJECT.KEY` identity, `getViewsByObject()` and the `?object=` filter. A + > form keeps the name it was served under. The bullet and the sections stay as written, and this note governs how they + > are read. - **Three scopes** (a layer axis, *distinct* from ADR-0010 `_provenance`): - `package` — ships from `*.view.ts` source; immutable at runtime (not deletable / hideable / overridable in the switcher). diff --git a/docs/adr/0146-studio-designs-setup-administers-one-editor-per-item-paired-customize-package.md b/docs/adr/0146-studio-designs-setup-administers-one-editor-per-item-paired-customize-package.md index 0893b5d1307..f1b9ee56022 100644 --- a/docs/adr/0146-studio-designs-setup-administers-one-editor-per-item-paired-customize-package.md +++ b/docs/adr/0146-studio-designs-setup-administers-one-editor-per-item-paired-customize-package.md @@ -26,6 +26,7 @@ a base's upgrade plan may report, as advice, each `.custom` override that hides It lands by the maintainer's hand-merge of the PR cut from #30881. · **Amended in place** (2026-11-06, ruling record [`6691022506`](https://github.com/objectstack-ai/objectstack/issues/29594#issuecomment-6691022506) on [#29594](https://github.com/objectstack-ai/objectstack/issues/29594), maintainer, verbatim: 「① 定制单位 = App;同意」, and the second ruling record [`6691217245`](https://github.com/objectstack-ai/objectstack/issues/29594#issuecomment-6691217245) there, verbatim: 「内核白名单,可以下一版本再处理,首批名单建议:Users、Organizations;其他同意。」): the customization unit is the App, so there is one pair per App, `.custom`, shared by every package its artifact delivers and never one per module; the kernel is one platform suite with one platform pair, `com.objectstack.kernel.custom`, whose range is the platform version; no kernel object is customizable in this version, and the kernel whitelist (Users, Organizations) belongs to the next one ([D3](#d3), [D11](#d11), Q4, [Consequences](#consequences), merge questions 8 to 12); the App of a package is read from the declarations the registry holds, a package that declares no App is its own unit, and a pair created under the old per-package unit is re-identified as, or moved into, its App's pair by the migration ceremony (merge questions 11 and 12). It lands by the maintainer's hand-merge of the PR cut from #31014. · **Amended in place** (2026-11-17, card [#34724](https://github.com/objectstack-ai/objectstack/issues/34724) of epic [#34571](https://github.com/objectstack-ai/objectstack/issues/34571), maintainer, verbatim: 「打包动作不是应该在 studio 对应的软件包中自定义吗」, and on platform actions getting no switch, 「同意,立卡」; ruling record [`6944409840`](https://github.com/objectstack-ai/objectstack/issues/34724#issuecomment-6944409840), verbatim: 「保持原状并写明恢复方法」): the action's ledger switch moves onto the action in Studio and Setup › Packaged Actions retires, so the line above that says D4 "keeps the ledger switch" now reads as the switch living in Studio; the platform's own actions carry no switch in the console, a row that already switches one off stays in force, and the activation door is the way to turn it on again ([D4](#d4), [D9](#d9)). It lands by the hand-merge or authorized approval of the PR cut from #34724. +· **Amended in place** (2026-11-24, [ADR-0159](./0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md) D4, on the maintainer's ruling 「拆成 form 类型,对外表单并入」, ruling record [`7123091354`](https://github.com/objectstack-ai/objectstack/issues/36444#issuecomment-7123091354)): `form`, the metadata type forms are carved into, joins [D2](#d2)'s "Which types" list as overridable by declaration, with no conditions; its classification row lands in the same change as its registry row, which the pin in `packages/spec/src/kernel/customization-package.test.ts` requires. It lands by an authorized approval or the maintainer's merge of the PR cut from #36868. **Decided by**: the maintainer, 2026-10-30, in the desktop session that re-planned the epic, verbatim and untranslated as epic #28236 records them — the direction 「方向定为包级覆盖:代码和 Studio 用同一机制,定制都进 .custom。」; the suffix 「同意 后缀改成 .custom」; the eight questions 「等我拍板的 8 个问题,全部同意」; the extension fields 「扩展字段用 __c 后缀,只有 .custom 包能用。」; the item toolbar 「同意新增 2h「Studio 项工具栏」并放在 2a 之前」; @@ -264,7 +265,7 @@ reads, never a judgement the gate makes. Three types are excluded whatever the r catalog holds one name per deployment for: **permission sets, positions and capabilities are not overridable** ([D6](#d6); ADR-0048's 2026-10-08 addendum, ADR-0131 D3). `object` is **extended**, never replaced ([D10](#d10)); `field` rides with its object. The types ADR-0126 §3 assigns outside the regimes as code (`hook`, `job`, `api`, -`agent`, …) stay outside: customization of those is a new version of the package. +`agent`, …) stay outside: customization of those is a new version of the package. **`form`** (amended 2026-11-24, [ADR-0159](./0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md) D4) is on the list from the change that adds the type to the registry: a declared override of a base's form in the paired `.custom` replaces that form whole, and it is what Setup's public-form switch writes. A `view` override of a form stored before that change is the same override; ADR-0159 D7's ceremony moves it to `form` with its `overrides` declaration and its `basedOn` unchanged, and until it is moved the anonymous form doors keep reading its withdrawal (ADR-0159 D6). **What this lifts from ADR-0126 §9 and ADR-0131 D6.** §9's first bullet deferred it: "The ServiceNow-style overlay layer (badge / customization list / diff-vs-base / revert / upgrade skip-report) — recorded as the mature direction **if** diff --git a/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md b/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md index e5cf9a778e1..e09dad12de1 100644 --- a/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md +++ b/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md @@ -12,7 +12,7 @@ 1. A new metadata type **`form`**, addressed by name, bound to one object (it carries `object` itself), body = today's form view schema. Its content is named forms that have a consumer: **public forms** (the main content, `sharing` included) and forms an action of `type: 'form'` opens. 2. **Public forms are not a separate feature**: they are `form` items. Their list, detail and edit come from the `form` type, not from a separate Studio page. 3. `view` becomes **lists only**. The record create and edit form stays on the object's `fieldGroups` and does not become a `form` item. -- **Supersedes, among rulings**: items 1 and 2 of ruling record [`7118881549`](https://github.com/objectstack-ai/objectstack/issues/36444#issuecomment-7118881549) (the 2026-11-24T01:08Z option 「Studio 单独一页,存储不变」) and the "Definition (unchanged shape)" paragraph of ruling record [`7100386248`](https://github.com/objectstack-ai/objectstack/issues/36444#issuecomment-7100386248). The rest of 7100386248 stands and is carried here: Studio designs and Setup operates (its items 2 to 10), and a switched-off form answers `404 FORM_NOT_FOUND` like a form that does not exist (its F3 = A). +- **Rulings it replaces**: items 1 and 2 of ruling record [`7118881549`](https://github.com/objectstack-ai/objectstack/issues/36444#issuecomment-7118881549) (the 2026-11-24T01:08Z option 「Studio 单独一页,存储不变」) and the "Definition (unchanged shape)" paragraph of ruling record [`7100386248`](https://github.com/objectstack-ai/objectstack/issues/36444#issuecomment-7100386248). The rest of 7100386248 stands and is carried here: Studio designs and Setup operates (its items 2 to 10), and a switched-off form answers `404 FORM_NOT_FOUND` like a form that does not exist (its F3 = A). - **Builds on**: [ADR-0005](./0005-metadata-customization-overlay.md) (one Zod source per type), [ADR-0049](./0049-no-unenforced-security-properties.md) (enforce or remove), [ADR-0050](./0050-form-layout-vs-presentation.md) (a form declares layout, the caller chooses where it opens), [ADR-0084](./0084-application-builder-information-architecture.md) (the Interface pillar already lists `form` beside `view`; no change there), [ADR-0087](./0087-metadata-protocol-upgrade-contract.md) (conversions, the migration chain, stored rows), [ADR-0088](./0088-metadata-kind-admission-and-retirement.md) (the kind admission test), [ADR-0138](./0138-guest-model-anonymous-principal-doors-grants-and-organization.md) D2 (the public form doors' admission condition and grant, unchanged), [ADR-0146](./0146-studio-designs-setup-administers-one-editor-per-item-paired-customize-package.md) (declared overrides in the paired `.custom`), [ADR-0150](./0150-behavioural-metadata-addressed-by-package-objects-keep-the-literal-prefix.md) D1 (object-derived names keep the literal prefix). - **Inputs**: the card's read-only analysis, taken at `main` `14f4d8f8`. Every reading below was taken again for this record on `objectstack-ai/objectstack` `main` at `62692b7f8b`; where a position moved, [Readings](#readings-re-taken-at-62692b7f8b) says so. @@ -367,23 +367,23 @@ Recommendation: **A**. ## Readings, re-taken at `62692b7f8b` -The card cites positions read at `14f4d8f8`. Each was read again; this record cites symbols, never line numbers. +The card cites positions read at `14f4d8f8`. Each was read again. The numbers below are a dated reading for the card, not anchors; the decision text above cites symbols. | The card's citation | On `62692b7f8b` | |:--|:--| | `view.zod.ts` `FormViewSchema` near 5329 | moved: declared at line 5411 | | `view.zod.ts` container `ViewSchema` near 5889 | moved: 5971 | | `view.zod.ts` item and overlay arms, 6368 to 6900 | moved: `ViewKindSchema` 6168, the arm shape 6324, `ViewItemSchema` 6450, `ViewItemWireSchema` 6650 | -| `view.zod.ts:2186-2194`, `addRecord.formView` retired | moved: the tombstone text at 2191, the key at 2224 | -| `recordFormNavigation.ts:141-150` | holds | -| `action.zod.ts:693,719` | holds | -| `form-routes.ts:236-260`, the slug resolution | holds at 236; it now runs to 271 | -| `anonymous-form-intake.ts:103-121`, the candidates | moved slightly: 101 to 121 | -| `protocol.ts:2169`, the intake posture note | moved: 2171 | -| `protocol-save.ts:175-195`, the container collision judgement | moved: the function starts at 205; its docblock covers the cited lines | -| `customization-package.ts:319`, `view: listed` | holds | -| `MetadataProvider.tsx:654-655` | holds (655) | -| `app.zod.ts:502`, `viewName` | holds | +| `view.zod.ts` lines 2186 to 2194, `addRecord.formView` retired | moved: the tombstone text at 2191, the key at 2224 | +| `recordFormNavigation.ts` lines 141 to 150 | holds | +| `action.zod.ts` lines 693 and 719 | holds | +| `form-routes.ts` lines 236 to 260, the slug resolution | holds at 236; it now runs to 271 | +| `anonymous-form-intake.ts` lines 103 to 121, the candidates | moved slightly: 101 to 121 | +| `protocol.ts` line 2169, the intake posture note | moved: 2171 | +| `protocol-save.ts` lines 175 to 195, the container collision judgement | moved: the function starts at 205; its docblock covers the cited lines | +| `customization-package.ts` line 319, `view: listed` | holds | +| `MetadataProvider.tsx` lines 654 and 655 | holds (655) | +| `app.zod.ts` line 502, `viewName` | holds | | `packages/metadata-core/src/anonymous-form-intake.ts` as the home of the candidates rule | moved before the card: the rule lives in `packages/spec/src/ui/anonymous-form-intake.ts`; `metadata-core` re-exports it | | "about 10 call sites in `publicForms.ts`" | counted: six type arguments in that module and one list read in the page | | "the Form-tab switch in `StudioDesignSurface.tsx`" | not on `main`: it exists only in PR #36784 | diff --git a/docs/adr/README.md b/docs/adr/README.md index cb744143f75..23f3597eeb0 100644 --- a/docs/adr/README.md +++ b/docs/adr/README.md @@ -13,12 +13,12 @@ ## Summary -159 records under `docs/adr/` (154 numbers), 11 under `ui/docs/adr/` (listed separately below). +160 records under `docs/adr/` (155 numbers), 11 under `ui/docs/adr/` (listed separately below). | Status | Records | |---|---| | Accepted | 138 | -| Proposed | 7 | +| Proposed | 8 | | Superseded | 4 | | Draft | 3 | | Deferred | 2 | @@ -26,7 +26,7 @@ | Amended | 1 | | Partially implemented | 1 | | Revised | 1 | -| **Total** | **159** | +| **Total** | **160** | ## Shared numbers @@ -226,6 +226,7 @@ A bare `ADR-0006` names the decision; its current text is [0006-project-environm | [ADR-0156](./0156-compiled-metadata-answer-cache-every-source-counts-its-own-changes.md) | A compiled metadata answer is cached only when every source it reads counts its own changes, and a bound cove… | Accepted — 2026-11-16 — maintainer ruling on #34206, comment 6920925378, v… | 2026-11-16 | — | — | | [ADR-0157](./0157-working-calendars-are-org-editable-runtime-data-resolved-by-code-or-refused.md) | Working calendars are organization-editable runtime data — a consumer names a calendar by code or takes the o… | Accepted — 2026-11-19 — maintainer ruling on #35340, comment `7000950747`,… | 2026-11-19 | — | — | | [ADR-0158](./0158-units-of-measure-standard-unit-table-org-units-quantity-unit-declaration-base-quantity.md) | Units of measure — a closed standard unit table in the spec, organization-owned units, a quantity field that… | Accepted — 2026-11-19, ruled on objectstack#35339 (ruling record `70011930… | 2026-11-19 | — | — | +| [ADR-0159](./0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md) | Forms are their own metadata type — a `form` item is a named form with a consumer, public forms are `form` it… | Proposed — 2026-11-24, written for objectstack#36868 on the maintainer's r… | 2026-11-24 | — | — | ## ObjectUI registry — `ui/docs/adr/` (`ui-` prefix) From 86b607fa9447779cfb19165f864012344471d17f Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 24 Nov 2026 11:00:32 +0000 Subject: [PATCH 03/13] =?UTF-8?q?docs(adr):=20ADR-0159=20=E2=80=94=20say?= =?UTF-8?q?=20where=20form=20items=20are=20served?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Claude-Session: https://claude.ai/code/session_01QSeKYpEsWWE9Y5YtSsDgqZ Co-authored-by: Claude --- ...adata-type-public-forms-are-form-items-view-is-lists-only.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md b/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md index e09dad12de1..807b75e1cd8 100644 --- a/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md +++ b/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md @@ -120,7 +120,7 @@ ADR-0088's three clauses, each on a fact measured above: - **Not carried over from the view item**: `viewKind`, `config`, `isDefault` (a record-form role, ruling item 3), `order` (the switcher's order) and `scope` (the registry's provenance already says package or runtime). - **The object binding has one rung.** A `form` item's object is its `object`. The body's `data` key is not authored on a `form` item: the schema refuses it by name with the prescription "bind the form with `object`". A form bound to a JSON Schema (`data.provider: 'schema'`) is not a `form` item — it has no consumer among the three. The four-rung resolution of `anonymousFormObjectName` survives only inside the projection of the old shapes ([D5](#d5)) and leaves with them. - **`object` must name an object** the package can reference, judged where a view's object is judged today (`os validate`, publish). It is not editable after the form is created: the name carries it ([D3](#d3)). -- **Stack collection** `forms`, file patterns `**/*.form.ts`, `**/*.form.yml`, `**/*.form.json`, REST plural `/api/v1/meta/form` for items as every type has. +- **Stack collection** `forms`; file patterns `**/*.form.ts`, `**/*.form.yml`, `**/*.form.json`; items are served at `/api/v1/meta/form`, as every type's are. - **Registry row**: `supportsOverlay: true`, `allowEnvironmentOverlay: false`, `allowRuntimeCreate: true`, `supportsVersioning: true`, `executionPinned: false`, `loadOrder: 50`, `domain: 'ui'` — `page`'s row. `allowEnvironmentOverlay` is `false` because a new type takes ADR-0005's default and ADR-0146 D11 retires that tier as a write door; a customization is a declared override ([D4](#d4)). ### D3 — The name space: `OBJECT.KEY`, the served name, unchanged {#d3} From 352579004f99215bd5391dbe31a435349921dda3 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 24 Nov 2026 12:34:38 +0000 Subject: [PATCH 04/13] docs(adr): ADR-0159 records the five merge questions as ruled, all option A The maintainer ruled the five merge questions of ADR-0159 (ruling record 7131569242 on the card). Each question keeps its options and four-axis table and now ends with its ruling, what it asks of the cards and a Ruling-ref line; the cross-references in D2, D3, D6, D7, D10, the TL;DR and the execution plan read as decided. Question 1's fallback (outside use of defineForm found) returns to the maintainer. Status stays Proposed: the record is accepted by the merge. No decision the ruling did not touch is changed. Claude-Session: https://claude.ai/code/session_01QSeKYpEsWWE9Y5YtSsDgqZ Co-authored-by: Claude --- ...forms-are-form-items-view-is-lists-only.md | 83 ++++++++++++++----- 1 file changed, 60 insertions(+), 23 deletions(-) diff --git a/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md b/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md index 807b75e1cd8..c02c388f650 100644 --- a/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md +++ b/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md @@ -1,6 +1,6 @@ # ADR-0159: Forms are their own metadata type — a `form` item is a named form with a consumer, public forms are `form` items, and `view` is lists only -**Status**: Proposed — 2026-11-24, written for objectstack#36868 on the maintainer's ruling of that day (ruling records [`7123091354`](https://github.com/objectstack-ai/objectstack/issues/36444#issuecomment-7123091354) on #36444 and [`7123091586`](https://github.com/objectstack-ai/objectstack/issues/36505#issuecomment-7123091586) on #36505). `docs/adr/**` is Tier H (Prime Directive #14): this record becomes **Accepted** by an authorized approval or the maintainer's merge of the PR that carries it, and is in force from that merge. **This record declares; it implements nothing** — no schema, no code, no changeset; every mechanism below is cut as a card after the merge ([Execution plan](#execution-plan-after-acceptance)). It **amends** [ADR-0017](./0017-object-has-many-view.md) (`viewKind` becomes list-only; the form arm is tombstoned on [D7](#d7)'s schedule) and [ADR-0146](./0146-studio-designs-setup-administers-one-editor-per-item-paired-customize-package.md) D2 (`form` joins the overridable types) — each record's Status line carries the dated pointer. +**Status**: Proposed — 2026-11-24, written for objectstack#36868 on the maintainer's ruling of that day (ruling records [`7123091354`](https://github.com/objectstack-ai/objectstack/issues/36444#issuecomment-7123091354) on #36444 and [`7123091586`](https://github.com/objectstack-ai/objectstack/issues/36505#issuecomment-7123091586) on #36505). **The five merge questions are ruled, all option A** (ruling record [`7131569242`](https://github.com/objectstack-ai/objectstack/issues/36868#issuecomment-7131569242) on #36868, 2026-11-24; [the questions](#the-five-merge-questions-as-ruled)): the record now carries no open default. `docs/adr/**` is Tier H (Prime Directive #14): this record becomes **Accepted** by an authorized approval or the maintainer's merge of the PR that carries it, and is in force from that merge. **This record declares; it implements nothing** — no schema, no code, no changeset; every mechanism below is cut as a card after the merge ([Execution plan](#execution-plan-after-acceptance)). It **amends** [ADR-0017](./0017-object-has-many-view.md) (`viewKind` becomes list-only; the form arm is tombstoned on [D7](#d7)'s schedule) and [ADR-0146](./0146-studio-designs-setup-administers-one-editor-per-item-paired-customize-package.md) D2 (`form` joins the overridable types) — each record's Status line carries the dated pointer. - **Date**: 2026-11-24 - **Decided by**: the maintainer, 2026-11-24, verbatim and untranslated, as the card and the two ruling records carry them: @@ -8,6 +8,7 @@ - 05:22Z: 「如果分拆的话,对外表单的功能就不用单独开发了,就合并到这个元数据类型中。」 - 05:23Z: 「现在对外表单开发的任务先暂停」 (pause record [`7122924165`](https://github.com/objectstack-ai/objectstack/issues/36444#issuecomment-7122924165)). - 05:33Z, on the decision card 「表单要不要从 view 拆成独立的 form 元数据类型?」, option picked: **「拆成 form 类型,对外表单并入」**. Not taken: keep forms in `view` and retire only the container shape; keep everything as is. + - On this record's five merge questions, put to the maintainer with the four-axis options of dev report [`7129798720`](https://github.com/objectstack-ai/objectstack/issues/36868#issuecomment-7129798720), each with recommendation A: 「表单拆成独立 form 元数据类型的 5 个合并问题 都同意」 (ruling record [`7131569242`](https://github.com/objectstack-ai/objectstack/issues/36868#issuecomment-7131569242), recorded 2026-11-24T12:31Z). All five are option A. - **The ruling, as the card records it** (this record executes it; ⛔ none of it is re-opened here): 1. A new metadata type **`form`**, addressed by name, bound to one object (it carries `object` itself), body = today's form view schema. Its content is named forms that have a consumer: **public forms** (the main content, `sharing` included) and forms an action of `type: 'form'` opens. 2. **Public forms are not a separate feature**: they are `form` items. Their list, detail and edit come from the `form` type, not from a separate Studio page. @@ -29,7 +30,7 @@ 7. **Translations get a `forms` family**; the form tails under `objects.OBJECT._views` are read as a fallback until the major ([D8](#d8)). 8. **Shipped work is kept and re-pointed**: Setup's page reads `form`, the paused designer becomes the `form` editor, the Studio Developer page and the Form-tab switch retire ([D9](#d9)). 9. **Five cards, in order**; ②, ③ and ④ are additive, ⑤ is the major ([Execution plan](#execution-plan-after-acceptance)). -10. **Five points the ruling is silent on are decided here with a default** and listed for the maintainer's merge, each with its options on four axes ([Decided here where the ruling was silent](#decided-here-where-the-ruling-was-silent-for-the-maintainers-merge)). +10. **Five points the first ruling is silent on were put to the maintainer and are ruled, all option A**: `defineForm` is the type's factory, the name stays `OBJECT.KEY`, a taken public address is refused, the reader of old withdrawals is exempt from the age-out, and the body is at the top level ([The five merge questions, as ruled](#the-five-merge-questions-as-ruled)). --- @@ -80,7 +81,7 @@ Measured on `62692b7f8b` with `git grep -lE "formViews|viewKind: 'form'|viewKind ### One name already taken -`packages/spec/src/ui/view.zod.ts#defineForm` is a published export, and it is **not** this type's factory: it builds a schema-bound form for Studio's metadata editors (`data.provider: 'schema'`), used by 17 `*.form.ts` modules under `packages/spec/src`. The obvious factory name and the obvious file suffix for the new type both collide with it in meaning. Merge question 1 below. +`packages/spec/src/ui/view.zod.ts#defineForm` is a published export, and it is **not** this type's factory: it builds a schema-bound form for Studio's metadata editors (`data.provider: 'schema'`), used by 17 `*.form.ts` modules under `packages/spec/src`. The obvious factory name and the obvious file suffix for the new type both collide with it in meaning. [Ruled question 1](#q1) settles it: the name goes to the new type and the Studio helper is renamed. --- @@ -115,7 +116,7 @@ ADR-0088's three clauses, each on a fact measured above: ``` - **One Zod source** (Prime Directive 7): a `FormSchema` in `packages/spec/src/ui/`, derived **by reference** from `FormViewSchema`'s shape, never transcribed. `FormViewSchema` stays as the body schema; the schema-bound Studio forms and the React form block keep using it. -- **The body is at the top level.** There is no `viewKind` and no `config` wrapper: the type is the discriminator, and "body = today's form view schema" is read literally. Merge question 5 records the wrapped alternative. +- **The body is at the top level.** There is no `viewKind` and no `config` wrapper: the type is the discriminator, and "body = today's form view schema" is read literally. Ruled so ([question 5](#q5), which keeps the wrapped alternative as the option not taken). - **Identity keys**: `name` and `object` required; `label` optional (the display name in lists and in Setup; when absent a surface shows `title`, then the name). The item carries the envelope every standalone item carries: `protection`, the ADR-0010 fields, and ADR-0146's `overrides` declaration. - **Not carried over from the view item**: `viewKind`, `config`, `isDefault` (a record-form role, ruling item 3), `order` (the switcher's order) and `scope` (the registry's provenance already says package or runtime). - **The object binding has one rung.** A `form` item's object is its `object`. The body's `data` key is not authored on a `form` item: the schema refuses it by name with the prescription "bind the form with `object`". A form bound to a JSON Schema (`data.provider: 'schema'`) is not a `form` item — it has no consumer among the three. The four-rung resolution of `anonymousFormObjectName` survives only inside the projection of the old shapes ([D5](#d5)) and leaves with them. @@ -129,9 +130,9 @@ ADR-0088's three clauses, each on a fact measured above: - **Why this name.** It is the name every form is served under today — a stored item's own `name`, and for a container's form the name `expandViewContainer` gives it. An action's `target`, a `/forms/:name` link, a `.custom` override's key and the withdrawal judgement's identity are all this string. Keeping it means the migration renames nothing, and a withdrawal recorded against a name keeps closing that name ([D6](#d6)). Under ADR-0150 D1 it is an object-derived literal name, the bucket `view` is in; `form` takes the same bucket and no (package, name) resolution. - **Separate from lists.** After the split a list `crm_lead.all` and a form `crm_lead.all` are items of two types and do not collide. Until the old shapes are tombstoned they still share the `view` type's name space wherever the old shapes are stored, and the container name-collision refusal keeps judging them there. - **One form per name per package.** Inside a base's dependency closure ADR-0146 D2's rule applies unchanged: an undeclared same-name item of a dependent is refused at publish. -- **The public address (slug) is a second identity**, declared in `sharing.publicLink`. Two different forms on one slug are not refused today. Merge question 3 decides that the `form` write door refuses it. +- **The public address (slug) is a second identity**, declared in `sharing.publicLink`. Two different forms on one slug are not refused today. By [ruled question 3](#q3) the `form` write door, `os validate` and publish refuse it. -Merge question 2 records the alternative (a short name addressed by package). +The name is ruled ([question 2](#q2)); the alternative not taken is a short name addressed by package. ### D4 — Overrides: `form` joins ADR-0146 D2's list {#d4} @@ -166,7 +167,7 @@ This is the security-sensitive part. ADR-0138 D2 row 1 is unchanged: the admissi 7. **A body that cannot be read closes what it names.** A stored `view` body that carries form content the projection cannot turn into items is not skipped: every public link it names is treated as withdrawn, and the boot says so once at `error`, naming the row and the ceremony of [D7](#d7). 8. **A switched-off form answers `404 FORM_NOT_FOUND`**, as a form that does not exist (ruling record 7100386248, F3 = A). The tenancy intake rule is unchanged and runs after the match. 9. **Write-time judgements cover `form`.** The tenancy intake advisory and the organization-scoped refusal of a save that would leave a withdrawn form open judge a `form` write as they judge a `view` write, over the same two-type layer. -10. **The reader of old-shape withdrawals outlives the old shapes.** See [D7](#d7) and merge question 4. +10. **The reader of old-shape withdrawals outlives the old shapes.** See [D7](#d7) and [ruled question 4](#q4). **Pins card ② owes, each with an ablation** (remove the named read, watch the pin turn red, restore): @@ -201,7 +202,7 @@ Each pin asserts the refusal's status and `code` and that no record was written, - Internal record forms in stored rows are reported and left for the administrator to delete; the ceremony deletes nothing it did not move. - The ceremony can be run from the release that adds the type. It **must** be run before a deployment moves to major 19: that release's upgrade refuses to proceed while a stored old-shape form row exists, naming the ceremony. -**The withdrawal reader is exempt from the kit age-out** (merge question 4). ADR-0087, as amended on 2026-10-26, lets a retired conversion and its tombstone leave the tree one major after they retire. The reader that finds a withdrawal in a stored old-shape body does not follow that clock: it stays as long as such a row can exist, and it is removed only by a release whose upgrade precheck has refused every deployment that still holds one. A withdrawal nobody reads would re-open a form, and that direction is never taken by a clean-up. +**The withdrawal reader is exempt from the kit age-out** ([ruled question 4](#q4)). ADR-0087, as amended on 2026-10-26, lets a retired conversion and its tombstone leave the tree one major after they retire. The reader that finds a withdrawal in a stored old-shape body does not follow that clock: it stays as long as such a row can exist, and it is removed only by a release whose upgrade precheck has refused every deployment that still holds one. A withdrawal nobody reads would re-open a form, and that direction is never taken by a clean-up. **After the major**: `ViewSchema` is lists (`list`, `listViews`), `ViewKindSchema` is `list` alone, the projection serves no content, and `anonymousFormObjectName`'s list rung is gone. @@ -239,7 +240,7 @@ Each pin asserts the refusal's status and `code` and that no record was written, - **ADR-0146 D2** is amended: `form` is in "Which types". - **ADR-0084** needs no change: its Interface pillar row already reads "app · page · view · form · dashboard · report". - **ADR-0138** is not changed: D2 row 1's condition and grant stand; [D6](#d6) changes only which metadata type carries the `sharing` declaration. -- **ADR-0150** D1's table has no `form` row. This record places `form` with `view` ([D3](#d3)); when merge question 2 is accepted as written, the landing seat adds the row to the open "ADR revisions" card, as for any record a later change makes incomplete. +- **ADR-0150** D1's table has no `form` row. This record places `form` with `view` ([D3](#d3)); [question 2](#q2) is ruled as written, so after this record merges the landing seat adds the row to the open "ADR revisions" card, as for any record a later change makes incomplete. - **ADR-0088** is applied, not amended ([D1](#d1)). --- @@ -256,6 +257,7 @@ Five cards, in this order. ⛔ None lands before this record is accepted. The de | ④ | Sources and teaching: move this repository's examples and HotCRM's forms to `forms:`, their translation keys, the skills and docs | `domain:spec` (examples, skills, docs) and HotCRM's lane | `none` | ② | | ⑤ | Major 19: tombstone the three old shapes, the two conversions and the chain entry, the stored-row ceremony and the upgrade precheck, `view` reads lists only | `domain:spec` with `domain:server` | `narrowed` | ③ and ④ | +- **② carries four of the five rulings as requirements** ([the questions](#the-five-merge-questions-as-ruled)): the `defineForm` factory with the Studio helper renamed `defineMetadataForm`, after measuring outside use of today's `defineForm` (question 1); the public-address clash refusal at the `form` write door, `os validate` and publish (question 3); the reader of old-shape withdrawals built as exempt from the kit age-out and anchored as such (question 4); the top-level document shape (question 5). Question 2 asks ② for no change: the name is the one served today. ⑤ carries question 4's other half, the upgrade precheck of major 19. - **② is one releasable change.** It adds and removes nothing an author wrote: `view` reads, old-shape writes and the shipped console behave as before. It owes [D6](#d6)'s pins and ablations, the showcase's `examples/app-showcase/src/coverage.ts#KIND_COVERAGE` row (its coverage test holds exact registry membership), and the same-change override row of [D4](#d4). - **③ carries PR #36784's work.** #36444 stays paused until ③ is filed and then carries `Blocked-by:` ③. #36505 is closed (merged as `5c2d5cf2c4`); the public-forms part of its item 4 is superseded by this record and needs no card. - **④ may run beside ③.** After ④ no first-party source authors an old shape, which is what lets ⑤ measure "zero first-party" before it tombstones. @@ -263,15 +265,17 @@ Five cards, in this order. ⛔ None lands before this record is accepted. The de --- -## Decided here where the ruling was silent (for the maintainer's merge) +## The five merge questions, as ruled -Merging accepts each default; an objection names the number. Each is analysed on the four fixed axes: the real business need, long-term soundness, how hard it is for an AI author to get wrong, and not spreading scope at this stage. +The ruling this record executes is silent on five points. This record decided each with a default and put it to the maintainer, analysed on the four fixed axes: the real business need, long-term soundness, how hard it is for an AI author to get wrong, and not spreading scope at this stage. + +**Ruled, all five, on 2026-11-24: option A on each.** The maintainer's words, verbatim: 「表单拆成独立 form 元数据类型的 5 个合并问题 都同意」. Ruling record [`7131569242`](https://github.com/objectstack-ai/objectstack/issues/36868#issuecomment-7131569242) on #36868 records them against the presentation of the five questions in dev report [`7129798720`](https://github.com/objectstack-ai/objectstack/issues/36868#issuecomment-7129798720). Each section below keeps its options and its four-axis table as the record of what was weighed, and ends with its ruling, what the ruling asks of the cards, and its `Ruling-ref:`. ⛔ None of the five is open any more: changing one is a new decision (Prime Directive 13), not an objection at merge. ### 1. The factory name: `defineForm` is taken {#q1} `defineForm` is a published export that builds a schema-bound Studio metadata form. The new type needs a factory, and `define` + the type name is the pattern every type follows (`defineView`, `defineFlow`, `defineApp`). -- **A — `defineForm` becomes the `form` type's factory; the Studio one is renamed `defineMetadataForm`, both in card ②** (default). A published export changes meaning: a compiler-carried break (ADR-0087 D9's category), declared in card ②'s changeset. +- **A — `defineForm` becomes the `form` type's factory; the Studio one is renamed `defineMetadataForm`, both in card ②** (ruled). A published export changes meaning: a compiler-carried break (ADR-0087 D9's category), declared in card ②'s changeset. - **B — the new factory takes a new name (`defineFormItem`); `defineForm` is untouched.** No break. - **C — no factory in card ②**; authors write `forms: [{ … }]` entries typed by the schema, and the name is decided later. @@ -282,11 +286,18 @@ Merging accepts each default; an objection names the number. Each is analysed on | AI-author error | An AI that guesses `defineForm({ name, object, … })` is right. An old caller fails to compile and fails to parse: loud | The guess fails loudly (`schemaId` is required), then the AI must find the other name | No wrong name to guess; no compile-time help either | | Scope now | One rename across 18 files plus a declared export change | Smallest | Smallest | -Recommendation: **A**. The long-term name leads; its cost is a loud, one-time, compiler-carried break in a helper measured as platform-internal. If outside use of `defineForm` is found before card ②, the fallback is B, not a dual-meaning overload. +Recommendation, as put: **A**. The long-term name leads; its cost is a loud, one-time, compiler-carried break in a helper measured as platform-internal. + +**Ruled: A.** `defineForm` is the `form` type's factory. The existing Studio schema-bound metadata-form helper is renamed `defineMetadataForm`. Both land in card ②, as a declared compiler-carried export break. + +- **For the cards.** Card ② owns the factory and the rename (the 17 `*.form.ts` modules under `packages/spec/src` and the one file under `ui/`), and its changeset declares the export change with the FROM and TO mapping. +- **The premise, measured before card ② lands.** The ruling rests on outside use of today's `defineForm` being platform-internal. Card ② measures it first. If outside use is found, card ② falls back to a new factory name and ⛔ never to a dual-meaning overload, and **that fallback returns to the maintainer for a word** before it is built: it is not the dev's or the seat's to take. + +Ruling-ref: [`7131569242`](https://github.com/objectstack-ai/objectstack/issues/36868#issuecomment-7131569242) — the maintainer, 2026-11-24, 「表单拆成独立 form 元数据类型的 5 个合并问题 都同意」 ### 2. The name: `OBJECT.KEY`, or a short name addressed by package {#q2} -- **A — keep `OBJECT.KEY`, ADR-0150 bucket 1 with `view`** (default, [D3](#d3)). +- **A — keep `OBJECT.KEY`, ADR-0150 bucket 1 with `view`** (ruled, [D3](#d3)). - **B — a short name (`web_to_lead`) addressed by (package, name), ADR-0150 bucket 2 with `page`.** | Axis | A | B | @@ -296,13 +307,19 @@ Recommendation: **A**. The long-term name leads; its cost is a loud, one-time, c | AI-author error | The prefix-equals-`object` check refuses a mismatch at parse | A bare short name is ambiguous across packages until resolved | | Scope now | No rename, no reference rewrite; the withdrawal identity carries over untouched | Renames every form and rewrites every reference inside a security-sensitive migration | -Recommendation: **A**. B's one advantage has no measured pull, and B moves the identity the kill switch matches on. +Recommendation, as put: **A**. B's one advantage has no measured pull, and B moves the identity the kill switch matches on. + +**Ruled: A.** A `form` item keeps the `OBJECT.KEY` name, in ADR-0150 bucket 1 with `view`. There is no rename: action targets, deep links, stored overrides and the withdrawal identity keep working. + +- **For the cards.** No card renames a form or rewrites a reference to one. Card ② enforces the prefix-equals-`object` check of [D3](#d3); the migration of card ⑤ moves each form under the name it is served as today. The ADR-0150 D1 row for `form` is the landing seat's entry on the open "ADR revisions" card ([D10](#d10)). + +Ruling-ref: [`7131569242`](https://github.com/objectstack-ai/objectstack/issues/36868#issuecomment-7131569242) — the maintainer, 2026-11-24, 「表单拆成独立 form 元数据类型的 5 个合并问题 都同意」 ### 3. Two forms on one public address {#q3} Today nothing server-side refuses it; the first candidate in list order is served. -- **A — the `form` write door, `os validate` and publish refuse a `form` whose open `publicLink` slug another form in the environment already holds** (default). A new refusal, on the new type only; old-shape writes keep today's behaviour until they retire. +- **A — the `form` write door, `os validate` and publish refuse a `form` whose open `publicLink` slug another form in the environment already holds** (ruled). A new refusal, on the new type only; old-shape writes keep today's behaviour until they retire. - **B — keep first-match; the designer's client-side check is the only guard.** | Axis | A | B | @@ -312,13 +329,19 @@ Today nothing server-side refuses it; the first candidate in list order is serve | AI-author error | A clash is refused with both names | A second form on a taken slug saves clean and is silently never served, or silently takes over | | Scope now | One check at one door, and one lint rule | None | -Recommendation: **A**. It is a refusal on a new type, so it narrows nothing an author has today. +Recommendation, as put: **A**. It is a refusal on a new type, so it narrows nothing an author has today. + +**Ruled: A.** The `form` write door, `os validate` and publish refuse a form whose open slug another form already holds. It is a refusal on the new type only; nothing an author has today narrows. + +- **For the cards.** Card ② builds the refusal at all three places, naming both forms. Old-shape writes keep today's first-match behaviour until card ⑤ retires them; the designer's client-side check (card ③) stays as the early message and is no longer the only guard. + +Ruling-ref: [`7131569242`](https://github.com/objectstack-ai/objectstack/issues/36868#issuecomment-7131569242) — the maintainer, 2026-11-24, 「表单拆成独立 form 元数据类型的 5 个合并问题 都同意」 ### 4. The withdrawal reader is exempt from the retirement-kit age-out {#q4} ADR-0087 (amended 2026-10-26) removes a retired conversion one major after it retires. Applied here without exception, a stored old-shape body that withdraws a form would stop being read two majors on, and the form would re-open. -- **A — the reader of old-shape withdrawals is exempt: it leaves only by a release whose upgrade precheck refuses a deployment that still holds an old-shape form row** (default, [D7](#d7)); and major 19's own upgrade carries that precheck. +- **A — the reader of old-shape withdrawals is exempt: it leaves only by a release whose upgrade precheck refuses a deployment that still holds an old-shape form row** (ruled, [D7](#d7)); and major 19's own upgrade carries that precheck. - **B — no exemption: the ceremony is documented as required, and the reader ages out on ADR-0087's clock.** | Axis | A | B | @@ -328,11 +351,19 @@ ADR-0087 (amended 2026-10-26) removes a retired conversion one major after it re | AI-author error | Not an authoring surface | Not an authoring surface | | Scope now | One precheck and a reader kept longer | None | -Recommendation: **A**. This is a permission boundary, so it is put to the maintainer by name and not left as a reading of ADR-0087. +Recommendation, as put: **A**. This is a permission boundary, so it is put to the maintainer by name and not left as a reading of ADR-0087. + +**Ruled: A** — a permission boundary, ruled by the maintainer by name. The reader of old-shape withdrawals is **exempt from ADR-0087's kit age-out**. It leaves only by a release whose upgrade precheck refuses a deployment still holding an old-shape form row; protocol major 19's upgrade carries that precheck. No withdrawn public form may re-open. + +- **For the cards.** Card ② builds the reader inside the two-type withdrawal layer ([D6](#d6)) and marks it exempt where it lives: this record's id in the code and an anchor in `scripts/adr-anchors/`, so a later kit clean-up finds the exemption before it finds the reader. Card ⑤ keeps the reader when it tombstones the old shapes, and carries major 19's upgrade precheck with its security pins ([D7](#d7)). +- **What the exemption does not license.** Removing the reader is neither card's work. It is a later release with its own precheck, and that removal is a new decision. +- **Scope of the exemption.** It is this one reader. ADR-0087's age-out stands as amended for every other retired conversion and tombstone, the rest of this record's kit included. + +Ruling-ref: [`7131569242`](https://github.com/objectstack-ai/objectstack/issues/36868#issuecomment-7131569242) — the maintainer, 2026-11-24, 「表单拆成独立 form 元数据类型的 5 个合并问题 都同意」 ### 5. The document shape: body at the top level, or under `config` {#q5} -- **A — `name`, `object` and the body keys at the top level** (default, [D2](#d2)). +- **A — `name`, `object` and the body keys at the top level** (ruled, [D2](#d2)). - **B — `{ name, object, config: FormView }`, the view item's shape without `viewKind`.** | Axis | A | B | @@ -342,7 +373,13 @@ Recommendation: **A**. This is a permission boundary, so it is put to the mainta | AI-author error | No `config` to forget or misspell; an unknown top-level key is refused by name. The view item's history records `confg` parsing clean before it was closed | One more nesting level to get wrong | | Scope now | The projection and the designer's read and write adapt once | The designer's code is closer to as written | -Recommendation: **A**. +Recommendation, as put: **A**. + +**Ruled: A.** The `form` document carries `name`, `object` and the form body keys at the top level. There is no `config` wrapper. + +- **For the cards.** Card ② declares `FormSchema` in that shape ([D2](#d2)) and the projection of [D5](#d5) lifts an old-shape `config` to the top level; card ③'s designer reads and writes the item itself; card ⑤'s conversion and ceremony write the same shape. + +Ruling-ref: [`7131569242`](https://github.com/objectstack-ai/objectstack/issues/36868#issuecomment-7131569242) — the maintainer, 2026-11-24, 「表单拆成独立 form 元数据类型的 5 个合并问题 都同意」 --- @@ -353,7 +390,7 @@ Recommendation: **A**. - **Until major 19 there are two readers of form content** (the type and the projection). The cost is bounded by the rule that the projection is the only reader of the old shapes. - **The anonymous doors read two types for at least one major.** [D6](#d6)'s pins are the price; a withdrawal is honoured in both. - **A deployment must run a ceremony before major 19**, and that upgrade refuses without it. -- **`defineForm` changes meaning** if merge question 1 is accepted as written. +- **`defineForm` changes meaning** in card ② ([ruled question 1](#q1)): a declared, compiler-carried export break, on the premise that its outside use is platform-internal. - **First-party work**: about 100 non-test source files and about 160 test files name the old shapes; they move in ②, ③ and ④ and the remainder falls to ⑤. ## Alternatives considered @@ -393,5 +430,5 @@ The card cites positions read at `14f4d8f8`. Each was read again. The numbers be ## Refs - Card: [#36868](https://github.com/objectstack-ai/objectstack/issues/36868). Paused work: [#36444](https://github.com/objectstack-ai/objectstack/issues/36444), PR [#36784](https://github.com/objectstack-ai/objectstack/pull/36784). Merged: PR [#36697](https://github.com/objectstack-ai/objectstack/pull/36697), [#36505](https://github.com/objectstack-ai/objectstack/issues/36505), [#36425](https://github.com/objectstack-ai/objectstack/issues/36425). -- Ruling records: `7123091354`, `7123091586`, `7122924165`, `7118881549`, `7100386248`. +- Ruling records: `7123091354`, `7123091586`, `7122924165`, `7118881549`, `7100386248`; on #36868, `7131569242` (the five merge questions, all option A). - Touching cards named by #36868: #36797 and #36798 (Studio rail and docs on named default and create forms — re-read against [D1](#d1)), #36860 (the metadata list columns row, [D9](#d9)). From 70d05f33fa03614487ba61910b4e330f08d6598a Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 24 Nov 2026 13:11:08 +0000 Subject: [PATCH 05/13] docs(adr): ADR-0159 folds the contract review and the L1 record of head 352579004f9 No ruled decision changes. Prose only, in one record. - D7: the internal record form set is defined by D1's test (no sharing.publicLink), not by the lint rule's sharing.enabled test. A form that declares a publicLink, switched on or off, is never internal and moves with its switch, by the conversion and by the ceremony. Card 5's security pins are named, the switched-off default-slot form first. - D7: a package-less row whose pair cannot be ensured holds the upgrade to major 19; the precheck names the row, the ensure door's refusal and the administrator's action per cause. - D6: rule 6 states identity as the served name and the whole item; the slug match decides no case in the two-type layer; pin 4 is replaced by one whose ablation can turn red. - D2: the form type takes the .form.ts suffix and the Studio modules move to .metadata-form.ts in card 2, marked as the seat's routing on question 1. - D5, D8, questions 1, 3 and 4, the execution plan (card 4 after card 3): the nits of both records. Claude-Session: https://claude.ai/code/session_01QSeKYpEsWWE9Y5YtSsDgqZ Co-authored-by: Claude --- ...forms-are-form-items-view-is-lists-only.md | 72 ++++++++++++++----- 1 file changed, 53 insertions(+), 19 deletions(-) diff --git a/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md b/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md index c02c388f650..5fa2fbacb73 100644 --- a/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md +++ b/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md @@ -30,7 +30,7 @@ 7. **Translations get a `forms` family**; the form tails under `objects.OBJECT._views` are read as a fallback until the major ([D8](#d8)). 8. **Shipped work is kept and re-pointed**: Setup's page reads `form`, the paused designer becomes the `form` editor, the Studio Developer page and the Form-tab switch retire ([D9](#d9)). 9. **Five cards, in order**; ②, ③ and ④ are additive, ⑤ is the major ([Execution plan](#execution-plan-after-acceptance)). -10. **Five points the first ruling is silent on were put to the maintainer and are ruled, all option A**: `defineForm` is the type's factory, the name stays `OBJECT.KEY`, a taken public address is refused, the reader of old withdrawals is exempt from the age-out, and the body is at the top level ([The five merge questions, as ruled](#the-five-merge-questions-as-ruled)). +10. **Five points the first ruling is silent on were put to the maintainer and are ruled, all option A**: `defineForm` is the type's factory, the name stays `OBJECT.KEY`, a taken public address is refused, the reader of old withdrawals is exempt from the age-out, and the body is at the top level ([The five merge questions, as ruled](#the-five-merge-questions-as-ruled)). **Two points go past the ruling's words and are marked where they stand**: the `*.form.ts` file suffix follows the factory name by the owning seat's routing ([D2](#d2)), and this record keeps the withdrawal reader through major 19 although the ruling would let it leave there ([question 4](#q4)). --- @@ -81,7 +81,7 @@ Measured on `62692b7f8b` with `git grep -lE "formViews|viewKind: 'form'|viewKind ### One name already taken -`packages/spec/src/ui/view.zod.ts#defineForm` is a published export, and it is **not** this type's factory: it builds a schema-bound form for Studio's metadata editors (`data.provider: 'schema'`), used by 17 `*.form.ts` modules under `packages/spec/src`. The obvious factory name and the obvious file suffix for the new type both collide with it in meaning. [Ruled question 1](#q1) settles it: the name goes to the new type and the Studio helper is renamed. +`packages/spec/src/ui/view.zod.ts#defineForm` is a published export, and it is **not** this type's factory: it builds a schema-bound form for Studio's metadata editors (`data.provider: 'schema'`), used by 17 `*.form.ts` modules under `packages/spec/src`. The obvious factory name and the obvious file suffix for the new type both collide with it in meaning. [Ruled question 1](#q1) settles the name: it goes to the new type and the Studio helper is renamed. The suffix follows the name ([D2](#d2)); that step is the owning seat's routing on question 1's logic and is not in the ruling's words. --- @@ -122,6 +122,14 @@ ADR-0088's three clauses, each on a fact measured above: - **The object binding has one rung.** A `form` item's object is its `object`. The body's `data` key is not authored on a `form` item: the schema refuses it by name with the prescription "bind the form with `object`". A form bound to a JSON Schema (`data.provider: 'schema'`) is not a `form` item — it has no consumer among the three. The four-rung resolution of `anonymousFormObjectName` survives only inside the projection of the old shapes ([D5](#d5)) and leaves with them. - **`object` must name an object** the package can reference, judged where a view's object is judged today (`os validate`, publish). It is not editable after the form is created: the name carries it ([D3](#d3)). - **Stack collection** `forms`; file patterns `**/*.form.ts`, `**/*.form.yml`, `**/*.form.json`; items are served at `/api/v1/meta/form`, as every type's are. +- **The `*.form.ts` suffix goes to the new type, and the Studio modules take `*.metadata-form.ts`, in card ②.** Today the suffix means a Studio metadata-form module: 17 files carry it, all under `packages/spec/src`, and `scripts/i18n-bundle-surface.mjs#isMetadataFormModulePath` classifies by it on the file's base name anywhere in the repository. Left as it is, an example's `lead.form.ts` would be read as a Studio module by the two readers of that predicate (the gate derivation in `scripts/pm/dispatch-gates.mjs` and the landing reading in `scripts/pm/landing-k.mjs`). So the 17 modules are renamed to `*.metadata-form.ts` — the name of their helper (`defineMetadataForm`) and of their translation family (`metadataForms`) — and `scripts/i18n-bundle-surface.mjs#METADATA_FORM_MODULE_SUFFIX` becomes `.metadata-form.ts`. + - **This follows question 1 by the seat's routing, not by the ruling's words.** Ruling record 7131569242 settles the factory name. It does not mention the suffix. The owning seat routed the suffix to follow the name by the same logic (the obvious spelling goes to the new type, the Studio one moves), in seat record [`7132202077`](https://github.com/objectstack-ai/objectstack/pull/36957#issuecomment-7132202077) on PR #36957. It is written here so the approver reads it as the seat's routing and can strike it; the alternative not taken is to keep the 17 file names and narrow the predicate to `packages/spec`. + - **Who reads the suffix, measured at `689e5695b98`** (card ② counts again at its own head): + - the one matcher, `scripts/i18n-bundle-surface.mjs` (the constant and the predicate), and the files that spell the suffix beside it: two cases in `scripts/pm/dispatch-gates.self-test.mjs`, the kind text in `scripts/pm/dispatch-gates.data.mjs`, a fixture path in `scripts/pm/landing-k.mjs`. `scripts/pm/dispatch-gates.mjs`, a Tier H file, imports the predicate and spells no suffix, so the rename does not edit it; + - import specifiers: 31 files under `packages/spec/src` import a module as `./NAME.form` — the seven domain barrels, `packages/spec/src/system/metadata-form-registry.ts` and 23 tests; + - generated outputs that print the module paths (`packages/spec/export-origins/`, seven files): regenerated, never edited by hand; + - path citations in hand-written ledgers, checklists and comments (`packages/spec/liveness/`, `docs/qa/platform-checklist/areas/`, comments under `packages/lint/src`, `packages/cli/src` and `ui/packages/app-shell/src/views/metadata-admin/`): re-pointed where they name a live file. Released text is not rewritten: a `CHANGELOG.md`, a released changeset, a migration entry of a past major; + - no loader or build step matches the suffix: the 17 modules are reached by import, through the barrels and the registry. - **Registry row**: `supportsOverlay: true`, `allowEnvironmentOverlay: false`, `allowRuntimeCreate: true`, `supportsVersioning: true`, `executionPinned: false`, `loadOrder: 50`, `domain: 'ui'` — `page`'s row. `allowEnvironmentOverlay` is `false` because a new type takes ADR-0005's default and ADR-0146 D11 retires that tier as a write door; a customization is a declared override ([D4](#d4)). ### D3 — The name space: `OBJECT.KEY`, the served name, unchanged {#d3} @@ -151,7 +159,7 @@ From the release that adds the type until the next protocol major: - **An authored `form` item shadows a projected one of the same name in the same package.** It never shadows a withdrawal ([D6](#d6)). - **`view` reads are unchanged** until the major: `GET /api/v1/meta/view` keeps listing `viewKind: 'form'` items, and `GET /api/v1/meta/view/:name` keeps answering a form's name. They are frozen: they serve the old shapes only and are not the picture of an environment's forms once a `form` item exists. Every platform reader moves to `form` — the anonymous doors in card ②, the console in card ③. - **Old-shape writes still save** until the major. A new `view` save that carries a form is stored as a `view` row and projected. -- **A `form` write acts on the form whichever type stores it.** A save, reset or delete of a `form` at `(package, name)` also removes the old-shape row that carries the same form at the same address, in the same transaction: an item-shaped `view` row is deleted, a stored container is re-saved without that form. One address holds one definition of a form; the Setup switch written before the re-point (a `view` override) is found and cleared by the re-pointed switch. +- **A `form` write acts on the form whichever type stores it.** A save, reset or delete of a `form` at `(package, name)` also removes the old-shape row that carries the same form at the same address, in the same transaction: an item-shaped `view` row is deleted, a stored container is re-saved without that form. One address holds one definition of a form; the Setup switch written before the re-point (a `view` override) is found and cleared by the re-pointed switch. ⛔ It removes form content only. A list item of type `view` that holds the same `OBJECT.KEY` name is another item of another type and is left untouched: the two types share one name grammar ([D3](#d3)), which makes this the one destructive edge of the rule, and card ② pins it (a `form` save, reset and delete at a name a list holds each leave the list row byte-equal). - **No conversion notice and no new warning for an old shape before the major.** The existing `form-view-internal-not-loaded` warning is the only advisory. Skills and docs teach the new shape from card ④. ### D6 — The anonymous doors and the withdrawal judgement read both types {#d6} @@ -163,7 +171,8 @@ This is the security-sensitive part. ADR-0138 D2 row 1 is unchanged: the admissi 3. **Candidates come from the effective `form` read** — authored items and projections ([D5](#d5)). 4. **The withdrawal layer is both types, every layer.** A candidate named `N` is served only when no body that carries `N` explicitly withdraws it, across: the effective list of `form`, the effective list of `view`, and the per-package layer of each. Old-shape bodies are passed through the projection first, so a container's `formViews` entry is judged under the name it is served as. 5. **Narrowing only, in both directions.** A `form` item cannot re-open a form an old-shape body withdraws, and an old-shape body cannot re-open a form a `form` item withdraws. The shadowing of [D5](#d5) selects which body is *served*; it never removes a body from the withdrawal layer. -6. **Matched by name, then by whole item or by slug.** For a `form` body the slot is the item, so an explicit withdrawal in a body named `N` closes `N`. The slug match is kept: a withdrawn form does not escape by pointing its link at a new slug. The known limit recorded in the module's header (a withdrawal of a name closes that name in every package) is kept, because it fails closed. +6. **Identity is the served name, and inside one name the whole item.** A body named `N` that explicitly withdraws a form closes `N`. For a `form` body the item is the slot, and after rule 4 an old-shape body is judged as the items it projects, one form each. The match does not ask the slug: a withdrawn form does not escape by pointing its link at a new slug, because the body of its name still withdraws it. A definition under **another name** is a different form and a withdrawal of the first name does not close it. That is today's rule, in the module's header: the doors "judge by the served item name", and "Another row that publishes or withdraws the same slug is a different form and closes nothing". This record does not widen identity to the slug across names. What keeps a second form off a switched-off form's address is [ruled question 3](#q3)'s refusal at the write door, where a switched-off form that keeps its link still holds it. The known limit recorded in the header (a withdrawal of a name closes that name in every package) is kept, because it fails closed. + - **The slug match of `anonymousFormIntakeWithdrawnIn` decides no case in this layer, and no pin is asked for it.** It decides exactly one case: two bodies of one name whose forms sit under different members, which only a container handed over as stored can be. Rule 4 leaves no such body in the doors' layer, and a container the projection cannot turn into items is closed whole by rule 7. The function keeps the match for its callers outside this layer, which may be handed a container body as stored (the major-18 ceremony in `packages/cli/src/utils/organization-ownership-apply.ts`, and Setup's judgement of an app's own document until card ③ re-points it); it leaves with the old shapes. 7. **A body that cannot be read closes what it names.** A stored `view` body that carries form content the projection cannot turn into items is not skipped: every public link it names is treated as withdrawn, and the boot says so once at `error`, naming the row and the ceremony of [D7](#d7). 8. **A switched-off form answers `404 FORM_NOT_FOUND`**, as a form that does not exist (ruling record 7100386248, F3 = A). The tenancy intake rule is unchanged and runs after the match. 9. **Write-time judgements cover `form`.** The tenancy intake advisory and the organization-scoped refusal of a save that would leave a withdrawn form open judge a `form` write as they judge a `view` write, over the same two-type layer. @@ -174,7 +183,7 @@ This is the security-sensitive part. ADR-0138 D2 row 1 is unchanged: the admissi - a form withdrawn by a `view` override in `.custom`, with an authored `form` item of the same name open: both doors answer `404` (ablate: the `view` half of the layer); - the mirror: withdrawn by a `form` override, open as an old-shape item in the base (ablate: the `form` half); - withdrawn in a container's `formViews` entry, open as a `form` item named for the expansion (ablate: the projection step of the layer); -- withdrawn by slug after the open definition moved to another name (ablate: the slug match); +- 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 — make it require an equal slug); - a per-package-layer withdrawal in either type (ablate: `getMetaItemsPerPackage` for that type); - an unreadable old-shape body closes its links (ablate: rule 7); - the submit door refuses where the resolve door does, on each case above. @@ -189,7 +198,8 @@ Each pin asserts the refusal's status and `code` and that no record was written, - One D2 conversion, `toMajor: 19`, on the stack: it moves each named form out of `views[]` into `forms[]` under the projection's name, lifts the binding to `object`, and leaves the lists where they are. A container left with no member is removed. It is lossless for every form it moves. - It is the first conversion that moves an item between two stack collections; its fixture pairs cover the three shapes, a container holding both lists and forms, and a form whose `data.object` disagrees with its container (left in place, with a structured TODO). -- **Internal record forms are not moved** (ruling item 3). The set is the one `form-view-internal-not-loaded` already defines — the container's default `form`, `formViews.default`, `formViews.create`, an item with `isDefault: true` or named `OBJECT.create` — when the form is not public and no `type: 'form'` action in the stack targets it. The conversion deletes those and says so per form; their layout belongs to the object's `fieldGroups` (HotCRM's own are objectstack-ai/hotcrm#2739's). A form of that set that is public or action-opened is moved like any other. +- **Internal record forms are not moved** (ruling item 3). An internal record form is a form in a record-form slot — the container's default `form`, `formViews.default`, `formViews.create`, an item with `isDefault: true` or named `OBJECT.create` — that declares **no `sharing.publicLink`** and that no `type: 'form'` action in the stack targets. The slots are the ones `form-view-internal-not-loaded` names. The test for "public" is [D1](#d1)'s and ⛔ not that rule's: the rule asks `sharing.enabled === true` (`isPublicForm` in `packages/lint/src/validate-internal-form-views.ts`), which is right for its warning and wrong here, because it reads a switched-off public form as internal. The conversion deletes the internal ones and says so per form; their layout belongs to the object's `fieldGroups` (HotCRM's own are objectstack-ai/hotcrm#2739's). +- **A form that declares a `sharing.publicLink` is never internal — switched on or off, in whatever slot.** It is moved with its `sharing` block as written, the switch included, by the conversion and by the ceremony alike. So is a form an action opens. The reason is the kill switch: a body that keeps its link with a switch set to `false` is an explicit withdrawal (`anonymousFormExplicitWithdrawals`), and it is what Setup's switch-off writes for a default-slot form too (the base's whole document with one key changed, `isDefault` included). Deleting such a body deletes the withdrawal. In a package's source the per-package layer would stop closing the form and an open override of the same name would be served; in a stored row the app's own open form would re-open. [Ruled question 4](#q4) forbids that direction, and ADR-0087 D2 admits only a lossless conversion. A form moved out of a record-form slot loses only its record-form role (`isDefault` is not a `form` key, [D2](#d2)), which no surface has read since #36425. - The translation tails move with them ([D8](#d8)), by a second conversion on `translations`. - A D3 chain entry for major 19 carries the semantic half; `os migrate meta --from 18` lists the edits and `--write` applies the ones it can prove. @@ -197,14 +207,26 @@ Each pin asserts the refusal's status and `code` and that no record was written, - A stored `view` item with `viewKind: 'form'` becomes a `form` row at the same `(package, name)`; a stored container is split — its lists stay a `view` row, each form becomes a `form` row. - A **`.custom` override** of a form keeps its package, its name and its `overrides` declaration, `basedOn` unchanged: it is the same override in the type its base now has. This covers every switch Setup has written. -- A **package-less overlay row** over a packaged form (ADR-0146 D11's unmigrated class) is moved to the destination D11 gives it — a declared `form` override in the base's pair — and where the pair cannot be ensured it stays a `view` row, still read by rule 4 and rule 7 of [D6](#d6). +- A **package-less overlay row** over a packaged form (ADR-0146 D11's unmigrated class) is moved to the destination D11 gives it: a declared `form` override in the base's pair, with its switch. +- **Where the pair cannot be ensured, the row is not moved, and it holds the upgrade to major 19 until it is.** The ceremony writes nothing for it. It stays a `view` row, still read by rule 4 and rule 7 of [D6](#d6), so a withdrawal it holds keeps closing. ⛔ It is not moved to a package-less `form` row: `form` takes no environment-overlay tier ([D2](#d2)), and the read path honours an unmigrated package-less row only for a type that has one (ADR-0146 D11). The ceremony's report and the upgrade precheck both name the row (type, name, base) and repeat the ensure door's own refusal (`packages/metadata-protocol/src/protocol-customization-package.ts#customizationPairEnsureRefusal`), with the administrator's action for its cause: + - **A cause the administrator can remove**: the App declares no usable namespace, a package installed under the pair's id is not the pair, the App's version is not SemVer, or another package owns the pair's namespace. The door's text names the fix. The administrator makes it and runs the ceremony with `--apply` again; the row moves to the pair with its switch. + - **A base that has no pair in this version**: a kernel package, until the kernel whitelist of ADR-0146 D3 admits it. Measured at `689e5695b98`, this case is empty: no package that ships metadata to a deployment authors a form in any of the three shapes (`git grep -lE "formViews|viewKind: 'form'|viewKind === 'form'" -- packages/platform-objects packages/plugins packages/services packages/triggers packages/drivers packages/connectors packages/apps` finds one `CHANGELOG.md` and no source), so no package-less row overlays a kernel package's form. Card ⑤ takes the reading again before it is cut. If a kernel package ships a named form by then, this record has no way out for the row without a new mechanism, and the case goes to the maintainer as a decision before major 19 opens. + - ⛔ In neither case does the precheck offer deletion for a row that declares a `sharing.publicLink`, and card ⑤ does not let such a row through: deleting a switched-off form's row is switching the form back on. - History rows stay verbatim under the type they were written as (ADR-0087: the version layer is not converted); the new row's history starts with the move. -- Internal record forms in stored rows are reported and left for the administrator to delete; the ceremony deletes nothing it did not move. -- The ceremony can be run from the release that adds the type. It **must** be run before a deployment moves to major 19: that release's upgrade refuses to proceed while a stored old-shape form row exists, naming the ceremony. +- Internal record forms in stored rows (the set defined above: no `sharing.publicLink`, no action target) are reported and left for the administrator to remove: an item-shaped row is deleted, a container that also holds lists is re-saved without that member. The ceremony deletes nothing it did not move. Removing one is safe: it steers nothing and, having no link, holds no switch. The precheck counts them like any other old-shape form row and names them with that action. +- The ceremony can be run from the release that adds the type. It **must** be run before a deployment moves to major 19: that release's upgrade refuses to proceed while a stored old-shape form row exists — one the ceremony can still move, an internal record form, or a row whose pair cannot be ensured — naming the ceremony, each row, and the action for its class. -**The withdrawal reader is exempt from the kit age-out** ([ruled question 4](#q4)). ADR-0087, as amended on 2026-10-26, lets a retired conversion and its tombstone leave the tree one major after they retire. The reader that finds a withdrawal in a stored old-shape body does not follow that clock: it stays as long as such a row can exist, and it is removed only by a release whose upgrade precheck has refused every deployment that still holds one. A withdrawal nobody reads would re-open a form, and that direction is never taken by a clean-up. +**Security pins card ⑤ owes, each with an ablation** (status, `code` and "no record was written" on both doors, as for [D6](#d6)'s): -**After the major**: `ViewSchema` is lists (`list`, `listViews`), `ViewKindSchema` is `list` alone, the projection serves no content, and `anonymousFormObjectName`'s list rung is gone. +- **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` — and the form is deleted or left behind with its withdrawal); +- **the ceremony keeps a withdrawal closed**: a form withdrawn before the ceremony — 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); +- **the precheck refuses**: a deployment that holds a stored old-shape form row of each class (movable, internal, pair not ensurable) does not reach major 19, and the refusal names the row and its action (ablate: the precheck's read of each class in turn); +- **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 (ablate: the exempt reader); +- **the row whose pair cannot be ensured** still closes its form before the upgrade and is never deleted or moved package-less by `--apply` (ablate: the pair-refusal branch of the ceremony). + +**The withdrawal reader is exempt from the kit age-out** ([ruled question 4](#q4)). ADR-0087, as amended on 2026-10-26, lets a retired conversion and its tombstone leave the tree one major after they retire. The reader that finds a withdrawal in a stored old-shape body does not follow that clock: it stays as long as such a row can exist, and it is removed only by a release whose upgrade precheck has refused every deployment that still holds one. A withdrawal nobody reads would re-open a form, and that direction is never taken by a clean-up. **This record's own choice, stricter than the ruling:** major 19's upgrade carries such a precheck, so the ruling's words would let the reader leave in major 19. This record keeps it through major 19 — card ⑤ does not remove it — and leaves its removal to a later release with its own precheck ([question 4](#q4) marks the same choice, outside the ruled block). + +**After the major**: `ViewSchema` is lists (`list`, `listViews`), `ViewKindSchema` is `list` alone, and `anonymousFormObjectName`'s list rung is gone. The projection serves no content: no `form` read and no `view` read gets an item from it. Its other half stays in the tree with the exempt reader ([D6](#d6) rule 10): the read that finds a withdrawal in a stored old-shape body, and rule 7's closing of a body it cannot read. ### D8 — Translations: a `forms` family, the old form tails as fallback {#d8} @@ -214,6 +236,7 @@ Each pin asserts the refusal's status and `code` and that no record was written, - `forms.NAME.sections.SECTION.label`, `.description`, and `.fields.FIELD.label` / `.placeholder` / `.helpText`. - **Section copy keeps its object-level default.** A section that has no key under `forms.NAME.sections` reads `objects.OBJECT._sections.SECTION`, as today. That is not a legacy fallback: field groups and forms of one object share section names on purpose, and `_sections` stays live for field groups. - **The form tails under `_views` are the fallback.** `objects.OBJECT._views.KEY.title` and `.submitBehavior.*` are read when `forms.NAME` has no value for the key, until major 19. `title` and `submitBehavior` are form-only tails, so the conversion that moves them needs no other signal. At the major the two tails are tombstoned on the `_views` shape with the prescription naming `forms.NAME`. +- **`label` and `description` under `_views.KEY` are not form tails, and are neither moved nor read as a fallback.** `ObjectTranslationDataSchema` declares the two keys for any view, a list included, and the extractor emits only `title` and `submitBehavior` for a form. A hand-written `objects.OBJECT._views.KEY.label` of a form therefore stays where it is: the conversion cannot tell it from a list's label by the key alone, and the two keys stay live for lists. `forms.NAME.label` and `.description` are authored under the new family. `os migrate meta` lists such a key as an edit for the author when `KEY` names a form the stack conversion moved, and card ④ re-keys the first-party ones. - The fallback is one declared read in the translator, not a reader-side `??`: it is the translation half of [D5](#d5)'s projection and retires with it. - The extractor and the translation lint emit and accept the new family from card ② and stop emitting the old tails for an authored `form` item. @@ -254,13 +277,13 @@ Five cards, in this order. ⛔ None lands before this record is accepted. The de | ① | This record (#36868) | `domain:spec`, contract tier | `none` | — | | ② | Spec and server: the `form` type, its registry and override rows, the `forms` collection and translation family, the projection, `form` reads and writes, the doors and the withdrawal judgement over both types | `domain:spec` with `domain:server` | `added` | ① | | ③ | Console: re-point Setup's page, land the designer as the `form` editor, re-point `FormPage`, retire the Studio Developer page (closes #36444) | `domain:ui` | `none` | ② | -| ④ | Sources and teaching: move this repository's examples and HotCRM's forms to `forms:`, their translation keys, the skills and docs | `domain:spec` (examples, skills, docs) and HotCRM's lane | `none` | ② | +| ④ | Sources and teaching: move this repository's examples and HotCRM's forms to `forms:`, their translation keys, the skills and docs | `domain:spec` (examples, skills, docs) and HotCRM's lane | `none` | ② and ③ | | ⑤ | Major 19: tombstone the three old shapes, the two conversions and the chain entry, the stored-row ceremony and the upgrade precheck, `view` reads lists only | `domain:spec` with `domain:server` | `narrowed` | ③ and ④ | - **② carries four of the five rulings as requirements** ([the questions](#the-five-merge-questions-as-ruled)): the `defineForm` factory with the Studio helper renamed `defineMetadataForm`, after measuring outside use of today's `defineForm` (question 1); the public-address clash refusal at the `form` write door, `os validate` and publish (question 3); the reader of old-shape withdrawals built as exempt from the kit age-out and anchored as such (question 4); the top-level document shape (question 5). Question 2 asks ② for no change: the name is the one served today. ⑤ carries question 4's other half, the upgrade precheck of major 19. -- **② is one releasable change.** It adds and removes nothing an author wrote: `view` reads, old-shape writes and the shipped console behave as before. It owes [D6](#d6)'s pins and ablations, the showcase's `examples/app-showcase/src/coverage.ts#KIND_COVERAGE` row (its coverage test holds exact registry membership), and the same-change override row of [D4](#d4). +- **② is one releasable change.** It adds and removes nothing an author wrote: `view` reads, old-shape writes and the shipped console behave as before. It owes [D6](#d6)'s pins and ablations, [D5](#d5)'s pin that a `form` write leaves a list row of the same name untouched, the showcase's `examples/app-showcase/src/coverage.ts#KIND_COVERAGE` row (its coverage test holds exact registry membership), and the same-change override row of [D4](#d4). The showcase's one authored `form` item is a new form, not a move of one the console opens today: moving one waits for ③, for the reason in the ④ bullet below. - **③ carries PR #36784's work.** #36444 stays paused until ③ is filed and then carries `Blocked-by:` ③. #36505 is closed (merged as `5c2d5cf2c4`); the public-forms part of its item 4 is superseded by this record and needs no card. -- **④ may run beside ③.** After ④ no first-party source authors an old shape, which is what lets ⑤ measure "zero first-party" before it tombstones. +- **④ runs after ③, not beside it.** [D5](#d5) freezes `view` reads to the old shapes, and until ③ lands the shipped console reads forms from `view`: `ui/apps/console/src/components/FormPage.tsx` reads `GET /api/v1/meta/view/:name`, and Setup's page lists type `view`. A first-party form moved to `forms:` before ③ would answer not found when its action opens it and would drop out of Setup's list, which takes its switch out of the administrator's reach. So ④ carries `Blocked-by:` ③ as well as ②, in both of its halves (HotCRM's waits for a release that carries both). After ④ no first-party source authors an old shape, which is what lets ⑤ measure "zero first-party" before it tombstones. - **⑤ is cut only when the maintainer opens major 19.** It is the one card with a breaking banner, an ADR-0087 disposition and a migration in its changeset. --- @@ -286,11 +309,19 @@ The ruling this record executes is silent on five points. This record decided ea | AI-author error | An AI that guesses `defineForm({ name, object, … })` is right. An old caller fails to compile and fails to parse: loud | The guess fails loudly (`schemaId` is required), then the AI must find the other name | No wrong name to guess; no compile-time help either | | Scope now | One rename across 18 files plus a declared export change | Smallest | Smallest | +**Correction to the table as put** (counted at `689e5695b98`; the table stays as the record of what the maintainer was shown). "One file under `ui/`" is a test that names the helper in a comment and does not call it. "One rename across 18 files" undercounts: 41 code files name `defineForm`, listed under "For the cards" below. The premise the ruling rests on does not move: all 41 are first-party uses, and use outside this repository is still card ②'s to measure first. + Recommendation, as put: **A**. The long-term name leads; its cost is a loud, one-time, compiler-carried break in a helper measured as platform-internal. **Ruled: A.** `defineForm` is the `form` type's factory. The existing Studio schema-bound metadata-form helper is renamed `defineMetadataForm`. Both land in card ②, as a declared compiler-carried export break. -- **For the cards.** Card ② owns the factory and the rename (the 17 `*.form.ts` modules under `packages/spec/src` and the one file under `ui/`), and its changeset declares the export change with the FROM and TO mapping. +- **For the cards.** Card ② owns the factory and the rename, and its changeset declares the export change with the FROM and TO mapping. Its scope is counted from the tree, not taken from the table above. At `689e5695b98`, `git grep -lw defineForm` names 60 files, 41 of them code (`.ts`, `.tsx`, `.mjs`): + - 17 `*.form.ts` modules under `packages/spec/src` that import and call it. They also take the new suffix ([D2](#d2)); + - 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); + - 4 tests: 3 under `packages/spec` that call it, and 1 under `packages/lint` that names it in a test title; + - 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`); + - the other 19 are not code: 6 generated outputs card ② regenerates (the `packages/spec` API-surface and export-origin snapshots, the generated reference page), 9 released or historical texts it does not edit (seven `CHANGELOG.md`, a released notes page, an audit), and 4 hand-written (two `packages/spec/liveness/` files, one internal skill under `.claude/`, which is a governed path, and this record). + - Card ② counts again at its own head and reports the count in its PR. - **The premise, measured before card ② lands.** The ruling rests on outside use of today's `defineForm` being platform-internal. Card ② measures it first. If outside use is found, card ② falls back to a new factory name and ⛔ never to a dual-meaning overload, and **that fallback returns to the maintainer for a word** before it is built: it is not the dev's or the seat's to take. Ruling-ref: [`7131569242`](https://github.com/objectstack-ai/objectstack/issues/36868#issuecomment-7131569242) — the maintainer, 2026-11-24, 「表单拆成独立 form 元数据类型的 5 个合并问题 都同意」 @@ -334,6 +365,7 @@ Recommendation, as put: **A**. It is a refusal on a new type, so it narrows noth **Ruled: A.** The `form` write door, `os validate` and publish refuse a form whose open slug another form already holds. It is a refusal on the new type only; nothing an author has today narrows. - **For the cards.** Card ② builds the refusal at all three places, naming both forms. Old-shape writes keep today's first-match behaviour until card ⑤ retires them; the designer's client-side check (card ③) stays as the early message and is no longer the only guard. +- **What "holds" means** (this record's reading, the fail-closed one; the ruling's words do not spell it). A form holds an address while its `sharing.publicLink` names it, switched on or off. A switched-off form that keeps its link still holds its address, so another form cannot be saved open on it; a form gives an address up by clearing or changing its link. The refusal is judged at every `form` save that leaves the form open, Setup's switch included, and it names both forms, so the way out is always in the message. Card ② pins the switched-off holder (a `form` saved open on the address of a switched-off form is refused; ablate: the switched-off half of the holder read). Ruling-ref: [`7131569242`](https://github.com/objectstack-ai/objectstack/issues/36868#issuecomment-7131569242) — the maintainer, 2026-11-24, 「表单拆成独立 form 元数据类型的 5 个合并问题 都同意」 @@ -355,12 +387,13 @@ Recommendation, as put: **A**. This is a permission boundary, so it is put to th **Ruled: A** — a permission boundary, ruled by the maintainer by name. The reader of old-shape withdrawals is **exempt from ADR-0087's kit age-out**. It leaves only by a release whose upgrade precheck refuses a deployment still holding an old-shape form row; protocol major 19's upgrade carries that precheck. No withdrawn public form may re-open. -- **For the cards.** Card ② builds the reader inside the two-type withdrawal layer ([D6](#d6)) and marks it exempt where it lives: this record's id in the code and an anchor in `scripts/adr-anchors/`, so a later kit clean-up finds the exemption before it finds the reader. Card ⑤ keeps the reader when it tombstones the old shapes, and carries major 19's upgrade precheck with its security pins ([D7](#d7)). -- **What the exemption does not license.** Removing the reader is neither card's work. It is a later release with its own precheck, and that removal is a new decision. +- **For the cards.** Card ② builds the reader inside the two-type withdrawal layer ([D6](#d6)) and marks it exempt where it lives: this record's id in the code and an anchor in `scripts/adr-anchors/`, so a later kit clean-up finds the exemption before it finds the reader. The anchor is this record's mechanism for the cards, not the ruling's words. Card ⑤ carries major 19's upgrade precheck with its security pins ([D7](#d7)). - **Scope of the exemption.** It is this one reader. ADR-0087's age-out stands as amended for every other retired conversion and tombstone, the rest of this record's kit included. Ruling-ref: [`7131569242`](https://github.com/objectstack-ai/objectstack/issues/36868#issuecomment-7131569242) — the maintainer, 2026-11-24, 「表单拆成独立 form 元数据类型的 5 个合并问题 都同意」 +**This record's own narrowing on question 4, not the ruling's words.** The ruling lets the reader leave "by a release whose upgrade precheck refuses a deployment still holding an old-shape form row", and major 19 is such a release: by the ruling alone, card ⑤ could remove the reader. This record does not take that leave ([D7](#d7)). Card ⑤ keeps the reader when it tombstones the old shapes, and removing it is neither card's work: it is a later release with its own precheck, and a new decision. The choice only narrows — the reader stays longer and nothing is licensed. It stands outside the ruled block so it is read as this record's, which the maintainer accepts with the record or strikes. + ### 5. The document shape: body at the top level, or under `config` {#q5} - **A — `name`, `object` and the body keys at the top level** (ruled, [D2](#d2)). @@ -389,8 +422,8 @@ Ruling-ref: [`7131569242`](https://github.com/objectstack-ai/objectstack/issues/ - **`view` gets simpler in major 19**: one kind, two container members. - **Until major 19 there are two readers of form content** (the type and the projection). The cost is bounded by the rule that the projection is the only reader of the old shapes. - **The anonymous doors read two types for at least one major.** [D6](#d6)'s pins are the price; a withdrawal is honoured in both. -- **A deployment must run a ceremony before major 19**, and that upgrade refuses without it. -- **`defineForm` changes meaning** in card ② ([ruled question 1](#q1)): a declared, compiler-carried export break, on the premise that its outside use is platform-internal. +- **A deployment must run a ceremony before major 19**, and that upgrade refuses without it. A stored row whose customization pair cannot be ensured holds the upgrade until the administrator removes the cause the precheck names ([D7](#d7)). +- **`defineForm` changes meaning** in card ② ([ruled question 1](#q1)): a declared, compiler-carried export break, on the premise that its outside use is platform-internal. The 17 Studio form modules change file suffix in the same card ([D2](#d2), the seat's routing). - **First-party work**: about 100 non-test source files and about 160 test files name the old shapes; they move in ②, ③ and ④ and the remainder falls to ⑤. ## Alternatives considered @@ -431,4 +464,5 @@ The card cites positions read at `14f4d8f8`. Each was read again. The numbers be - Card: [#36868](https://github.com/objectstack-ai/objectstack/issues/36868). Paused work: [#36444](https://github.com/objectstack-ai/objectstack/issues/36444), PR [#36784](https://github.com/objectstack-ai/objectstack/pull/36784). Merged: PR [#36697](https://github.com/objectstack-ai/objectstack/pull/36697), [#36505](https://github.com/objectstack-ai/objectstack/issues/36505), [#36425](https://github.com/objectstack-ai/objectstack/issues/36425). - Ruling records: `7123091354`, `7123091586`, `7122924165`, `7118881549`, `7100386248`; on #36868, `7131569242` (the five merge questions, all option A). +- Review records on PR #36957 at head `352579004f9`, both folded by one patch round: contract review [`7132189584`](https://github.com/objectstack-ai/objectstack/pull/36957#issuecomment-7132189584) and seat record [`7132202077`](https://github.com/objectstack-ai/objectstack/pull/36957#issuecomment-7132202077). - Touching cards named by #36868: #36797 and #36798 (Studio rail and docs on named default and create forms — re-read against [D1](#d1)), #36860 (the metadata list columns row, [D9](#d9)). From 9336492ee13651d99a77aebfadaa29d1d8b9f07d Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 24 Nov 2026 13:12:27 +0000 Subject: [PATCH 06/13] =?UTF-8?q?docs(adr):=20ADR-0159=20D7=20=E2=80=94=20?= =?UTF-8?q?the=20removable=20pair-refusal=20causes=20are=20examples,=20eac?= =?UTF-8?q?h=20fix=20named=20by=20the=20door?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Claude-Session: https://claude.ai/code/session_01QSeKYpEsWWE9Y5YtSsDgqZ Co-authored-by: Claude --- ...adata-type-public-forms-are-form-items-view-is-lists-only.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md b/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md index 5fa2fbacb73..309a1c2c553 100644 --- a/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md +++ b/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md @@ -209,7 +209,7 @@ Each pin asserts the refusal's status and `code` and that no record was written, - A **`.custom` override** of a form keeps its package, its name and its `overrides` declaration, `basedOn` unchanged: it is the same override in the type its base now has. This covers every switch Setup has written. - A **package-less overlay row** over a packaged form (ADR-0146 D11's unmigrated class) is moved to the destination D11 gives it: a declared `form` override in the base's pair, with its switch. - **Where the pair cannot be ensured, the row is not moved, and it holds the upgrade to major 19 until it is.** The ceremony writes nothing for it. It stays a `view` row, still read by rule 4 and rule 7 of [D6](#d6), so a withdrawal it holds keeps closing. ⛔ It is not moved to a package-less `form` row: `form` takes no environment-overlay tier ([D2](#d2)), and the read path honours an unmigrated package-less row only for a type that has one (ADR-0146 D11). The ceremony's report and the upgrade precheck both name the row (type, name, base) and repeat the ensure door's own refusal (`packages/metadata-protocol/src/protocol-customization-package.ts#customizationPairEnsureRefusal`), with the administrator's action for its cause: - - **A cause the administrator can remove**: the App declares no usable namespace, a package installed under the pair's id is not the pair, the App's version is not SemVer, or another package owns the pair's namespace. The door's text names the fix. The administrator makes it and runs the ceremony with `--apply` again; the row moves to the pair with its switch. + - **A cause the administrator can remove**: for example the App declares no usable namespace, a package installed under the pair's id is not the pair, the App's version is not SemVer, or another package owns the pair's namespace. The door's text names the fix for each. The administrator makes it and runs the ceremony with `--apply` again; the row moves to the pair with its switch. - **A base that has no pair in this version**: a kernel package, until the kernel whitelist of ADR-0146 D3 admits it. Measured at `689e5695b98`, this case is empty: no package that ships metadata to a deployment authors a form in any of the three shapes (`git grep -lE "formViews|viewKind: 'form'|viewKind === 'form'" -- packages/platform-objects packages/plugins packages/services packages/triggers packages/drivers packages/connectors packages/apps` finds one `CHANGELOG.md` and no source), so no package-less row overlays a kernel package's form. Card ⑤ takes the reading again before it is cut. If a kernel package ships a named form by then, this record has no way out for the row without a new mechanism, and the case goes to the maintainer as a decision before major 19 opens. - ⛔ In neither case does the precheck offer deletion for a row that declares a `sharing.publicLink`, and card ⑤ does not let such a row through: deleting a switched-off form's row is switching the form back on. - History rows stay verbatim under the type they were written as (ADR-0087: the version layer is not converted); the new row's history starts with the move. From 86c83a2dd35aee030689e2baf32963f077e63b27 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 24 Nov 2026 13:41:55 +0000 Subject: [PATCH 07/13] =?UTF-8?q?docs(adr):=20ADR-0159=20=E2=80=94=20a=20s?= =?UTF-8?q?tored=20row=20that=20closes=20an=20address=20by=20replacing=20i?= =?UTF-8?q?ts=20base=20is=20classed=20by=20its=20base?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Folds the delta contract review and the L1 record of head 9336492ee13 (S3 and the six nits). - D6 rule 11 and D5: a stored old-shape row keeps replacing its base's form when the base moves to form - D7-b: a row over a base form that declares a link is never internal, moves with its base, and is never offered for removal; the two D7 bullets no longer disagree - D7: the pair-refusal causes only the App's author can remove; two stored rows of one form fold narrowing only; the table of what keeps an address closed and the rule that carries it - D2: the full list of who spells the suffix; question 3's reading of holds moved outside the ruled block, with what it refuses today Claude-Session: https://claude.ai/code/session_01QSeKYpEsWWE9Y5YtSsDgqZ Co-authored-by: Claude --- ...forms-are-form-items-view-is-lists-only.md | 92 ++++++++++++++----- 1 file changed, 67 insertions(+), 25 deletions(-) diff --git a/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md b/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md index 309a1c2c553..4ff41f99d0a 100644 --- a/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md +++ b/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md @@ -24,13 +24,13 @@ 1. **`form` is a metadata type.** A `form` item is `name` + `object` + the form body. Its name is `OBJECT.KEY`, the name the form is served under today, so no served name changes ([D2](#d2), [D3](#d3)). 2. **It passes ADR-0088's admission test on three consumers that exist today**: the anonymous form doors, an action of `type: 'form'`, and Setup's public-forms list. A record create or edit form is not `form` content ([D1](#d1)). 3. **Adding the type is additive.** From the release that adds it until the next protocol major, the loader projects the three old shapes into `form` items, `view` reads are unchanged, and nothing an author wrote stops loading ([D5](#d5)). -4. **The anonymous doors and the withdrawal judgement read both types through one projection.** A form switched off in either type is closed in both; a stored body the projection cannot read closes the slugs it names ([D6](#d6)). -5. **The old shapes are tombstoned only in the next protocol major**, with an ADR-0087 conversion for sources and a ceremony for stored rows, `.custom` overrides included ([D7](#d7)). +4. **The anonymous doors and the withdrawal judgement read both types through one projection.** A form switched off in either type is closed in both; a stored row that closes an address by replacing its base's form keeps replacing it when the base moves to `form`; a stored body the projection cannot read closes the slugs it names ([D6](#d6)). +5. **The old shapes are tombstoned only in the next protocol major**, with an ADR-0087 conversion for sources and a ceremony for stored rows, `.custom` overrides included. A stored row that keeps a public address closed, by its switch or by replacing its base's form, is moved and is never deleted or offered for deletion ([D7](#d7)). 6. **`form` is overridable by declaration** in the paired `.custom`, like `page` ([D4](#d4)). 7. **Translations get a `forms` family**; the form tails under `objects.OBJECT._views` are read as a fallback until the major ([D8](#d8)). 8. **Shipped work is kept and re-pointed**: Setup's page reads `form`, the paused designer becomes the `form` editor, the Studio Developer page and the Form-tab switch retire ([D9](#d9)). 9. **Five cards, in order**; ②, ③ and ④ are additive, ⑤ is the major ([Execution plan](#execution-plan-after-acceptance)). -10. **Five points the first ruling is silent on were put to the maintainer and are ruled, all option A**: `defineForm` is the type's factory, the name stays `OBJECT.KEY`, a taken public address is refused, the reader of old withdrawals is exempt from the age-out, and the body is at the top level ([The five merge questions, as ruled](#the-five-merge-questions-as-ruled)). **Two points go past the ruling's words and are marked where they stand**: the `*.form.ts` file suffix follows the factory name by the owning seat's routing ([D2](#d2)), and this record keeps the withdrawal reader through major 19 although the ruling would let it leave there ([question 4](#q4)). +10. **Five points the first ruling is silent on were put to the maintainer and are ruled, all option A**: `defineForm` is the type's factory, the name stays `OBJECT.KEY`, a taken public address is refused, the reader of old withdrawals is exempt from the age-out, and the body is at the top level ([The five merge questions, as ruled](#the-five-merge-questions-as-ruled)). **Three points go past the ruling's words and are marked where they stand, each outside its ruled block**: the `*.form.ts` file suffix follows the factory name by the owning seat's routing ([D2](#d2)); a switched-off form that keeps its link still holds its address ([question 3](#q3)); and this record keeps the withdrawal reader through major 19 although the ruling would let it leave there ([question 4](#q4)). --- @@ -97,7 +97,7 @@ ADR-0088's three clauses, each on a fact measured above: **What is `form` content, and what is not.** A `form` item is a named form that something opens: a public form (it declares a `sharing.publicLink`), or a form an action of `type: 'form'` targets. A "custom create form" or a "wizard" is `form` content only when an action opens it. The object's record create and edit form is **not** a `form` item (ruling item 3): it is the object's `fieldGroups`, and the type has no `isDefault`, no `create` or `edit` role and no key that binds a form to a record page, a role or a position. A request for a per-role record form is a new decision, not a reading of this one. -**A `form` item with no consumer is reported, not refused.** `os validate` and the lint report an item that declares no `sharing.publicLink` and that no `type: 'form'` action in the stack targets, as a warning — the successor of `form-view-internal-not-loaded`, by the same matching rule (the target must equal the name the form is served under). It is a warning because a form is legitimately consumer-less for a moment while it is being built: the form is saved first and the action that opens it second. +**A `form` item with no consumer is reported, not refused.** `os validate` and the lint report an item that declares no `sharing.publicLink` and that no `type: 'form'` action in the stack targets, as a warning — the successor of `form-view-internal-not-loaded`, by the same matching rule (the target must equal the name the form is served under). It is a warning because a form is legitimately consumer-less for a moment while it is being built: the form is saved first and the action that opens it second. An item that declares `overrides` is judged with its base: it is not reported when the base's form of that name has a consumer. An override with no link over a linked form has a job, which is to keep that address closed ([D7](#d7)), and a warning that it steers nothing would invite its removal. ### D2 — The shape: `name`, `object`, and the form body at the top level {#d2} @@ -125,8 +125,16 @@ ADR-0088's three clauses, each on a fact measured above: - **The `*.form.ts` suffix goes to the new type, and the Studio modules take `*.metadata-form.ts`, in card ②.** Today the suffix means a Studio metadata-form module: 17 files carry it, all under `packages/spec/src`, and `scripts/i18n-bundle-surface.mjs#isMetadataFormModulePath` classifies by it on the file's base name anywhere in the repository. Left as it is, an example's `lead.form.ts` would be read as a Studio module by the two readers of that predicate (the gate derivation in `scripts/pm/dispatch-gates.mjs` and the landing reading in `scripts/pm/landing-k.mjs`). So the 17 modules are renamed to `*.metadata-form.ts` — the name of their helper (`defineMetadataForm`) and of their translation family (`metadataForms`) — and `scripts/i18n-bundle-surface.mjs#METADATA_FORM_MODULE_SUFFIX` becomes `.metadata-form.ts`. - **This follows question 1 by the seat's routing, not by the ruling's words.** Ruling record 7131569242 settles the factory name. It does not mention the suffix. The owning seat routed the suffix to follow the name by the same logic (the obvious spelling goes to the new type, the Studio one moves), in seat record [`7132202077`](https://github.com/objectstack-ai/objectstack/pull/36957#issuecomment-7132202077) on PR #36957. It is written here so the approver reads it as the seat's routing and can strike it; the alternative not taken is to keep the 17 file names and narrow the predicate to `packages/spec`. - **Who reads the suffix, measured at `689e5695b98`** (card ② counts again at its own head): - - the one matcher, `scripts/i18n-bundle-surface.mjs` (the constant and the predicate), and the files that spell the suffix beside it: two cases in `scripts/pm/dispatch-gates.self-test.mjs`, the kind text in `scripts/pm/dispatch-gates.data.mjs`, a fixture path in `scripts/pm/landing-k.mjs`. `scripts/pm/dispatch-gates.mjs`, a Tier H file, imports the predicate and spells no suffix, so the rename does not edit it; - - import specifiers: 31 files under `packages/spec/src` import a module as `./NAME.form` — the seven domain barrels, `packages/spec/src/system/metadata-form-registry.ts` and 23 tests; + - the one matcher, `scripts/i18n-bundle-surface.mjs` (the constant and the predicate), and the files that spell the suffix beside it: + - `scripts/pm/dispatch-gates.self-test.mjs`, on nine lines across several cases (lines 5641 to 5691, and 5881). One of them asserts the suffix on the live walk (`liveForms.every((f) => f.endsWith('.form.ts'))`, line 5662), so it fails as soon as the modules are renamed and is re-spelled with them; + - the kind text in `scripts/pm/dispatch-gates.data.mjs`, and a fixture path in `scripts/pm/landing-k.mjs`; + - the comments of `scripts/check-i18n-bundles.mjs` (lines 163 to 170), which name "the `*.form.ts` leaves" and "the `.form.ts` suffix" as the convention of the surface module; + - `scripts/pm/dispatch-gates.mjs`, a Tier H file, imports the predicate and spells no suffix, so the rename does not edit it. `scripts/ablation-dist-preflight.mjs` uses `skill.form.ts` as the name of a temporary fixture file and reads no suffix; + - import specifiers: 31 files under `packages/spec/src` import a `.form` module — the seven domain barrels, `packages/spec/src/system/metadata-form-registry.ts` and 23 tests. Thirty spell it `./NAME.form`. The thirty-first, `packages/spec/src/kernel/repeater-item-titles.test.ts`, imports 15 modules as `../DIR/NAME.form`, so a sweep by the `./NAME.form` spelling alone misses it; + - **text that teaches the suffix, re-worded and not re-pointed.** Once `*.form.ts` is the new type's suffix, a sentence that says "a `*.form.ts` module binds `data`" teaches the wrong root for an app's `lead.form.ts`. Card ② re-words each to name the Studio modules by their new suffix: + - emitted lint text: the `data` root explanation in `packages/lint/src/rule-explanations.ts` ("a `*.form.ts` module or a schema-bound form view"), and the `data` arm of the message in `packages/lint/src/validate-expressions.ts`, which spells it `*.form`; + - the docblock wording of `packages/lint/src/validate-visibility-predicates.ts` that `packages/lint/src/validate-visibility-predicates.test.ts` pins by string (two `toContain` assertions on "linting a `*.form.ts`"): the wording and the pins change together; + - one published page: the row "Metadata-editing forms (`*.form.ts`)" in `content/docs/protocol/objectui/layout-dsl.mdx`; - generated outputs that print the module paths (`packages/spec/export-origins/`, seven files): regenerated, never edited by hand; - path citations in hand-written ledgers, checklists and comments (`packages/spec/liveness/`, `docs/qa/platform-checklist/areas/`, comments under `packages/lint/src`, `packages/cli/src` and `ui/packages/app-shell/src/views/metadata-admin/`): re-pointed where they name a live file. Released text is not rewritten: a `CHANGELOG.md`, a released changeset, a migration entry of a past major; - no loader or build step matches the suffix: the 17 modules are reached by import, through the barrels and the registry. @@ -156,7 +164,8 @@ From the release that adds the type until the next protocol major: - **The projection.** One pure function in `packages/spec` — beside `expandViewContainer`, built on it — turns a `view` body into the `form` items it carries: the container's `form`, each `formViews` entry, and a `viewKind: 'form'` item's `config`. Each projected item takes the name it is served under today, `object` from the old four-rung resolution, and the body unchanged. It is the **only** reader of the old shapes for form content: the loader, the stored-row read, the anonymous doors, the withdrawal judgement and the lint all call it, and none re-reads `formViews` by hand. - **`form` reads serve authored items and projected ones.** A projected item is marked as such in its read envelope so a surface can say "defined in a view" and offer the move. -- **An authored `form` item shadows a projected one of the same name in the same package.** It never shadows a withdrawal ([D6](#d6)). +- **An authored `form` item shadows a projected one of the same name in the same package, inside one layer.** A package's source `form` item shadows the projection of that package's own source; a stored `form` row shadows the projection of a stored row at the same address. It never shadows a withdrawal ([D6](#d6)). ⛔ A package's source item never shadows the projection of a **stored** row: stored over source is the layering order whichever type each side is written in (next bullet). +- **A stored old-shape row keeps replacing its base's form when the base moves to `form`.** Today a stored `view` row that stands over a package's form replaces it whole: a declared override in the pair, a row bound to the package, a package-less row, or a stored container whose expansion writes the name. The merge that does it runs inside one type (`packages/metadata-protocol/src/protocol-overlay-merge.ts#mergePackageAwareOverlay`). A package may move its source to `forms:` while the stored row is still a `view` row, and card ④ does exactly that to first-party apps. So the effective `form` read resolves a package's form over both types, in the one served-row order (`packages/metadata-protocol/src/protocol-overlay-merge.ts#servedOverlayRowCandidates`): the stored `view` row that order picks at the package's address is served, as the `form` item it projects, over the package's source `form` item of that name — as it is served over the package's old-shape form today. A stored `form` row at the same place in the order wins over the stored `view` row, and the `form` write of the bullet below removes the latter. Where the stored `view` row carries no form at the name, and the package ships the name as a `form` item and no longer as a `view` item, the row was written over the form: nothing is served for that name from that package until [D7](#d7) gives the row its disposition. [D6](#d6) rule 11 says what this protects. - **`view` reads are unchanged** until the major: `GET /api/v1/meta/view` keeps listing `viewKind: 'form'` items, and `GET /api/v1/meta/view/:name` keeps answering a form's name. They are frozen: they serve the old shapes only and are not the picture of an environment's forms once a `form` item exists. Every platform reader moves to `form` — the anonymous doors in card ②, the console in card ③. - **Old-shape writes still save** until the major. A new `view` save that carries a form is stored as a `view` row and projected. - **A `form` write acts on the form whichever type stores it.** A save, reset or delete of a `form` at `(package, name)` also removes the old-shape row that carries the same form at the same address, in the same transaction: an item-shaped `view` row is deleted, a stored container is re-saved without that form. One address holds one definition of a form; the Setup switch written before the re-point (a `view` override) is found and cleared by the re-pointed switch. ⛔ It removes form content only. A list item of type `view` that holds the same `OBJECT.KEY` name is another item of another type and is left untouched: the two types share one name grammar ([D3](#d3)), which makes this the one destructive edge of the rule, and card ② pins it (a `form` save, reset and delete at a name a list holds each leave the list row byte-equal). @@ -177,6 +186,7 @@ This is the security-sensitive part. ADR-0138 D2 row 1 is unchanged: the admissi 8. **A switched-off form answers `404 FORM_NOT_FOUND`**, as a form that does not exist (ruling record 7100386248, F3 = A). The tenancy intake rule is unchanged and runs after the match. 9. **Write-time judgements cover `form`.** The tenancy intake advisory and the organization-scoped refusal of a save that would leave a withdrawn form open judge a `form` write as they judge a `view` write, over the same two-type layer. 10. **The reader of old-shape withdrawals outlives the old shapes.** See [D7](#d7) and [ruled question 4](#q4). +11. **Replacement is honoured across the two types.** Not every closed address is closed by a withdrawal. A stored row whose body carries no link — the link cleared, or the `sharing` block removed — over a base whose form declares an open one closes the address by replacing the base's body: an override's body replaces its slot, and the doors take candidates from the effective list only. `packages/rest/src/form-routes.ts` says it in words: "the base's form the override removed — is not offered". That is not an explicit withdrawal (`anonymousFormExplicitWithdrawals` counts a body only when it keeps a link), so rules 4 and 5 do not hold it. What holds it is [D5](#d5)'s resolution: the stored row stays the served body of its base's form in the effective `form` read, whichever type the base and the row are each written in. A package upgrade that moves the base's form to `forms:` opens nothing a stored row had closed, and neither does [D7](#d7)'s migration. **Pins card ② owes, each with an ablation** (remove the named read, watch the pin turn red, restore): @@ -186,6 +196,7 @@ This is the security-sensitive part. ADR-0138 D2 row 1 is unchanged: the admissi - 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 — make it require an equal slug); - a per-package-layer withdrawal in either type (ablate: `getMetaItemsPerPackage` for that type); - an unreadable old-shape body closes its links (ablate: rule 7); +- **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 [D5](#d5) — serve the package's source `form` item when the stored row is a `view` row); - the submit door refuses where the resolve door does, on each case above. Each pin asserts the refusal's status and `code` and that no record was written, not a bare status. @@ -197,36 +208,59 @@ Each pin asserts the refusal's status and `code` and that no record was written, **Sources — an ADR-0087 conversion and `os migrate meta`.** - One D2 conversion, `toMajor: 19`, on the stack: it moves each named form out of `views[]` into `forms[]` under the projection's name, lifts the binding to `object`, and leaves the lists where they are. A container left with no member is removed. It is lossless for every form it moves. -- It is the first conversion that moves an item between two stack collections; its fixture pairs cover the three shapes, a container holding both lists and forms, and a form whose `data.object` disagrees with its container (left in place, with a structured TODO). -- **Internal record forms are not moved** (ruling item 3). An internal record form is a form in a record-form slot — the container's default `form`, `formViews.default`, `formViews.create`, an item with `isDefault: true` or named `OBJECT.create` — that declares **no `sharing.publicLink`** and that no `type: 'form'` action in the stack targets. The slots are the ones `form-view-internal-not-loaded` names. The test for "public" is [D1](#d1)'s and ⛔ not that rule's: the rule asks `sharing.enabled === true` (`isPublicForm` in `packages/lint/src/validate-internal-form-views.ts`), which is right for its warning and wrong here, because it reads a switched-off public form as internal. The conversion deletes the internal ones and says so per form; their layout belongs to the object's `fieldGroups` (HotCRM's own are objectstack-ai/hotcrm#2739's). -- **A form that declares a `sharing.publicLink` is never internal — switched on or off, in whatever slot.** It is moved with its `sharing` block as written, the switch included, by the conversion and by the ceremony alike. So is a form an action opens. The reason is the kill switch: a body that keeps its link with a switch set to `false` is an explicit withdrawal (`anonymousFormExplicitWithdrawals`), and it is what Setup's switch-off writes for a default-slot form too (the base's whole document with one key changed, `isDefault` included). Deleting such a body deletes the withdrawal. In a package's source the per-package layer would stop closing the form and an open override of the same name would be served; in a stored row the app's own open form would re-open. [Ruled question 4](#q4) forbids that direction, and ADR-0087 D2 admits only a lossless conversion. A form moved out of a record-form slot loses only its record-form role (`isDefault` is not a `form` key, [D2](#d2)), which no surface has read since #36425. +- It is the first conversion that moves an item between two stack collections; its fixture pairs cover the three shapes, a container holding both lists and forms, an item that declares `overrides` with no link in a record-form slot (moved, D7-b), and a form whose `data.object` disagrees with its container (left in place, with a structured TODO). +- **Its output is judged by [question 3](#q3)'s refusal like any `form`.** One arrangement that is served today does not pass it: a retired form that keeps its link, switched off, beside its successor open on the same address under another name. Once both are `form` items the retired one still holds the address, so `os validate` and the successor's next save are refused, naming both. The conversion moves both forms as written and chooses neither; `os migrate meta` lists the pair as an edit for the author, and the way out is the one in the message: clear the retired form's link. The ceremony moves the stored twins the same way, as a move and not a save: what the doors serve does not change (the successor stays open, the retired form stays closed), its report names the pair, and the successor's next save is refused until the link is cleared. +- **Internal record forms are not moved** (ruling item 3). An internal record form is a form in a record-form slot — the container's default `form`, `formViews.default`, `formViews.create`, an item with `isDefault: true` or named `OBJECT.create` — that declares **no `sharing.publicLink`**, that no `type: 'form'` action in the stack targets, and that does **not stand over a base form that declares a link** (D7-b, two bullets down). The slots are the ones `form-view-internal-not-loaded` names. The test for "public" is [D1](#d1)'s and ⛔ not that rule's: the rule asks `sharing.enabled === true` (`isPublicForm` in `packages/lint/src/validate-internal-form-views.ts`), which is right for its warning and wrong here, because it reads a switched-off public form as internal. The conversion deletes the internal ones and says so per form; their layout belongs to the object's `fieldGroups` (HotCRM's own are objectstack-ai/hotcrm#2739's). +- **(D7-a) A form that declares a `sharing.publicLink` is never internal — switched on or off, in whatever slot.** It is moved with its `sharing` block as written, the switch included, by the conversion and by the ceremony alike. So is a form an action opens. The reason is the kill switch: a body that keeps its link with a switch set to `false` is an explicit withdrawal (`anonymousFormExplicitWithdrawals`), and it is what Setup's switch-off writes for a default-slot form too (the base's whole document with one key changed, `isDefault` included). Deleting such a body deletes the withdrawal. In a package's source the per-package layer would stop closing the form and an open override of the same name would be served; in a stored row the app's own open form would re-open. [Ruled question 4](#q4) forbids that direction, and ADR-0087 D2 admits only a lossless conversion. A form moved out of a record-form slot loses only its record-form role (`isDefault` is not a `form` key, [D2](#d2)), which no surface has read since #36425. +- **(D7-b) A form that stands over a base form is classed by its base, never by its own body alone.** A stored row, or an item of a `.custom` source, stands over a base when the read serves it in place of a package's own form of the same name: a declared override in the pair, a row bound to the base package, a package-less overlay row, a stored container whose expansion writes the name. Where the base's form declares a `sharing.publicLink`, that row is never internal, whatever its own body declares and whatever slot it sits in: no link, a link to another address, a link with a switch off. It **moves with its base**, as the override it is and with its body as written (a body with no link stays without one), by the conversion and by the ceremony alike. Nothing deletes it and nothing prescribes deleting it. The reason is rule 11 of [D6](#d6): such a row is what keeps the base's address closed today, although its own body holds no withdrawal. Deleting or resetting it serves the base's body again, and the public address answers. + - **The source conversion cannot read another package's source, so it does not ask the base**: a form held by an item or a container that carries an `overrides` declaration is moved to `forms[]` whatever its body and slot, with the declaration. Where the base turns out to ship no form of that name (its own conversion deleted an internal one), `os validate`, which sees both packages, reports the moved item as an override of a form its base does not ship, and only there is its removal offered. This does not make a record form `form` content (ruling item 3): the item is carried across because the conversion cannot see the base, and the wrong guess in the other direction opens a public address. + - **The ceremony and the precheck do read the base**: the package's own document in the deployment, in whichever type the package authors it. A row in a record-form slot, with no link and no action target, over a base whose form declares no link either is internal like its base. + - **A row that carries no form at a name its base ships as a linked form** (a list item saved over the name, say) has nothing to move. Whether a write door admits such a body today was not measured for this record; card ② measures it. Rule 11 keeps the address closed in dual-read either way. For the migration the row is in the class that holds the upgrade (D7-c): the ceremony writes nothing for it, and if card ② finds a door that admits one, its disposition goes to the maintainer before major 19 opens, with the kernel case below. - The translation tails move with them ([D8](#d8)), by a second conversion on `translations`. - A D3 chain entry for major 19 carries the semantic half; `os migrate meta --from 18` lists the edits and `--write` applies the ones it can prove. **Stored rows — a ceremony, because the stored pass cannot change a row's type.** `applyConversionsToStoredItem` reads back the collection of the row's own type, so the move from a `view` row to a `form` row is a migration of rows, in the shape ADR-0131 D10 and ADR-0146 D11 set: a CLI ceremony the administrator runs, read-only by default, `--apply` to write, idempotent, reporting per package what it moved and what it could not. - A stored `view` item with `viewKind: 'form'` becomes a `form` row at the same `(package, name)`; a stored container is split — its lists stay a `view` row, each form becomes a `form` row. -- A **`.custom` override** of a form keeps its package, its name and its `overrides` declaration, `basedOn` unchanged: it is the same override in the type its base now has. This covers every switch Setup has written. -- A **package-less overlay row** over a packaged form (ADR-0146 D11's unmigrated class) is moved to the destination D11 gives it: a declared `form` override in the base's pair, with its switch. -- **Where the pair cannot be ensured, the row is not moved, and it holds the upgrade to major 19 until it is.** The ceremony writes nothing for it. It stays a `view` row, still read by rule 4 and rule 7 of [D6](#d6), so a withdrawal it holds keeps closing. ⛔ It is not moved to a package-less `form` row: `form` takes no environment-overlay tier ([D2](#d2)), and the read path honours an unmigrated package-less row only for a type that has one (ADR-0146 D11). The ceremony's report and the upgrade precheck both name the row (type, name, base) and repeat the ensure door's own refusal (`packages/metadata-protocol/src/protocol-customization-package.ts#customizationPairEnsureRefusal`), with the administrator's action for its cause: - - **A cause the administrator can remove**: for example the App declares no usable namespace, a package installed under the pair's id is not the pair, the App's version is not SemVer, or another package owns the pair's namespace. The door's text names the fix for each. The administrator makes it and runs the ceremony with `--apply` again; the row moves to the pair with its switch. +- A **`.custom` override** of a form keeps its package, its name and its `overrides` declaration, `basedOn` unchanged: it is the same override in the type its base now has. This covers every switch Setup has written, and every override that differs from its base in any other way, a cleared link included: an override is never set aside as an internal record form on its own body (D7-b). +- A **package-less overlay row** over a packaged form (ADR-0146 D11's unmigrated class) is moved to the destination D11 gives it: a declared `form` override in the base's pair, with its body as written — its switch when it has one, and no link when it has none (D7-b). +- **(D7-d) Two stored rows of one form fold into one, and the fold only narrows.** A destination may already hold a row for the form: the pair's override beside a package-less row, or a writable package's own row beside a package-less row (the ensure door refuses a writable base with "customize it directly", so the package's own row is the destination there). The destination keeps its body: by the served-row order it is the body the read serves today. If the row folded into it explicitly withdraws the form, the destination keeps its link and takes that switch off. The per-package layer reads a package-less row under an open override of the pair today, so that withdrawal closes the form today and must keep closing it. The report names both rows and which one closed the form. For a writable base this may close a form that the package-less row does not close today (the package's own row is served ahead of it in both layers): that is the direction a layer may take, the report says so, and the administrator switches the form on again in Setup. +- **(D7-c) Where the pair cannot be ensured, the row is not moved, and it holds the upgrade to major 19 until it is.** The ceremony writes nothing for it. It stays a `view` row, still read by rules 4, 7 and 11 of [D6](#d6), so a withdrawal it holds keeps closing and a base form it replaces stays replaced. ⛔ It is not moved to a package-less `form` row: `form` takes no environment-overlay tier ([D2](#d2)), and the read path honours an unmigrated package-less row only for a type that has one (ADR-0146 D11). The ceremony's report and the upgrade precheck both name the row (type, name, base) and repeat the ensure door's own refusal (`packages/metadata-protocol/src/protocol-customization-package.ts#customizationPairEnsureRefusal`), with the administrator's action for its cause: + - **A cause the administrator can remove in the deployment**: a package installed under the pair's id is not the pair; another package owns the pair's namespace; the App that carries the base is not installed; a per-package pair an earlier version created holds the namespace (ADR-0146 D11's own ceremony re-identifies it, so that ceremony runs first). The door's text names the fix for each. The administrator makes it and runs the ceremony with `--apply` again; the row moves to the pair with its body as written. + - **A cause only the App's author can remove**: the App declares no namespace, or one too long or not valid for a pair namespace; the App's version is not SemVer; the base declares several Apps and its namespace picks none. An administrator who authors the App fixes it as above. One who does not cannot: the deployment stays on major 18 until the App ships a version without the cause, or is uninstalled, which takes the base's form and its address with it. The row keeps closing meanwhile, as the `view` row it is. The precheck names the App and the cause, says the fix is its author's, and offers no other action. - **A base that has no pair in this version**: a kernel package, until the kernel whitelist of ADR-0146 D3 admits it. Measured at `689e5695b98`, this case is empty: no package that ships metadata to a deployment authors a form in any of the three shapes (`git grep -lE "formViews|viewKind: 'form'|viewKind === 'form'" -- packages/platform-objects packages/plugins packages/services packages/triggers packages/drivers packages/connectors packages/apps` finds one `CHANGELOG.md` and no source), so no package-less row overlays a kernel package's form. Card ⑤ takes the reading again before it is cut. If a kernel package ships a named form by then, this record has no way out for the row without a new mechanism, and the case goes to the maintainer as a decision before major 19 opens. - - ⛔ In neither case does the precheck offer deletion for a row that declares a `sharing.publicLink`, and card ⑤ does not let such a row through: deleting a switched-off form's row is switching the form back on. + - **A body the projection cannot read** (rule 7 of [D6](#d6)) is in the same class: the ceremony cannot move it, it holds the upgrade, and it keeps closing every link it names. It leaves the class by an old-shape save that repairs the body, which saves until the major, and then the ceremony moves it. + - **(D7-e)** ⛔ In none of these cases does the precheck or the ceremony's report offer 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-b), and card ⑤ does not let such a row through. Deleting a switched-off form's row switches the form back on; deleting a link-less row over a linked base serves the base's form again. - History rows stay verbatim under the type they were written as (ADR-0087: the version layer is not converted); the new row's history starts with the move. -- Internal record forms in stored rows (the set defined above: no `sharing.publicLink`, no action target) are reported and left for the administrator to remove: an item-shaped row is deleted, a container that also holds lists is re-saved without that member. The ceremony deletes nothing it did not move. Removing one is safe: it steers nothing and, having no link, holds no switch. The precheck counts them like any other old-shape form row and names them with that action. -- The ceremony can be run from the release that adds the type. It **must** be run before a deployment moves to major 19: that release's upgrade refuses to proceed while a stored old-shape form row exists — one the ceremony can still move, an internal record form, or a row whose pair cannot be ensured — naming the ceremony, each row, and the action for its class. +- Internal record forms in stored rows are reported and left for the administrator to remove: an item-shaped row is deleted, a container that also holds lists is re-saved without that member. The set is the one defined above, all three parts: no `sharing.publicLink`, no action target, and not standing over a base form that declares a link. The ceremony deletes nothing it did not move. Removing a row of that set changes no door's answer: it steers nothing, it holds no switch because it has no link, and it replaces no linked body because its base has none. ⛔ That holds for this set only. A row with no link of its own that stands over a linked base is not in it (D7-b), and the report never lists one for removal. The precheck counts the internal ones like any other old-shape form row and names them with that action. +- The ceremony can be run from the release that adds the type. It **must** be run before a deployment moves to major 19: that release's upgrade refuses to proceed 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 (D7-c: its pair cannot be ensured, its body cannot be read, or it carries no form over a linked base) — naming the ceremony, each row, and the action for its class. + +**What keeps a public address closed today, and the rule that carries it.** The break was tried once more for this record across the four stages, for every way a stored row can be the thing that keeps an address closed. Each cell names the rule that holds; "D6-n" is rule n of [D6](#d6). + +| The stored row closes the address by | Dual-read (from card ②) | Source conversion | Ceremony | Precheck | After major 19 | +|:--|:--|:--|:--|:--|:--| +| **An explicit withdrawal**: link kept, a switch `false`, in an override, a package-bound row, a package-less row or a container member | D6-4 and D6-5: read in both types and every layer, whichever type the base is in | D7-a: moved with its switch | D7-a; beside another row of the form, D7-d; no pair, D7-c | D7-e: never offered for deletion | the `form` row carries the switch; a row that survived out of band is read by the exempt reader (D7-f) | +| **Setup's switch-off**: the same withdrawal, as a switch-only `.custom` override | as above; the re-pointed switch writes the `form` override in the transaction that clears the `view` one ([D5](#d5)) | D7-a | D7-a ("every switch Setup has written") | D7-e | as above | +| **Removing the link over a linked base**: the body has no `publicLink`, or no `sharing` | D6-11: the row stays the served body when the base moves to `forms:` | D7-b: an item that declares `overrides` is moved whatever its body | D7-b: moved as the override it is, without a link; no pair, D7-c | D7-e, and never listed as internal | the `form` override replaces the base's form whole ([D4](#d4)); a survivor keeps replacing (D7-f) | +| **Pointing the link at another address over a linked base**: the base's address closes, the new one opens | D6-11 for the base's address | D7-a | D7-a | D7-e | [D4](#d4); the new address is held under [question 3](#q3) | +| **Carrying no form at the name over a linked base** (not measured whether a door admits it) | D6-11 through [D5](#d5): nothing is served for the name from that package | not converted: the item is not a form | D7-c: holds the upgrade; a decision before major 19 | D7-e | a survivor keeps closing (D7-f) | +| **A body the projection cannot read** that names a link | D6-7 | refused by the schema before the conversion runs | D7-c: holds the upgrade | D7-e | D6-7's half of the kept reader (D7-f) | + +One path the table does not close, by design: an administrator who resets an override, or switches a form on, in Setup or through the `form` write door. That is the administrator's own act on the form, judged by the write-time rules of [D6](#d6) rule 9; no migration step performs it and none prescribes it. **Security pins card ⑤ owes, each with an ablation** (status, `code` and "no record was written" on both doors, as for [D6](#d6)'s): - **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` — and the form is deleted or left behind with its withdrawal); + - **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 — and the pin turns red: the report lists the row for removal, and removing it as the report says serves the base's form); - **the ceremony keeps a withdrawal closed**: a form withdrawn before the ceremony — 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); -- **the precheck refuses**: a deployment that holds a stored old-shape form row of each class (movable, internal, pair not ensurable) does not reach major 19, and the refusal names the row and its action (ablate: the precheck's read of each class in turn); -- **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 (ablate: the exempt reader); -- **the row whose pair cannot be ensured** still closes its form before the upgrade and is never deleted or moved package-less by `--apply` (ablate: the pair-refusal branch of the ceremony). +- **the fold only narrows** (D7-d): 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); +- **the precheck refuses**: a deployment that holds 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 it names is never a deletion or a reset (ablate: the precheck's read of each class in turn); +- **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, and a stored old-shape row with no link over a package's open form still keeps that address closed (ablate: the exempt reader, then its replacement half); +- **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 is never deleted or moved package-less by `--apply` (ablate: the pair-refusal branch of the ceremony). -**The withdrawal reader is exempt from the kit age-out** ([ruled question 4](#q4)). ADR-0087, as amended on 2026-10-26, lets a retired conversion and its tombstone leave the tree one major after they retire. The reader that finds a withdrawal in a stored old-shape body does not follow that clock: it stays as long as such a row can exist, and it is removed only by a release whose upgrade precheck has refused every deployment that still holds one. A withdrawal nobody reads would re-open a form, and that direction is never taken by a clean-up. **This record's own choice, stricter than the ruling:** major 19's upgrade carries such a precheck, so the ruling's words would let the reader leave in major 19. This record keeps it through major 19 — card ⑤ does not remove it — and leaves its removal to a later release with its own precheck ([question 4](#q4) marks the same choice, outside the ruled block). +**(D7-f) The withdrawal reader is exempt from the kit age-out** ([ruled question 4](#q4)). ADR-0087, as amended on 2026-10-26, lets a retired conversion and its tombstone leave the tree one major after they retire. The reader that finds a withdrawal in a stored old-shape body does not follow that clock: it stays as long as such a row can exist, and it is removed only by a release whose upgrade precheck has refused every deployment that still holds one. A withdrawal nobody reads would re-open a form, and that direction is never taken by a clean-up. **This record's own choice, stricter than the ruling:** major 19's upgrade carries such a precheck, so the ruling's words would let the reader leave in major 19. This record keeps it through major 19 — card ⑤ does not remove it — and leaves its removal to a later release with its own precheck ([question 4](#q4) marks the same choice, outside the ruled block). -**After the major**: `ViewSchema` is lists (`list`, `listViews`), `ViewKindSchema` is `list` alone, and `anonymousFormObjectName`'s list rung is gone. The projection serves no content: no `form` read and no `view` read gets an item from it. Its other half stays in the tree with the exempt reader ([D6](#d6) rule 10): the read that finds a withdrawal in a stored old-shape body, and rule 7's closing of a body it cannot read. +**After the major**: `ViewSchema` is lists (`list`, `listViews`), `ViewKindSchema` is `list` alone, and `anonymousFormObjectName`'s list rung is gone. The projection serves no content: no `form` read and no `view` read gets an item from it. Its other half stays in the tree with the exempt reader ([D6](#d6) rule 10): the read that finds a withdrawal in a stored old-shape body, and rule 7's closing of a body it cannot read. **This record keeps rule 11's closing with them, as its own choice beside the ruled exemption**: 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. No deployment that passed the precheck holds such a row; the half is there for a row that arrives out of band, and it only narrows. ### D8 — Translations: a `forms` family, the old form tails as fallback {#d8} @@ -281,7 +315,7 @@ Five cards, in this order. ⛔ None lands before this record is accepted. The de | ⑤ | Major 19: tombstone the three old shapes, the two conversions and the chain entry, the stored-row ceremony and the upgrade precheck, `view` reads lists only | `domain:spec` with `domain:server` | `narrowed` | ③ and ④ | - **② carries four of the five rulings as requirements** ([the questions](#the-five-merge-questions-as-ruled)): the `defineForm` factory with the Studio helper renamed `defineMetadataForm`, after measuring outside use of today's `defineForm` (question 1); the public-address clash refusal at the `form` write door, `os validate` and publish (question 3); the reader of old-shape withdrawals built as exempt from the kit age-out and anchored as such (question 4); the top-level document shape (question 5). Question 2 asks ② for no change: the name is the one served today. ⑤ carries question 4's other half, the upgrade precheck of major 19. -- **② is one releasable change.** It adds and removes nothing an author wrote: `view` reads, old-shape writes and the shipped console behave as before. It owes [D6](#d6)'s pins and ablations, [D5](#d5)'s pin that a `form` write leaves a list row of the same name untouched, the showcase's `examples/app-showcase/src/coverage.ts#KIND_COVERAGE` row (its coverage test holds exact registry membership), and the same-change override row of [D4](#d4). The showcase's one authored `form` item is a new form, not a move of one the console opens today: moving one waits for ③, for the reason in the ④ bullet below. +- **② is one releasable change.** It adds and removes nothing an author wrote: `view` reads, old-shape writes and the shipped console behave as before. It owes [D6](#d6)'s pins and ablations (rule 11's replacement pin among them), [D5](#d5)'s pin that a `form` write leaves a list row of the same name untouched, the measurement of whether a write door admits an override that carries no form at a form's name ([D7](#d7), D7-b), the showcase's `examples/app-showcase/src/coverage.ts#KIND_COVERAGE` row (its coverage test holds exact registry membership), and the same-change override row of [D4](#d4). The showcase's one authored `form` item is a new form, not a move of one the console opens today: moving one waits for ③, for the reason in the ④ bullet below. - **③ carries PR #36784's work.** #36444 stays paused until ③ is filed and then carries `Blocked-by:` ③. #36505 is closed (merged as `5c2d5cf2c4`); the public-forms part of its item 4 is superseded by this record and needs no card. - **④ runs after ③, not beside it.** [D5](#d5) freezes `view` reads to the old shapes, and until ③ lands the shipped console reads forms from `view`: `ui/apps/console/src/components/FormPage.tsx` reads `GET /api/v1/meta/view/:name`, and Setup's page lists type `view`. A first-party form moved to `forms:` before ③ would answer not found when its action opens it and would drop out of Setup's list, which takes its switch out of the administrator's reach. So ④ carries `Blocked-by:` ③ as well as ②, in both of its halves (HotCRM's waits for a release that carries both). After ④ no first-party source authors an old shape, which is what lets ⑤ measure "zero first-party" before it tombstones. - **⑤ is cut only when the maintainer opens major 19.** It is the one card with a breaking banner, an ADR-0087 disposition and a migration in its changeset. @@ -365,10 +399,15 @@ Recommendation, as put: **A**. It is a refusal on a new type, so it narrows noth **Ruled: A.** The `form` write door, `os validate` and publish refuse a form whose open slug another form already holds. It is a refusal on the new type only; nothing an author has today narrows. - **For the cards.** Card ② builds the refusal at all three places, naming both forms. Old-shape writes keep today's first-match behaviour until card ⑤ retires them; the designer's client-side check (card ③) stays as the early message and is no longer the only guard. -- **What "holds" means** (this record's reading, the fail-closed one; the ruling's words do not spell it). A form holds an address while its `sharing.publicLink` names it, switched on or off. A switched-off form that keeps its link still holds its address, so another form cannot be saved open on it; a form gives an address up by clearing or changing its link. The refusal is judged at every `form` save that leaves the form open, Setup's switch included, and it names both forms, so the way out is always in the message. Card ② pins the switched-off holder (a `form` saved open on the address of a switched-off form is refused; ablate: the switched-off half of the holder read). Ruling-ref: [`7131569242`](https://github.com/objectstack-ai/objectstack/issues/36868#issuecomment-7131569242) — the maintainer, 2026-11-24, 「表单拆成独立 form 元数据类型的 5 个合并问题 都同意」 +**This record's own reading of "holds" on question 3, not the ruling's words.** The ruling refuses a form "whose open slug another form already holds" and does not spell what holding is. This record reads it the fail-closed way. It stands outside the ruled block so it is read as this record's, which the maintainer accepts with the record or strikes. + +- A form holds an address while its `sharing.publicLink` names it, switched on or off. A switched-off form that keeps its link still holds its address, so another form cannot be saved open on it; a form gives an address up by clearing or changing its link. +- The refusal is judged at every `form` save that leaves the form open, Setup's switch included, over the effective `form` read, so a projected old-shape form that names the address holds it too. It names both forms, so the way out is always in the message. Card ② pins the switched-off holder (a `form` saved open on the address of a switched-off form is refused; ablate: the switched-off half of the holder read). +- **What it refuses that is served today.** A retired form that keeps its link, switched off, beside its successor open on the same address under another name is served today: another name is another form, and the doors serve the open one. The reading refuses that pair once the successor is a `form` item: its save and `os validate` are refused, the output of major 19's conversion included. Nothing closes or opens by it: the refusal is at the write door and at validation, and the doors keep serving what is stored. The way out is in the message — clear the retired form's link. [D7](#d7) says how the conversion and the ceremony treat the pair. + ### 4. The withdrawal reader is exempt from the retirement-kit age-out {#q4} ADR-0087 (amended 2026-10-26) removes a retired conversion one major after it retires. Applied here without exception, a stored old-shape body that withdraws a form would stop being read two majors on, and the form would re-open. @@ -422,7 +461,9 @@ Ruling-ref: [`7131569242`](https://github.com/objectstack-ai/objectstack/issues/ - **`view` gets simpler in major 19**: one kind, two container members. - **Until major 19 there are two readers of form content** (the type and the projection). The cost is bounded by the rule that the projection is the only reader of the old shapes. - **The anonymous doors read two types for at least one major.** [D6](#d6)'s pins are the price; a withdrawal is honoured in both. -- **A deployment must run a ceremony before major 19**, and that upgrade refuses without it. A stored row whose customization pair cannot be ensured holds the upgrade until the administrator removes the cause the precheck names ([D7](#d7)). +- **A deployment must run a ceremony before major 19**, and that upgrade refuses without it. A stored row whose customization pair cannot be ensured holds the upgrade until the cause the precheck names is removed. Where the cause is the App's own manifest and the administrator does not author the App, the deployment stays on major 18 until the App ships a fix or is uninstalled ([D7](#d7)). +- **A stored row that keeps a public address closed is never set aside as an internal record form**, whether it closes by a switch or by replacing its base's form. The migration moves it, and no report or precheck offers its removal ([D6](#d6) rule 11, [D7](#d7)). The price is one more read rule for the dual-read period, and a `.custom` source's overrides being moved by the conversion without a look at the base. +- **One arrangement served today is refused once it is in the new type**: a retired form that keeps its link beside its successor on the same address. The author clears the retired form's link ([question 3](#q3), this record's reading of "holds"). - **`defineForm` changes meaning** in card ② ([ruled question 1](#q1)): a declared, compiler-carried export break, on the premise that its outside use is platform-internal. The 17 Studio form modules change file suffix in the same card ([D2](#d2), the seat's routing). - **First-party work**: about 100 non-test source files and about 160 test files name the old shapes; they move in ②, ③ and ④ and the remainder falls to ⑤. @@ -465,4 +506,5 @@ The card cites positions read at `14f4d8f8`. Each was read again. The numbers be - Card: [#36868](https://github.com/objectstack-ai/objectstack/issues/36868). Paused work: [#36444](https://github.com/objectstack-ai/objectstack/issues/36444), PR [#36784](https://github.com/objectstack-ai/objectstack/pull/36784). Merged: PR [#36697](https://github.com/objectstack-ai/objectstack/pull/36697), [#36505](https://github.com/objectstack-ai/objectstack/issues/36505), [#36425](https://github.com/objectstack-ai/objectstack/issues/36425). - Ruling records: `7123091354`, `7123091586`, `7122924165`, `7118881549`, `7100386248`; on #36868, `7131569242` (the five merge questions, all option A). - Review records on PR #36957 at head `352579004f9`, both folded by one patch round: contract review [`7132189584`](https://github.com/objectstack-ai/objectstack/pull/36957#issuecomment-7132189584) and seat record [`7132202077`](https://github.com/objectstack-ai/objectstack/pull/36957#issuecomment-7132202077). +- Review records on PR #36957 at head `9336492ee13`, both folded by the next patch round: contract review [`7132974909`](https://github.com/objectstack-ai/objectstack/pull/36957#issuecomment-7132974909) (its S3 is [D6](#d6) rule 11 and D7-b) and seat record [`7132988092`](https://github.com/objectstack-ai/objectstack/pull/36957#issuecomment-7132988092). - Touching cards named by #36868: #36797 and #36798 (Studio rail and docs on named default and create forms — re-read against [D1](#d1)), #36860 (the metadata list columns row, [D9](#d9)). From be1c0cbd4daacc84a0575b47a5e3168fbfb614bc Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 24 Nov 2026 13:53:12 +0000 Subject: [PATCH 08/13] =?UTF-8?q?docs(adr):=20ADR-0159=20D7-d=20=E2=80=94?= =?UTF-8?q?=20say=20the=20two=20readings=20of=20today's=20layers=20were=20?= =?UTF-8?q?read=20from=20the=20code,=20not=20run?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Claude-Session: https://claude.ai/code/session_01QSeKYpEsWWE9Y5YtSsDgqZ Co-authored-by: Claude --- ...adata-type-public-forms-are-form-items-view-is-lists-only.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md b/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md index 4ff41f99d0a..ba7078f07e7 100644 --- a/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md +++ b/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md @@ -224,7 +224,7 @@ Each pin asserts the refusal's status and `code` and that no record was written, - A stored `view` item with `viewKind: 'form'` becomes a `form` row at the same `(package, name)`; a stored container is split — its lists stay a `view` row, each form becomes a `form` row. - A **`.custom` override** of a form keeps its package, its name and its `overrides` declaration, `basedOn` unchanged: it is the same override in the type its base now has. This covers every switch Setup has written, and every override that differs from its base in any other way, a cleared link included: an override is never set aside as an internal record form on its own body (D7-b). - A **package-less overlay row** over a packaged form (ADR-0146 D11's unmigrated class) is moved to the destination D11 gives it: a declared `form` override in the base's pair, with its body as written — its switch when it has one, and no link when it has none (D7-b). -- **(D7-d) Two stored rows of one form fold into one, and the fold only narrows.** A destination may already hold a row for the form: the pair's override beside a package-less row, or a writable package's own row beside a package-less row (the ensure door refuses a writable base with "customize it directly", so the package's own row is the destination there). The destination keeps its body: by the served-row order it is the body the read serves today. If the row folded into it explicitly withdraws the form, the destination keeps its link and takes that switch off. The per-package layer reads a package-less row under an open override of the pair today, so that withdrawal closes the form today and must keep closing it. The report names both rows and which one closed the form. For a writable base this may close a form that the package-less row does not close today (the package's own row is served ahead of it in both layers): that is the direction a layer may take, the report says so, and the administrator switches the form on again in Setup. +- **(D7-d) Two stored rows of one form fold into one, and the fold only narrows.** A destination may already hold a row for the form: the pair's override beside a package-less row, or a writable package's own row beside a package-less row (the ensure door refuses a writable base with "customize it directly", so the package's own row is the destination there). The destination keeps its body: by the served-row order it is the body the read serves today. If the row folded into it explicitly withdraws the form, the destination keeps its link and takes that switch off. The per-package layer reads a package-less row under an open override of the pair today, so that withdrawal closes the form today and must keep closing it. The report names both rows and which one closed the form. Both statements about today are read from the served-row order and the per-package layer's contract (`servedOverlayRowCandidates`, `getMetaItemsPerPackage`) and were not run for this record; card ⑤'s fold pin runs the first before the ceremony relies on it. For a writable base this may close a form that the package-less row does not close today (the package's own row is served ahead of it in both layers): that is the direction a layer may take, the report says so, and the administrator switches the form on again in Setup. - **(D7-c) Where the pair cannot be ensured, the row is not moved, and it holds the upgrade to major 19 until it is.** The ceremony writes nothing for it. It stays a `view` row, still read by rules 4, 7 and 11 of [D6](#d6), so a withdrawal it holds keeps closing and a base form it replaces stays replaced. ⛔ It is not moved to a package-less `form` row: `form` takes no environment-overlay tier ([D2](#d2)), and the read path honours an unmigrated package-less row only for a type that has one (ADR-0146 D11). The ceremony's report and the upgrade precheck both name the row (type, name, base) and repeat the ensure door's own refusal (`packages/metadata-protocol/src/protocol-customization-package.ts#customizationPairEnsureRefusal`), with the administrator's action for its cause: - **A cause the administrator can remove in the deployment**: a package installed under the pair's id is not the pair; another package owns the pair's namespace; the App that carries the base is not installed; a per-package pair an earlier version created holds the namespace (ADR-0146 D11's own ceremony re-identifies it, so that ceremony runs first). The door's text names the fix for each. The administrator makes it and runs the ceremony with `--apply` again; the row moves to the pair with its body as written. - **A cause only the App's author can remove**: the App declares no namespace, or one too long or not valid for a pair namespace; the App's version is not SemVer; the base declares several Apps and its namespace picks none. An administrator who authors the App fixes it as above. One who does not cannot: the deployment stays on major 18 until the App ships a version without the cause, or is uninstalled, which takes the base's form and its address with it. The row keeps closing meanwhile, as the `view` row it is. The precheck names the App and the cause, says the fix is its author's, and offers no other action. From c74ae94fe1ab5de6c18b79486bf58cf6eec4fa2d Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 24 Nov 2026 14:27:32 +0000 Subject: [PATCH 09/13] =?UTF-8?q?docs(adr):=20ADR-0159=20=E2=80=94=20the?= =?UTF-8?q?=20fold=20keeps=20the=20served=20body,=20five=20points=20past?= =?UTF-8?q?=20the=20ruling=20are=20named,=20the=20no-form=20reading=20is?= =?UTF-8?q?=20bounded?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Folds the delta contract review and the L1 record of head be1c0cbd4da (S4, S5, S1, S2 and the nits). - D7-d: a row bound to a read-only base has the pair as destination; several rows of one form fold into the body the served-row order serves today, narrowing only - D7-b: the source conversion of an item that declares overrides is marked as this record's reading past ruling item 3; os validate refuses the one whose base ships no form of that name; the alternative is named - D7, after the major: rule 11's replacement check keeps the withdrawal reader's lifetime, marked as past question 4's ruled scope, with the alternative - TL;DR 10 lists the five points past the ruling's words - D5 and D3: a stored view row that carries no form is read as written over a form only in three bindings a write door closes; the package-less close is kept across the two types until major 19 - pins for cards 2 and 5, Consequences, the third string pin in D2 Claude-Session: https://claude.ai/code/session_01QSeKYpEsWWE9Y5YtSsDgqZ Co-authored-by: Claude --- ...forms-are-form-items-view-is-lists-only.md | 69 +++++++++++++++---- 1 file changed, 55 insertions(+), 14 deletions(-) diff --git a/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md b/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md index ba7078f07e7..8d7207ee88d 100644 --- a/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md +++ b/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md @@ -30,7 +30,14 @@ 7. **Translations get a `forms` family**; the form tails under `objects.OBJECT._views` are read as a fallback until the major ([D8](#d8)). 8. **Shipped work is kept and re-pointed**: Setup's page reads `form`, the paused designer becomes the `form` editor, the Studio Developer page and the Form-tab switch retire ([D9](#d9)). 9. **Five cards, in order**; ②, ③ and ④ are additive, ⑤ is the major ([Execution plan](#execution-plan-after-acceptance)). -10. **Five points the first ruling is silent on were put to the maintainer and are ruled, all option A**: `defineForm` is the type's factory, the name stays `OBJECT.KEY`, a taken public address is refused, the reader of old withdrawals is exempt from the age-out, and the body is at the top level ([The five merge questions, as ruled](#the-five-merge-questions-as-ruled)). **Three points go past the ruling's words and are marked where they stand, each outside its ruled block**: the `*.form.ts` file suffix follows the factory name by the owning seat's routing ([D2](#d2)); a switched-off form that keeps its link still holds its address ([question 3](#q3)); and this record keeps the withdrawal reader through major 19 although the ruling would let it leave there ([question 4](#q4)). +10. **Five points the first ruling is silent on were put to the maintainer and are ruled, all option A**: `defineForm` is the type's factory, the name stays `OBJECT.KEY`, a taken public address is refused, the reader of old withdrawals is exempt from the age-out, and the body is at the top level ([The five merge questions, as ruled](#the-five-merge-questions-as-ruled)). **Five points go past the ruling's words. Each is marked where it stands, outside every ruled block, for the approver to accept with the record or strike**: + - the `*.form.ts` file suffix follows the factory name, by the owning seat's routing on question 1 ([D2](#d2)); + - a switched-off form that keeps its link still holds its address ([question 3](#q3), this record's reading of "holds"); + - this record keeps the withdrawal reader through major 19, although the ruling would let it leave there ([question 4](#q4)); + - the source conversion moves an item that declares `overrides` to `forms[]` whatever its body, which for a time puts a record form's override among the `form` items, past ruling item 3; `os validate` refuses the one whose base ships no form of that name ([D7](#d7), D7-b); + - rule 11's replacement check is kept after major 19 on the withdrawal reader's lifetime, past the "this one reader" that question 4 exempts ([D7](#d7), "After the major"; [question 4](#q4)). + + One more choice of this record touches no ruled word and is named here so it is read with them: the fold of two stored rows closes a form that is open today, where a row no layer reads withdraws it ([D7](#d7), D7-d). --- @@ -133,7 +140,7 @@ ADR-0088's three clauses, each on a fact measured above: - import specifiers: 31 files under `packages/spec/src` import a `.form` module — the seven domain barrels, `packages/spec/src/system/metadata-form-registry.ts` and 23 tests. Thirty spell it `./NAME.form`. The thirty-first, `packages/spec/src/kernel/repeater-item-titles.test.ts`, imports 15 modules as `../DIR/NAME.form`, so a sweep by the `./NAME.form` spelling alone misses it; - **text that teaches the suffix, re-worded and not re-pointed.** Once `*.form.ts` is the new type's suffix, a sentence that says "a `*.form.ts` module binds `data`" teaches the wrong root for an app's `lead.form.ts`. Card ② re-words each to name the Studio modules by their new suffix: - emitted lint text: the `data` root explanation in `packages/lint/src/rule-explanations.ts` ("a `*.form.ts` module or a schema-bound form view"), and the `data` arm of the message in `packages/lint/src/validate-expressions.ts`, which spells it `*.form`; - - the docblock wording of `packages/lint/src/validate-visibility-predicates.ts` that `packages/lint/src/validate-visibility-predicates.test.ts` pins by string (two `toContain` assertions on "linting a `*.form.ts`"): the wording and the pins change together; + - the docblock wording of `packages/lint/src/validate-visibility-predicates.ts` that `packages/lint/src/validate-visibility-predicates.test.ts` pins by string (two `toContain` assertions on "linting a `*.form.ts`"): the wording and the pins change together. A third string pin sits in the same test file, on the emitted text and not on the docblock: the tokens the explanation of the mislayered-root rule must print (the `MOVED` table, which lists `` `*.form.ts` `` for `VISIBILITY_ROOT_MISLAYERED`, line 1904 at `be1c0cbd4da`). It changes with the explanation in `rule-explanations.ts`, so the count of string pins starts at three; - one published page: the row "Metadata-editing forms (`*.form.ts`)" in `content/docs/protocol/objectui/layout-dsl.mdx`; - generated outputs that print the module paths (`packages/spec/export-origins/`, seven files): regenerated, never edited by hand; - path citations in hand-written ledgers, checklists and comments (`packages/spec/liveness/`, `docs/qa/platform-checklist/areas/`, comments under `packages/lint/src`, `packages/cli/src` and `ui/packages/app-shell/src/views/metadata-admin/`): re-pointed where they name a live file. Released text is not rewritten: a `CHANGELOG.md`, a released changeset, a migration entry of a past major; @@ -144,7 +151,7 @@ ADR-0088's three clauses, each on a fact measured above: - **Grammar.** A `form` name is the dot-required qualified name the view item uses today (`packages/spec/src/ui/view.zod.ts#ViewItemNameSchema`). The part before the last segment **must equal `object`**; a mismatch is refused at parse. The view item never enforced that equality; the new type does from its first release. - **Why this name.** It is the name every form is served under today — a stored item's own `name`, and for a container's form the name `expandViewContainer` gives it. An action's `target`, a `/forms/:name` link, a `.custom` override's key and the withdrawal judgement's identity are all this string. Keeping it means the migration renames nothing, and a withdrawal recorded against a name keeps closing that name ([D6](#d6)). Under ADR-0150 D1 it is an object-derived literal name, the bucket `view` is in; `form` takes the same bucket and no (package, name) resolution. -- **Separate from lists.** After the split a list `crm_lead.all` and a form `crm_lead.all` are items of two types and do not collide. Until the old shapes are tombstoned they still share the `view` type's name space wherever the old shapes are stored, and the container name-collision refusal keeps judging them there. +- **Separate from lists.** After the split a list `crm_lead.all` and a form `crm_lead.all` are items of two types and do not collide. Until the old shapes are tombstoned they still share the `view` type's name space wherever the old shapes are stored, and the container name-collision refusal keeps judging them there. For the same period one write stays closed that is closed today: a package-less list is not saved at a name a read-only package ships as a form ([D5](#d5)). A list in a package is another item beside the form from the first release. - **One form per name per package.** Inside a base's dependency closure ADR-0146 D2's rule applies unchanged: an undeclared same-name item of a dependent is refused at publish. - **The public address (slug) is a second identity**, declared in `sharing.publicLink`. Two different forms on one slug are not refused today. By [ruled question 3](#q3) the `form` write door, `os validate` and publish refuse it. @@ -165,7 +172,15 @@ From the release that adds the type until the next protocol major: - **The projection.** One pure function in `packages/spec` — beside `expandViewContainer`, built on it — turns a `view` body into the `form` items it carries: the container's `form`, each `formViews` entry, and a `viewKind: 'form'` item's `config`. Each projected item takes the name it is served under today, `object` from the old four-rung resolution, and the body unchanged. It is the **only** reader of the old shapes for form content: the loader, the stored-row read, the anonymous doors, the withdrawal judgement and the lint all call it, and none re-reads `formViews` by hand. - **`form` reads serve authored items and projected ones.** A projected item is marked as such in its read envelope so a surface can say "defined in a view" and offer the move. - **An authored `form` item shadows a projected one of the same name in the same package, inside one layer.** A package's source `form` item shadows the projection of that package's own source; a stored `form` row shadows the projection of a stored row at the same address. It never shadows a withdrawal ([D6](#d6)). ⛔ A package's source item never shadows the projection of a **stored** row: stored over source is the layering order whichever type each side is written in (next bullet). -- **A stored old-shape row keeps replacing its base's form when the base moves to `form`.** Today a stored `view` row that stands over a package's form replaces it whole: a declared override in the pair, a row bound to the package, a package-less row, or a stored container whose expansion writes the name. The merge that does it runs inside one type (`packages/metadata-protocol/src/protocol-overlay-merge.ts#mergePackageAwareOverlay`). A package may move its source to `forms:` while the stored row is still a `view` row, and card ④ does exactly that to first-party apps. So the effective `form` read resolves a package's form over both types, in the one served-row order (`packages/metadata-protocol/src/protocol-overlay-merge.ts#servedOverlayRowCandidates`): the stored `view` row that order picks at the package's address is served, as the `form` item it projects, over the package's source `form` item of that name — as it is served over the package's old-shape form today. A stored `form` row at the same place in the order wins over the stored `view` row, and the `form` write of the bullet below removes the latter. Where the stored `view` row carries no form at the name, and the package ships the name as a `form` item and no longer as a `view` item, the row was written over the form: nothing is served for that name from that package until [D7](#d7) gives the row its disposition. [D6](#d6) rule 11 says what this protects. +- **A stored old-shape row keeps replacing its base's form when the base moves to `form`.** Today a stored `view` row that stands over a package's form replaces it whole: a declared override in the pair, a row bound to the package, a package-less row, or a stored container whose expansion writes the name. The merge that does it runs inside one type (`packages/metadata-protocol/src/protocol-overlay-merge.ts#mergePackageAwareOverlay`). A package may move its source to `forms:` while the stored row is still a `view` row, and card ④ does exactly that to first-party apps. So the effective `form` read resolves a package's form over both types, in the one served-row order (`packages/metadata-protocol/src/protocol-overlay-merge.ts#servedOverlayRowCandidates`): the stored `view` row that order picks at the package's address is served, as the `form` item it projects, over the package's source `form` item of that name — as it is served over the package's old-shape form today. A stored `form` row at the same place in the order wins over the stored `view` row, and the `form` write of the bullet below removes the latter. A stored `view` row that carries no form at the name is the next bullet's. [D6](#d6) rule 11 says what this protects. +- **A stored `view` row that carries no form at a form's name is read as written over the form only where no write door could have put it there beside the form.** [D3](#d3) makes a list and a form of one name two items, so a list row closes nothing by sharing a form's name. Inside the one type it does today: a row at a package's address replaces whatever the package ships under the name. The `form` read keeps that answer — nothing is served for the name from that package until [D7](#d7) gives the row its disposition — for three bindings, each one closed by a write door, and for no other row: + - 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`, `packages/metadata-protocol/src/protocol-packaged-base-refusal.ts#judgeOverrideWrite`), so a `view` override was declared while the package shipped the name as a `view` item; + - a row **bound to a read-only package**. A save that names a read-only code package is refused today; the rows of this binding were stored before that door closed (the class `packages/metadata-protocol/src/protocol-packageless-overlay-migration.ts` carries as rows bound to a read-only base); + - a **package-less row**. ADR-0146 D11 closed the package-less write onto an item a read-only package ships (`packages/metadata-protocol/src/protocol-packaged-base-refusal.ts#packagelessOverlayWriteRefusal`, `403 NOT_OVERRIDABLE`). That close reads one type, so left alone it would open for the name when the package ships it as a `form` item and no longer as a `view` item. **Card ② keeps it closed across the two types until major 19**: a package-less `view` write at a name a read-only package ships as a `form` item is refused with the same status and `code`. The message names the form and the two saves that work: another key, or the list saved into a package (the base's pair as the pair's own item, with no `overrides`; or an app of the environment's own). + - **So a list saved at a form's name after the package moved the form is never read as written over it.** Saved into a package it is a list beside the form ([D3](#d3)): it is not in the package's served-row order, the form stays served, and the row is in no class that holds the upgrade ([D7](#d7)). Saved package-less it is refused, as it is refused today while the form is a `view` item. A row in a writable package is that package's own item and is never read as standing over that package's own form. + - **Known limit, fail-closed.** A package-less row that held the name before the package shipped anything under it cannot be told from one written over the form, and is read the same way. That is today's answer inside one type too: a package that ships an item under a name an environment row already holds is served that row. The cost is availability in that one deployment: the package's form is not served there, the form's layered read names the row that stands over it, and the row holds the upgrade (D7-c). + - **The reading and the refusal both end at major 19.** No deployment reaches it holding such a row ([D7](#d7)'s precheck), and from that release a `view` row is a list and nothing else. + - **Pins card ② owes for this bullet, each with an ablation.** (a) The bound: over a package that authors an open `form` item, a list saved package-less at the form's name is refused (status and `code`), the same list saved into the pair as its own item saves, and after both the two doors serve the package's form at its address (ablate: the bound — let the reading take any stored `view` row of the name — and the doors answer `404`). (b) 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 (ablate: fall through to the package's source `form` item when the stored row projects no form). If card ②'s measurement ([D7](#d7), D7-b) finds a door that admits a declared override carrying no form, pin (b) gains that row as a second fixture in the same change. - **`view` reads are unchanged** until the major: `GET /api/v1/meta/view` keeps listing `viewKind: 'form'` items, and `GET /api/v1/meta/view/:name` keeps answering a form's name. They are frozen: they serve the old shapes only and are not the picture of an environment's forms once a `form` item exists. Every platform reader moves to `form` — the anonymous doors in card ②, the console in card ③. - **Old-shape writes still save** until the major. A new `view` save that carries a form is stored as a `view` row and projected. - **A `form` write acts on the form whichever type stores it.** A save, reset or delete of a `form` at `(package, name)` also removes the old-shape row that carries the same form at the same address, in the same transaction: an item-shaped `view` row is deleted, a stored container is re-saved without that form. One address holds one definition of a form; the Setup switch written before the re-point (a `view` override) is found and cleared by the re-pointed switch. ⛔ It removes form content only. A list item of type `view` that holds the same `OBJECT.KEY` name is another item of another type and is left untouched: the two types share one name grammar ([D3](#d3)), which makes this the one destructive edge of the rule, and card ② pins it (a `form` save, reset and delete at a name a list holds each leave the list row byte-equal). @@ -213,9 +228,12 @@ Each pin asserts the refusal's status and `code` and that no record was written, - **Internal record forms are not moved** (ruling item 3). An internal record form is a form in a record-form slot — the container's default `form`, `formViews.default`, `formViews.create`, an item with `isDefault: true` or named `OBJECT.create` — that declares **no `sharing.publicLink`**, that no `type: 'form'` action in the stack targets, and that does **not stand over a base form that declares a link** (D7-b, two bullets down). The slots are the ones `form-view-internal-not-loaded` names. The test for "public" is [D1](#d1)'s and ⛔ not that rule's: the rule asks `sharing.enabled === true` (`isPublicForm` in `packages/lint/src/validate-internal-form-views.ts`), which is right for its warning and wrong here, because it reads a switched-off public form as internal. The conversion deletes the internal ones and says so per form; their layout belongs to the object's `fieldGroups` (HotCRM's own are objectstack-ai/hotcrm#2739's). - **(D7-a) A form that declares a `sharing.publicLink` is never internal — switched on or off, in whatever slot.** It is moved with its `sharing` block as written, the switch included, by the conversion and by the ceremony alike. So is a form an action opens. The reason is the kill switch: a body that keeps its link with a switch set to `false` is an explicit withdrawal (`anonymousFormExplicitWithdrawals`), and it is what Setup's switch-off writes for a default-slot form too (the base's whole document with one key changed, `isDefault` included). Deleting such a body deletes the withdrawal. In a package's source the per-package layer would stop closing the form and an open override of the same name would be served; in a stored row the app's own open form would re-open. [Ruled question 4](#q4) forbids that direction, and ADR-0087 D2 admits only a lossless conversion. A form moved out of a record-form slot loses only its record-form role (`isDefault` is not a `form` key, [D2](#d2)), which no surface has read since #36425. - **(D7-b) A form that stands over a base form is classed by its base, never by its own body alone.** A stored row, or an item of a `.custom` source, stands over a base when the read serves it in place of a package's own form of the same name: a declared override in the pair, a row bound to the base package, a package-less overlay row, a stored container whose expansion writes the name. Where the base's form declares a `sharing.publicLink`, that row is never internal, whatever its own body declares and whatever slot it sits in: no link, a link to another address, a link with a switch off. It **moves with its base**, as the override it is and with its body as written (a body with no link stays without one), by the conversion and by the ceremony alike. Nothing deletes it and nothing prescribes deleting it. The reason is rule 11 of [D6](#d6): such a row is what keeps the base's address closed today, although its own body holds no withdrawal. Deleting or resetting it serves the base's body again, and the public address answers. - - **The source conversion cannot read another package's source, so it does not ask the base**: a form held by an item or a container that carries an `overrides` declaration is moved to `forms[]` whatever its body and slot, with the declaration. Where the base turns out to ship no form of that name (its own conversion deleted an internal one), `os validate`, which sees both packages, reports the moved item as an override of a form its base does not ship, and only there is its removal offered. This does not make a record form `form` content (ruling item 3): the item is carried across because the conversion cannot see the base, and the wrong guess in the other direction opens a public address. + - **The source conversion cannot read another package's source, so it does not ask the base**: a form held by an item or a container that carries an `overrides` declaration is moved to `forms[]` whatever its body and slot, with the declaration. + - **This goes past ruling item 3's words. It is this record's own reading, which the maintainer accepts with the record or strikes** (TL;DR 10). Ruling item 3 says the record create and edit form "does not become a `form` item". Where the base's form of that name is an internal record form, the moved item is the override of one, and the conversion's output holds it in `forms[]`. This record reads item 3 as the rule on what `form` content is ([D1](#d1)), and that rule does not move: nothing renders the moved item on a record, because the type has no key that binds a form to a record page ([D2](#d2)). The item is carried across only because the conversion cannot see the base, and the wrong guess in the other direction opens a public address. + - **It does not stay: `os validate` refuses it.** `os validate` sees both packages. An item that declares an override of a form its base ships in neither type is an error and not a warning — the grade the override write gate gives today to a declaration of an item its base does not ship (`declared_package_ships_no_such_item`, `packages/metadata-protocol/src/protocol-packaged-base-refusal.ts#judgeOverrideWrite`). "Ships" is read over both types, through the projection, so an override of a base that still authors an old shape passes. The message names the base and the two ways out: remove the item (a record form's layout belongs to the object's `fieldGroups`), or correct the name. Only there is a removal offered, and only because the base ships no form of that name, so no address depends on the item. `os migrate meta` lists it as an edit for the author. It is a refusal so that a record form's override cannot stay among the `form` items for good. + - **The alternative not taken**: leave such an item where it is, in `views[]` with a structured TODO, as the `data.object` disagreement is left, and report it. Major 19 refuses the old shape, so an item left in place is out of the source until its author acts. Where the base's form is linked, the override that kept the address closed is then not shipped and the base's form is served — the item this record protects is the one the alternative drops. If the maintainer strikes the reading, this is the fallback, and it needs its own answer to that case before card ⑤ builds it. - **The ceremony and the precheck do read the base**: the package's own document in the deployment, in whichever type the package authors it. A row in a record-form slot, with no link and no action target, over a base whose form declares no link either is internal like its base. - - **A row that carries no form at a name its base ships as a linked form** (a list item saved over the name, say) has nothing to move. Whether a write door admits such a body today was not measured for this record; card ② measures it. Rule 11 keeps the address closed in dual-read either way. For the migration the row is in the class that holds the upgrade (D7-c): the ceremony writes nothing for it, and if card ② finds a door that admits one, its disposition goes to the maintainer before major 19 opens, with the kernel case below. + - **A row that carries no form at a name its base ships as a linked form** (a list item saved over the name, say) has nothing to move. [D5](#d5) bounds which rows are read this way: a declared override, a row bound to a read-only base, or a package-less row. ⛔ A list saved in a package beside the form is not one of them: it is a list ([D3](#d3)), it holds nothing, and neither the ceremony nor the precheck names it. Whether a write door admits a declared override whose body carries no form over a form was not measured for this record; card ② measures it. A package-less row of the class needs no such door: a list that held the name before the package shipped anything under it is one ([D5](#d5)'s known limit). Rule 11 keeps the address closed in dual-read either way. For the migration the row is in the class that holds the upgrade (D7-c): the ceremony writes nothing for it, and its disposition goes to the maintainer before major 19 opens, with the kernel case below. That decision is owed whatever card ② measures, because the package-less row can exist without the door; the measurement says only whether the declared one can. - The translation tails move with them ([D8](#d8)), by a second conversion on `translations`. - A D3 chain entry for major 19 carries the semantic half; `os migrate meta --from 18` lists the edits and `--write` applies the ones it can prove. @@ -224,7 +242,14 @@ Each pin asserts the refusal's status and `code` and that no record was written, - A stored `view` item with `viewKind: 'form'` becomes a `form` row at the same `(package, name)`; a stored container is split — its lists stay a `view` row, each form becomes a `form` row. - A **`.custom` override** of a form keeps its package, its name and its `overrides` declaration, `basedOn` unchanged: it is the same override in the type its base now has. This covers every switch Setup has written, and every override that differs from its base in any other way, a cleared link included: an override is never set aside as an internal record form on its own body (D7-b). - A **package-less overlay row** over a packaged form (ADR-0146 D11's unmigrated class) is moved to the destination D11 gives it: a declared `form` override in the base's pair, with its body as written — its switch when it has one, and no link when it has none (D7-b). -- **(D7-d) Two stored rows of one form fold into one, and the fold only narrows.** A destination may already hold a row for the form: the pair's override beside a package-less row, or a writable package's own row beside a package-less row (the ensure door refuses a writable base with "customize it directly", so the package's own row is the destination there). The destination keeps its body: by the served-row order it is the body the read serves today. If the row folded into it explicitly withdraws the form, the destination keeps its link and takes that switch off. The per-package layer reads a package-less row under an open override of the pair today, so that withdrawal closes the form today and must keep closing it. The report names both rows and which one closed the form. Both statements about today are read from the served-row order and the per-package layer's contract (`servedOverlayRowCandidates`, `getMetaItemsPerPackage`) and were not run for this record; card ⑤'s fold pin runs the first before the ceremony relies on it. For a writable base this may close a form that the package-less row does not close today (the package's own row is served ahead of it in both layers): that is the direction a layer may take, the report says so, and the administrator switches the form on again in Setup. +- A **row bound to a read-only base** — a customization saved under the base's own id before that door closed, the class ADR-0146 D11's ceremony carries beside the package-less one (`packages/metadata-protocol/src/protocol-packageless-overlay-migration.ts`) — has the same destination: a declared `form` override in the base's pair, with its body as written (D7-b). +- **(D7-d) Several stored rows of one form fold into one: the body kept is the one served today, and the fold only narrows.** More than one stored row of a form can head for one destination. Over a read-only base there are three, all bound for the pair's declared override: the pair's own override, a row bound to the base, and a package-less row. For a writable package there are two, bound for the package's own row: that row and a package-less row (the ensure door refuses a writable base with "customize it directly"). + - **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 whichever type it is stored in. It lands on the destination as written: a body with no link stays without one. ⛔ The ceremony never decides this by the order it moves rows in, and never by which row reached the destination first. + - **Every other row of the form is folded into it and carries over 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 — not its link, not a switch that is on — so a body the read does not serve today is never served by the ceremony. The report names every row of the form, the one whose body was kept, and which one closes the form. + - **Why the served order decides: a row bound to the base beside a package-less row.** The read serves the bound row today, in the effective list and in the base's per-package layer alike; the package-less row behind it is read by neither. Where the bound row has no link over a linked base, it closes the address by replacing the base's body (rule 11 of [D6](#d6)), and the package-less row may hold an open body. Both rows have the pair as destination, and the pair's override is first in the served-row order. Kept by the served order, the bound row's body is the pair's override and the address stays closed after `--apply`; the package-less body is folded and its open switch is not carried. + - **A folded row's withdrawal that a layer reads today must keep closing.** The base's per-package layer reads the first of the bound row and the package-less row, under an open override of the pair. A withdrawal there closes the form today, and the fold carries it. + - **A folded row's withdrawal that no layer reads today closes the form newly.** A package-less row behind a row bound to the base, or behind a writable package's own row, is read by no layer, so its withdrawal closes nothing today. The fold carries it all the same: the form is open before the ceremony and answers `404` after it. That is the direction a layer may take. The report names the form as newly closed, and the administrator switches it on again in Setup. + - Every statement about today in this bullet is read from the served-row order and the per-package layer's contract (`servedOverlayRowCandidates`, `getMetaItemsPerPackage`) and was not run for this record; card ⑤'s fold pin runs each "before" half before the ceremony relies on it. - **(D7-c) Where the pair cannot be ensured, the row is not moved, and it holds the upgrade to major 19 until it is.** The ceremony writes nothing for it. It stays a `view` row, still read by rules 4, 7 and 11 of [D6](#d6), so a withdrawal it holds keeps closing and a base form it replaces stays replaced. ⛔ It is not moved to a package-less `form` row: `form` takes no environment-overlay tier ([D2](#d2)), and the read path honours an unmigrated package-less row only for a type that has one (ADR-0146 D11). The ceremony's report and the upgrade precheck both name the row (type, name, base) and repeat the ensure door's own refusal (`packages/metadata-protocol/src/protocol-customization-package.ts#customizationPairEnsureRefusal`), with the administrator's action for its cause: - **A cause the administrator can remove in the deployment**: a package installed under the pair's id is not the pair; another package owns the pair's namespace; the App that carries the base is not installed; a per-package pair an earlier version created holds the namespace (ADR-0146 D11's own ceremony re-identifies it, so that ceremony runs first). The door's text names the fix for each. The administrator makes it and runs the ceremony with `--apply` again; the row moves to the pair with its body as written. - **A cause only the App's author can remove**: the App declares no namespace, or one too long or not valid for a pair namespace; the App's version is not SemVer; the base declares several Apps and its namespace picks none. An administrator who authors the App fixes it as above. One who does not cannot: the deployment stays on major 18 until the App ships a version without the cause, or is uninstalled, which takes the base's form and its address with it. The row keeps closing meanwhile, as the `view` row it is. The precheck names the App and the cause, says the fix is its author's, and offers no other action. @@ -241,9 +266,9 @@ Each pin asserts the refusal's status and `code` and that no record was written, |:--|:--|:--|:--|:--|:--| | **An explicit withdrawal**: link kept, a switch `false`, in an override, a package-bound row, a package-less row or a container member | D6-4 and D6-5: read in both types and every layer, whichever type the base is in | D7-a: moved with its switch | D7-a; beside another row of the form, D7-d; no pair, D7-c | D7-e: never offered for deletion | the `form` row carries the switch; a row that survived out of band is read by the exempt reader (D7-f) | | **Setup's switch-off**: the same withdrawal, as a switch-only `.custom` override | as above; the re-pointed switch writes the `form` override in the transaction that clears the `view` one ([D5](#d5)) | D7-a | D7-a ("every switch Setup has written") | D7-e | as above | -| **Removing the link over a linked base**: the body has no `publicLink`, or no `sharing` | D6-11: the row stays the served body when the base moves to `forms:` | D7-b: an item that declares `overrides` is moved whatever its body | D7-b: moved as the override it is, without a link; no pair, D7-c | D7-e, and never listed as internal | the `form` override replaces the base's form whole ([D4](#d4)); a survivor keeps replacing (D7-f) | +| **Removing the link over a linked base**: the body has no `publicLink`, or no `sharing` | D6-11: the row stays the served body when the base moves to `forms:` | D7-b: an item that declares `overrides` is moved whatever its body | D7-b: moved as the override it is, without a link; beside another row of the form, D7-d keeps the body served today; no pair, D7-c | D7-e, and never listed as internal | the `form` override replaces the base's form whole ([D4](#d4)); a survivor keeps replacing — rule 11's kept half, this record's own reading past question 4's scope and not the ruled exemption ("After the major", below) | | **Pointing the link at another address over a linked base**: the base's address closes, the new one opens | D6-11 for the base's address | D7-a | D7-a | D7-e | [D4](#d4); the new address is held under [question 3](#q3) | -| **Carrying no form at the name over a linked base** (not measured whether a door admits it) | D6-11 through [D5](#d5): nothing is served for the name from that package | not converted: the item is not a form | D7-c: holds the upgrade; a decision before major 19 | D7-e | a survivor keeps closing (D7-f) | +| **Carrying no form at the name over a linked base**, in one of the three bindings [D5](#d5) bounds (a declared one: not measured whether a door admits it; a package-less one can predate the package's form) | D6-11 through [D5](#d5)'s bounded reading: nothing is served for the name from that package. A list saved in a package beside the form is not in this row | not converted: the item is not a form | D7-c: holds the upgrade; a decision before major 19 | D7-e | none: no deployment passes the precheck holding one, and from the major a `view` row is a list ([D3](#d3)); the reading ends there | | **A body the projection cannot read** that names a link | D6-7 | refused by the schema before the conversion runs | D7-c: holds the upgrade | D7-e | D6-7's half of the kept reader (D7-f) | One path the table does not close, by design: an administrator who resets an override, or switches a form on, in Setup or through the `form` write door. That is the administrator's own act on the form, judged by the write-time rules of [D6](#d6) rule 9; no migration step performs it and none prescribes it. @@ -253,14 +278,25 @@ One path the table does not close, by design: an administrator who resets an ove - **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` — and the form is deleted or left behind with its withdrawal); - **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 — and the pin turns red: the report lists the row for removal, and removing it as the report says serves the base's form); - **the ceremony keeps a withdrawal closed**: a form withdrawn before the ceremony — 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); -- **the fold only narrows** (D7-d): 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); -- **the precheck refuses**: a deployment that holds 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 it names is never a deletion or a reset (ablate: the precheck's read of each class in turn); +- **the fold keeps the served body and only narrows** (D7-d), three fixtures: + - 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); + - **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 — and the address answers); + - **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); + - each "before" half proves one of this record's readings of today's layers. If one is not as stated here, the card stops and reports; +- **the precheck refuses**: a deployment that holds a stored old-shape form row of each class (movable, internal, pair not ensurable, body not readable), or a stored row of the fifth class — one that carries no form over a linked base, in a binding [D5](#d5) bounds — 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 it names 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 by the precheck and does not hold the upgrade (ablate: [D5](#d5)'s bound); - **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, and a stored old-shape row with no link over a package's open form still keeps that address closed (ablate: the exempt reader, then its replacement half); - **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 is never deleted or moved package-less by `--apply` (ablate: the pair-refusal branch of the ceremony). **(D7-f) The withdrawal reader is exempt from the kit age-out** ([ruled question 4](#q4)). ADR-0087, as amended on 2026-10-26, lets a retired conversion and its tombstone leave the tree one major after they retire. The reader that finds a withdrawal in a stored old-shape body does not follow that clock: it stays as long as such a row can exist, and it is removed only by a release whose upgrade precheck has refused every deployment that still holds one. A withdrawal nobody reads would re-open a form, and that direction is never taken by a clean-up. **This record's own choice, stricter than the ruling:** major 19's upgrade carries such a precheck, so the ruling's words would let the reader leave in major 19. This record keeps it through major 19 — card ⑤ does not remove it — and leaves its removal to a later release with its own precheck ([question 4](#q4) marks the same choice, outside the ruled block). -**After the major**: `ViewSchema` is lists (`list`, `listViews`), `ViewKindSchema` is `list` alone, and `anonymousFormObjectName`'s list rung is gone. The projection serves no content: no `form` read and no `view` read gets an item from it. Its other half stays in the tree with the exempt reader ([D6](#d6) rule 10): the read that finds a withdrawal in a stored old-shape body, and rule 7's closing of a body it cannot read. **This record keeps rule 11's closing with them, as its own choice beside the ruled exemption**: 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. No deployment that passed the precheck holds such a row; the half is there for a row that arrives out of band, and it only narrows. +**After the major**: `ViewSchema` is lists (`list`, `listViews`), `ViewKindSchema` is `list` alone, and `anonymousFormObjectName`'s list rung is gone. The projection serves no content: no `form` read and no `view` read gets an item from it. Its other half stays in the tree with the exempt reader ([D6](#d6) rule 10): the read that finds a withdrawal in a stored old-shape body, and rule 7's closing of a body it cannot read. + +**This record's own reading, past the scope question 4 rules: rule 11's replacement check keeps the withdrawal reader's lifetime.** [Question 4](#q4) exempts "this one reader", the reader of old-shape withdrawals, and lets ADR-0087's age-out stand for the rest of this record's kit. Rule 11's closing is not a withdrawal reader ([D6](#d6) rule 11 says so), so by the ruled scope it is kit and ages out one major after the old shapes retire. This record does not put it on that clock. It keeps the check after the major and gives it the reader's lifetime: it leaves in the release that removes the reader, by the same precheck, and not before. 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. No deployment that passed the precheck holds such a row; the check is there for a row that arrives out of band, and it only narrows. + +- **Why**: an address closed by replacement is as closed to its administrator as one closed by a switch, and a clean-up schedule would open the first while the ruling keeps the second closed. +- **What it goes past**: it widens, by one read, a scope the maintainer ruled by name. It is listed in TL;DR 10 and beside question 4 for the approver to accept or strike. +- **The alternative not taken** is the ruled scope as written: the check is registered as kit on ADR-0087's clock and leaves one major after major 19; from then an old-shape row that arrives out of band over a package's form is not read, and the package's form is served. If the reading is struck, card ⑤ builds that, and the table above cites ADR-0087's clock where it cites this paragraph. +- **It does not cover the row that carries no form.** After the major a `view` row is a list ([D3](#d3)), and [D5](#d5)'s bounded reading has ended. ### D8 — Translations: a `forms` family, the old form tails as fallback {#d8} @@ -315,7 +351,7 @@ Five cards, in this order. ⛔ None lands before this record is accepted. The de | ⑤ | Major 19: tombstone the three old shapes, the two conversions and the chain entry, the stored-row ceremony and the upgrade precheck, `view` reads lists only | `domain:spec` with `domain:server` | `narrowed` | ③ and ④ | - **② carries four of the five rulings as requirements** ([the questions](#the-five-merge-questions-as-ruled)): the `defineForm` factory with the Studio helper renamed `defineMetadataForm`, after measuring outside use of today's `defineForm` (question 1); the public-address clash refusal at the `form` write door, `os validate` and publish (question 3); the reader of old-shape withdrawals built as exempt from the kit age-out and anchored as such (question 4); the top-level document shape (question 5). Question 2 asks ② for no change: the name is the one served today. ⑤ carries question 4's other half, the upgrade precheck of major 19. -- **② is one releasable change.** It adds and removes nothing an author wrote: `view` reads, old-shape writes and the shipped console behave as before. It owes [D6](#d6)'s pins and ablations (rule 11's replacement pin among them), [D5](#d5)'s pin that a `form` write leaves a list row of the same name untouched, the measurement of whether a write door admits an override that carries no form at a form's name ([D7](#d7), D7-b), the showcase's `examples/app-showcase/src/coverage.ts#KIND_COVERAGE` row (its coverage test holds exact registry membership), and the same-change override row of [D4](#d4). The showcase's one authored `form` item is a new form, not a move of one the console opens today: moving one waits for ③, for the reason in the ④ bullet below. +- **② is one releasable change.** It adds and removes nothing an author wrote: `view` reads, old-shape writes and the shipped console behave as before. It owes [D6](#d6)'s pins and ablations (rule 11's replacement pin among them), [D5](#d5)'s pin that a `form` write leaves a list row of the same name untouched, the measurement of whether a write door admits a declared override that carries no form at a form's name ([D7](#d7), D7-b), the package-less close kept across the two types with [D5](#d5)'s two pins for the row that carries no form (the bound, and the closed reading), the showcase's `examples/app-showcase/src/coverage.ts#KIND_COVERAGE` row (its coverage test holds exact registry membership), and the same-change override row of [D4](#d4). The showcase's one authored `form` item is a new form, not a move of one the console opens today: moving one waits for ③, for the reason in the ④ bullet below. - **③ carries PR #36784's work.** #36444 stays paused until ③ is filed and then carries `Blocked-by:` ③. #36505 is closed (merged as `5c2d5cf2c4`); the public-forms part of its item 4 is superseded by this record and needs no card. - **④ runs after ③, not beside it.** [D5](#d5) freezes `view` reads to the old shapes, and until ③ lands the shipped console reads forms from `view`: `ui/apps/console/src/components/FormPage.tsx` reads `GET /api/v1/meta/view/:name`, and Setup's page lists type `view`. A first-party form moved to `forms:` before ③ would answer not found when its action opens it and would drop out of Setup's list, which takes its switch out of the administrator's reach. So ④ carries `Blocked-by:` ③ as well as ②, in both of its halves (HotCRM's waits for a release that carries both). After ④ no first-party source authors an old shape, which is what lets ⑤ measure "zero first-party" before it tombstones. - **⑤ is cut only when the maintainer opens major 19.** It is the one card with a breaking banner, an ADR-0087 disposition and a migration in its changeset. @@ -433,6 +469,8 @@ Ruling-ref: [`7131569242`](https://github.com/objectstack-ai/objectstack/issues/ **This record's own narrowing on question 4, not the ruling's words.** The ruling lets the reader leave "by a release whose upgrade precheck refuses a deployment still holding an old-shape form row", and major 19 is such a release: by the ruling alone, card ⑤ could remove the reader. This record does not take that leave ([D7](#d7)). Card ⑤ keeps the reader when it tombstones the old shapes, and removing it is neither card's work: it is a later release with its own precheck, and a new decision. The choice only narrows — the reader stays longer and nothing is licensed. It stands outside the ruled block so it is read as this record's, which the maintainer accepts with the record or strikes. +**A second point of this record on question 4, also not the ruling's words.** "Scope of the exemption" above is ruled: it is this one reader. [D7](#d7) ("After the major") keeps one more read on the same lifetime: rule 11's replacement check, which is not a withdrawal reader. That goes past the ruled scope. [D7](#d7) gives the reason and the alternative not taken (the check ages out on ADR-0087's clock, one major after major 19). It stands outside the ruled block for the same reason as the paragraph above. + ### 5. The document shape: body at the top level, or under `config` {#q5} - **A — `name`, `object` and the body keys at the top level** (ruled, [D2](#d2)). @@ -462,7 +500,9 @@ Ruling-ref: [`7131569242`](https://github.com/objectstack-ai/objectstack/issues/ - **Until major 19 there are two readers of form content** (the type and the projection). The cost is bounded by the rule that the projection is the only reader of the old shapes. - **The anonymous doors read two types for at least one major.** [D6](#d6)'s pins are the price; a withdrawal is honoured in both. - **A deployment must run a ceremony before major 19**, and that upgrade refuses without it. A stored row whose customization pair cannot be ensured holds the upgrade until the cause the precheck names is removed. Where the cause is the App's own manifest and the administrator does not author the App, the deployment stays on major 18 until the App ships a fix or is uninstalled ([D7](#d7)). -- **A stored row that keeps a public address closed is never set aside as an internal record form**, whether it closes by a switch or by replacing its base's form. The migration moves it, and no report or precheck offers its removal ([D6](#d6) rule 11, [D7](#d7)). The price is one more read rule for the dual-read period, and a `.custom` source's overrides being moved by the conversion without a look at the base. +- **A stored row that keeps a public address closed is never set aside as an internal record form**, whether it closes by a switch or by replacing its base's form. The migration moves it, and no report or precheck offers its removal ([D6](#d6) rule 11, [D7](#d7)). The price is one more read rule for the dual-read period, and a `.custom` source's overrides being moved by the conversion without a look at the base. `os validate` then refuses the one whose base ships no form of that name, so a record form's override does not stay among the `form` items (this record's reading of ruling item 3, [D7](#d7)). +- **The ceremony can switch off a public form that is open today.** Where a stored row no layer reads today withdraws a form — a package-less row behind a writable package's own row, or behind a row bound to the base — the fold carries the withdrawal, and the form answers `404` after `--apply`. The report names it as newly closed, and the administrator switches it on again in Setup ([D7](#d7), D7-d). Where several stored rows of one form exist, the one whose body the read serves today is the one kept. +- **Until major 19 a package-less list is not saved at a name a package ships as a form**, as it is not today; the administrator picks another key or saves the list into a package. A package-less list that held a name before a package shipped a form under it keeps that form unserved in that deployment and holds the upgrade until the maintainer has decided its disposition ([D5](#d5), [D7](#d7)). - **One arrangement served today is refused once it is in the new type**: a retired form that keeps its link beside its successor on the same address. The author clears the retired form's link ([question 3](#q3), this record's reading of "holds"). - **`defineForm` changes meaning** in card ② ([ruled question 1](#q1)): a declared, compiler-carried export break, on the premise that its outside use is platform-internal. The 17 Studio form modules change file suffix in the same card ([D2](#d2), the seat's routing). - **First-party work**: about 100 non-test source files and about 160 test files name the old shapes; they move in ②, ③ and ④ and the remainder falls to ⑤. @@ -507,4 +547,5 @@ The card cites positions read at `14f4d8f8`. Each was read again. The numbers be - Ruling records: `7123091354`, `7123091586`, `7122924165`, `7118881549`, `7100386248`; on #36868, `7131569242` (the five merge questions, all option A). - Review records on PR #36957 at head `352579004f9`, both folded by one patch round: contract review [`7132189584`](https://github.com/objectstack-ai/objectstack/pull/36957#issuecomment-7132189584) and seat record [`7132202077`](https://github.com/objectstack-ai/objectstack/pull/36957#issuecomment-7132202077). - Review records on PR #36957 at head `9336492ee13`, both folded by the next patch round: contract review [`7132974909`](https://github.com/objectstack-ai/objectstack/pull/36957#issuecomment-7132974909) (its S3 is [D6](#d6) rule 11 and D7-b) and seat record [`7132988092`](https://github.com/objectstack-ai/objectstack/pull/36957#issuecomment-7132988092). +- Review records on PR #36957 at head `be1c0cbd4da`, both folded by the patch round after it: contract review [`7134054404`](https://github.com/objectstack-ai/objectstack/pull/36957#issuecomment-7134054404) (its S4 is D7-d's kept body, its S5 the marking of D7-b's conversion) and seat record [`7134079524`](https://github.com/objectstack-ai/objectstack/pull/36957#issuecomment-7134079524) (its S1 is TL;DR 10's five points, its S2 [D5](#d5)'s bound). - Touching cards named by #36868: #36797 and #36798 (Studio rail and docs on named default and create forms — re-read against [D1](#d1)), #36860 (the metadata list columns row, [D9](#d9)). From 737f6f288c450ecf03f991d1b010e5b847a43d87 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 24 Nov 2026 14:55:24 +0000 Subject: [PATCH 10/13] =?UTF-8?q?docs(adr):=20ADR-0159=20=E2=80=94=20card?= =?UTF-8?q?=202's=20refusal=20covers=20every=20package-less=20list=20at=20?= =?UTF-8?q?a=20form's=20name;=20a=20no-form=20served=20row=20moves=20no=20?= =?UTF-8?q?row=20of=20its=20name?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Folds the delta contract review of head c74ae94fe1a (S6, S7, N5, N6). - D5: the package-less binding is closed by one refusal card 2 adds, items and container expansions alike, whatever the state of the base's pair; the bound binding's sentence is exact for the name after the move - D7-d: the served row is found among every stored row at the address, form or not; where it carries no form no row of the name is moved and all hold the upgrade - card 5's fold pin gains the fixture; TL;DR 10 names the temporary refusal and the decision owed before major 19 Claude-Session: https://claude.ai/code/session_01QSeKYpEsWWE9Y5YtSsDgqZ Co-authored-by: Claude --- ...forms-are-form-items-view-is-lists-only.md | 35 ++++++++++++------- 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md b/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md index 8d7207ee88d..1a7ddc8b7a7 100644 --- a/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md +++ b/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md @@ -37,7 +37,10 @@ - the source conversion moves an item that declares `overrides` to `forms[]` whatever its body, which for a time puts a record form's override among the `form` items, past ruling item 3; `os validate` refuses the one whose base ships no form of that name ([D7](#d7), D7-b); - rule 11's replacement check is kept after major 19 on the withdrawal reader's lifetime, past the "this one reader" that question 4 exempts ([D7](#d7), "After the major"; [question 4](#q4)). - One more choice of this record touches no ruled word and is named here so it is read with them: the fold of two stored rows closes a form that is open today, where a row no layer reads withdraws it ([D7](#d7), D7-d). + Three more things touch no ruled word and are named here so they are read with them: + - the fold of several stored rows closes a form that is open today, where a row no layer reads withdraws it ([D7](#d7), D7-d); + - until major 19 a package-less list is refused at a name a read-only package ships as a form: a temporary exception to "a list and a form of one name do not collide" ([D3](#d3), [D5](#d5)); + - one decision is owed to the maintainer before major 19 opens: the disposition of a stored row that carries no form over a linked base ([D7](#d7), D7-b). --- @@ -151,7 +154,7 @@ ADR-0088's three clauses, each on a fact measured above: - **Grammar.** A `form` name is the dot-required qualified name the view item uses today (`packages/spec/src/ui/view.zod.ts#ViewItemNameSchema`). The part before the last segment **must equal `object`**; a mismatch is refused at parse. The view item never enforced that equality; the new type does from its first release. - **Why this name.** It is the name every form is served under today — a stored item's own `name`, and for a container's form the name `expandViewContainer` gives it. An action's `target`, a `/forms/:name` link, a `.custom` override's key and the withdrawal judgement's identity are all this string. Keeping it means the migration renames nothing, and a withdrawal recorded against a name keeps closing that name ([D6](#d6)). Under ADR-0150 D1 it is an object-derived literal name, the bucket `view` is in; `form` takes the same bucket and no (package, name) resolution. -- **Separate from lists.** After the split a list `crm_lead.all` and a form `crm_lead.all` are items of two types and do not collide. Until the old shapes are tombstoned they still share the `view` type's name space wherever the old shapes are stored, and the container name-collision refusal keeps judging them there. For the same period one write stays closed that is closed today: a package-less list is not saved at a name a read-only package ships as a form ([D5](#d5)). A list in a package is another item beside the form from the first release. +- **Separate from lists.** After the split a list `crm_lead.all` and a form `crm_lead.all` are items of two types and do not collide. Until the old shapes are tombstoned they still share the `view` type's name space wherever the old shapes are stored, and the container name-collision refusal keeps judging them there. For the same period one write is refused, as a temporary exception to that sentence: a package-less list is not saved at a name a read-only package ships as a form, as an item or through a container's expansion ([D5](#d5)). A list in a package is another item beside the form from the first release. - **One form per name per package.** Inside a base's dependency closure ADR-0146 D2's rule applies unchanged: an undeclared same-name item of a dependent is refused at publish. - **The public address (slug) is a second identity**, declared in `sharing.publicLink`. Two different forms on one slug are not refused today. By [ruled question 3](#q3) the `form` write door, `os validate` and publish refuse it. @@ -173,14 +176,19 @@ From the release that adds the type until the next protocol major: - **`form` reads serve authored items and projected ones.** A projected item is marked as such in its read envelope so a surface can say "defined in a view" and offer the move. - **An authored `form` item shadows a projected one of the same name in the same package, inside one layer.** A package's source `form` item shadows the projection of that package's own source; a stored `form` row shadows the projection of a stored row at the same address. It never shadows a withdrawal ([D6](#d6)). ⛔ A package's source item never shadows the projection of a **stored** row: stored over source is the layering order whichever type each side is written in (next bullet). - **A stored old-shape row keeps replacing its base's form when the base moves to `form`.** Today a stored `view` row that stands over a package's form replaces it whole: a declared override in the pair, a row bound to the package, a package-less row, or a stored container whose expansion writes the name. The merge that does it runs inside one type (`packages/metadata-protocol/src/protocol-overlay-merge.ts#mergePackageAwareOverlay`). A package may move its source to `forms:` while the stored row is still a `view` row, and card ④ does exactly that to first-party apps. So the effective `form` read resolves a package's form over both types, in the one served-row order (`packages/metadata-protocol/src/protocol-overlay-merge.ts#servedOverlayRowCandidates`): the stored `view` row that order picks at the package's address is served, as the `form` item it projects, over the package's source `form` item of that name — as it is served over the package's old-shape form today. A stored `form` row at the same place in the order wins over the stored `view` row, and the `form` write of the bullet below removes the latter. A stored `view` row that carries no form at the name is the next bullet's. [D6](#d6) rule 11 says what this protects. -- **A stored `view` row that carries no form at a form's name is read as written over the form only where no write door could have put it there beside the form.** [D3](#d3) makes a list and a form of one name two items, so a list row closes nothing by sharing a form's name. Inside the one type it does today: a row at a package's address replaces whatever the package ships under the name. The `form` read keeps that answer — nothing is served for the name from that package until [D7](#d7) gives the row its disposition — for three bindings, each one closed by a write door, and for no other row: +- **A stored `view` row that carries no form at a form's name is read as written over the form only in the bindings where no write can put it there beside the form.** [D3](#d3) makes a list and a form of one name two items, so a list row closes nothing by sharing a form's name. Inside the one type it does today: a row at a package's address replaces whatever the package ships under the name. The `form` read keeps that answer — nothing is served for the name from that package until [D7](#d7) gives the row its disposition — for three bindings and for no other row. Two are closed by a write door that exists today; the third is closed by a refusal card ② adds: - 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`, `packages/metadata-protocol/src/protocol-packaged-base-refusal.ts#judgeOverrideWrite`), so a `view` override was declared while the package shipped the name as a `view` item; - - a row **bound to a read-only package**. A save that names a read-only code package is refused today; the rows of this binding were stored before that door closed (the class `packages/metadata-protocol/src/protocol-packageless-overlay-migration.ts` carries as rows bound to a read-only base); - - a **package-less row**. ADR-0146 D11 closed the package-less write onto an item a read-only package ships (`packages/metadata-protocol/src/protocol-packaged-base-refusal.ts#packagelessOverlayWriteRefusal`, `403 NOT_OVERRIDABLE`). That close reads one type, so left alone it would open for the name when the package ships it as a `form` item and no longer as a `view` item. **Card ② keeps it closed across the two types until major 19**: a package-less `view` write at a name a read-only package ships as a `form` item is refused with the same status and `code`. The message names the form and the two saves that work: another key, or the list saved into a package (the base's pair as the pair's own item, with no `overrides`; or an app of the environment's own). - - **So a list saved at a form's name after the package moved the form is never read as written over it.** Saved into a package it is a list beside the form ([D3](#d3)): it is not in the package's served-row order, the form stays served, and the row is in no class that holds the upgrade ([D7](#d7)). Saved package-less it is refused, as it is refused today while the form is a `view` item. A row in a writable package is that package's own item and is never read as standing over that package's own form. - - **Known limit, fail-closed.** A package-less row that held the name before the package shipped anything under it cannot be told from one written over the form, and is read the same way. That is today's answer inside one type too: a package that ships an item under a name an environment row already holds is served that row. The cost is availability in that one deployment: the package's form is not served there, the form's layered read names the row that stands over it, and the row holds the upgrade (D7-c). + - a row **bound to a read-only package**. Once the package ships the name as a `form` item and not as a `view` item, a `view` save that names the package at that name is a new item in a read-only package, and that is refused (ADR-0070 D1, `WRITABLE_PACKAGE_REQUIRED`). So a row of this binding at the name was stored while the package shipped the name as a `view` item: the class `packages/metadata-protocol/src/protocol-packageless-overlay-migration.ts` carries as rows bound to a read-only base. This is exact for the name after the move, and only there. Before the move the close of saves that name a read-only package leaves a base with no pair open; a row saved through that corner was saved over the form, which is the reading; + - a **package-less row**: an item, or a stored container whose expansion writes the name. ⛔ No door of today closes this binding for a form's name. ADR-0146 D11's close (`packages/metadata-protocol/src/protocol-packaged-base-refusal.ts#packagelessOverlayWriteRefusal`) refuses a package-less write only where its ceremony would move the row, and by its contract leaves the rest open: a name several read-only packages ship, a base whose pair cannot be formed or ensured, a container-shaped body, a row whose pair already holds the item. The container name-collision refusal in `packages/metadata-protocol/src/protocol-save.ts` judges the names a package ships as `view` items. Neither judges a name the package ships as a `form` item. **So card ② adds one refusal of its own, until major 19**: every package-less `view` write that would store a list at a name a read-only package ships as a `form` item is refused. + - **What it covers.** A save, and the publish of a draft; of an item, and of a container whose expansion writes the name, judged on the expansion as the readers place it (the way the container name-collision refusal judges one). It does not ask the state of the base's pair or how many packages ship the name. A re-save of a row already stored is refused too; the stored row keeps its bytes. + - **How it answers.** It sits beside the container name-collision refusal in the save door and answers with that refusal's envelope (`VALIDATION_ERROR`, `400`); no new `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. + - **What it does not cover.** A package-less `view` write that carries a form at the name is an old-shape write of the form and saves as before (two bullets down). A write that names a package is not package-less. + - **So a list saved at a form's name after the package moved the form is never read as written over it.** Saved into a package — an app of the environment's own, or the base's pair as the pair's own item with no `overrides` — it is a list beside the form ([D3](#d3)), as an item or as a container's expansion alike: it is not in the base's served-row order, the form stays served, and the row is in no class that holds the upgrade ([D7](#d7)). Saved package-less it is refused. A row in a writable package is that package's own item and is never read as standing over that package's own form. A read-only package's own source is read the same way: a list its `views:` container expands at the name of its own `form` item is its list beside its form. + - **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 — cannot be told from one written over the form. It is read the same way, an item and a container's expansion alike. That is today's answer inside one type too: a package that ships an item under a name an environment row already holds is served that row. The cost is availability in that one deployment: the package's form is not served there, the form's layered read names the row that stands over it, and the row holds the upgrade (D7-c). - **The reading and the refusal both end at major 19.** No deployment reaches it holding such a row ([D7](#d7)'s precheck), and from that release a `view` row is a list and nothing else. - - **Pins card ② owes for this bullet, each with an ablation.** (a) The bound: over a package that authors an open `form` item, a list saved package-less at the form's name is refused (status and `code`), the same list saved into the pair as its own item saves, and after both the two doors serve the package's form at its address (ablate: the bound — let the reading take any stored `view` row of the name — and the doors answer `404`). (b) 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 (ablate: fall through to the package's source `form` item when the stored row projects no form). If card ②'s measurement ([D7](#d7), D7-b) finds a door that admits a declared override carrying no form, pin (b) gains that row as a second fixture in the same change. + - **Pins card ② owes for this bullet, each with an ablation.** + - (a) The bound. Over a package that authors an open `form` item: a list saved package-less at the form's name is refused (status and `code`); a package-less container whose expansion writes a list at that name is refused; 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 (let 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`. + - (b) 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; 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). If card ②'s measurement ([D7](#d7), D7-b) finds a door that admits a declared override carrying no form, this pin gains that row as a fixture in the same change. - **`view` reads are unchanged** until the major: `GET /api/v1/meta/view` keeps listing `viewKind: 'form'` items, and `GET /api/v1/meta/view/:name` keeps answering a form's name. They are frozen: they serve the old shapes only and are not the picture of an environment's forms once a `form` item exists. Every platform reader moves to `form` — the anonymous doors in card ②, the console in card ③. - **Old-shape writes still save** until the major. A new `view` save that carries a form is stored as a `view` row and projected. - **A `form` write acts on the form whichever type stores it.** A save, reset or delete of a `form` at `(package, name)` also removes the old-shape row that carries the same form at the same address, in the same transaction: an item-shaped `view` row is deleted, a stored container is re-saved without that form. One address holds one definition of a form; the Setup switch written before the re-point (a `view` override) is found and cleared by the re-pointed switch. ⛔ It removes form content only. A list item of type `view` that holds the same `OBJECT.KEY` name is another item of another type and is left untouched: the two types share one name grammar ([D3](#d3)), which makes this the one destructive edge of the rule, and card ② pins it (a `form` save, reset and delete at a name a list holds each leave the list row byte-equal). @@ -245,6 +253,7 @@ Each pin asserts the refusal's status and `code` and that no record was written, - A **row bound to a read-only base** — a customization saved under the base's own id before that door closed, the class ADR-0146 D11's ceremony carries beside the package-less one (`packages/metadata-protocol/src/protocol-packageless-overlay-migration.ts`) — has the same destination: a declared `form` override in the base's pair, with its body as written (D7-b). - **(D7-d) Several stored rows of one form fold into one: the body kept is the one served today, and the fold only narrows.** More than one stored row of a form can head for one destination. Over a read-only base there are three, all bound for the pair's declared override: the pair's own override, a row bound to the base, and a package-less row. For a writable package there are two, bound for the package's own row: that row and a package-less row (the ensure door refuses a writable base with "customize it directly"). - **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 whichever type it is stored in. It lands on the destination as written: a body with no link stays without one. ⛔ The ceremony never decides this by the order it moves rows in, and never by which row reached the destination first. + - **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 (D7-b's row with nothing to move), nothing is served for the name today ([D5](#d5)), and the ceremony moves **no** row of that name. A form row behind it, bound to the base or package-less, stays where it is, and every stored row of the name holds the upgrade with the no-form row (D7-c), each named in the report. Moved alone, the form row would become the pair's override, first in the served-row order and ahead of the row that keeps the address closed. The same holds where the row picked is a declared `view` override that carries no form, if card ② finds a door for one: no form row behind it is moved into the pair, where a stored `form` row would win over it ([D5](#d5)). - **Every other row of the form is folded into it and carries over 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 — not its link, not a switch that is on — so a body the read does not serve today is never served by the ceremony. The report names every row of the form, the one whose body was kept, and which one closes the form. - **Why the served order decides: a row bound to the base beside a package-less row.** The read serves the bound row today, in the effective list and in the base's per-package layer alike; the package-less row behind it is read by neither. Where the bound row has no link over a linked base, it closes the address by replacing the base's body (rule 11 of [D6](#d6)), and the package-less row may hold an open body. Both rows have the pair as destination, and the pair's override is first in the served-row order. Kept by the served order, the bound row's body is the pair's override and the address stays closed after `--apply`; the package-less body is folded and its open switch is not carried. - **A folded row's withdrawal that a layer reads today must keep closing.** The base's per-package layer reads the first of the bound row and the package-less row, under an open override of the pair. A withdrawal there closes the form today, and the fold carries it. @@ -268,7 +277,7 @@ Each pin asserts the refusal's status and `code` and that no record was written, | **Setup's switch-off**: the same withdrawal, as a switch-only `.custom` override | as above; the re-pointed switch writes the `form` override in the transaction that clears the `view` one ([D5](#d5)) | D7-a | D7-a ("every switch Setup has written") | D7-e | as above | | **Removing the link over a linked base**: the body has no `publicLink`, or no `sharing` | D6-11: the row stays the served body when the base moves to `forms:` | D7-b: an item that declares `overrides` is moved whatever its body | D7-b: moved as the override it is, without a link; beside another row of the form, D7-d keeps the body served today; no pair, D7-c | D7-e, and never listed as internal | the `form` override replaces the base's form whole ([D4](#d4)); a survivor keeps replacing — rule 11's kept half, this record's own reading past question 4's scope and not the ruled exemption ("After the major", below) | | **Pointing the link at another address over a linked base**: the base's address closes, the new one opens | D6-11 for the base's address | D7-a | D7-a | D7-e | [D4](#d4); the new address is held under [question 3](#q3) | -| **Carrying no form at the name over a linked base**, in one of the three bindings [D5](#d5) bounds (a declared one: not measured whether a door admits it; a package-less one can predate the package's form) | D6-11 through [D5](#d5)'s bounded reading: nothing is served for the name from that package. A list saved in a package beside the form is not in this row | not converted: the item is not a form | D7-c: holds the upgrade; a decision before major 19 | D7-e | none: no deployment passes the precheck holding one, and from the major a `view` row is a list ([D3](#d3)); the reading ends there | +| **Carrying no form at the name over a linked base**, in one of the three bindings [D5](#d5) bounds (a declared one: not measured whether a door admits it; a package-less one can predate the package's form) | D6-11 through [D5](#d5)'s bounded reading: nothing is served for the name from that package. A list saved in a package beside the form is not in this row | not converted: the item is not a form | D7-c: holds the upgrade, and every stored row of the name with it (D7-d); a decision before major 19 | D7-e | none: no deployment passes the precheck holding one, and from the major a `view` row is a list ([D3](#d3)); the reading ends there | | **A body the projection cannot read** that names a link | D6-7 | refused by the schema before the conversion runs | D7-c: holds the upgrade | D7-e | D6-7's half of the kept reader (D7-f) | One path the table does not close, by design: an administrator who resets an override, or switches a form on, in Setup or through the `form` write door. That is the administrator's own act on the form, judged by the write-time rules of [D6](#d6) rule 9; no migration step performs it and none prescribes it. @@ -278,10 +287,11 @@ One path the table does not close, by design: an administrator who resets an ove - **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` — and the form is deleted or left behind with its withdrawal); - **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 — and the pin turns red: the report lists the row for removal, and removing it as the report says serves the base's form); - **the ceremony keeps a withdrawal closed**: a form withdrawn before the ceremony — 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); -- **the fold keeps the served body and only narrows** (D7-d), three fixtures: +- **the fold keeps the served body and only narrows** (D7-d), four fixtures: - 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); - **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 — and the address answers); - **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); + - **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, and the report names both rows as holding the upgrade (ablate: leave the no-form row out of the fold — find the served row among form rows only — and the address answers); - each "before" half proves one of this record's readings of today's layers. If one is not as stated here, the card stops and reports; - **the precheck refuses**: a deployment that holds a stored old-shape form row of each class (movable, internal, pair not ensurable, body not readable), or a stored row of the fifth class — one that carries no form over a linked base, in a binding [D5](#d5) bounds — 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 it names 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 by the precheck and does not hold the upgrade (ablate: [D5](#d5)'s bound); - **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, and a stored old-shape row with no link over a package's open form still keeps that address closed (ablate: the exempt reader, then its replacement half); @@ -351,7 +361,7 @@ Five cards, in this order. ⛔ None lands before this record is accepted. The de | ⑤ | Major 19: tombstone the three old shapes, the two conversions and the chain entry, the stored-row ceremony and the upgrade precheck, `view` reads lists only | `domain:spec` with `domain:server` | `narrowed` | ③ and ④ | - **② carries four of the five rulings as requirements** ([the questions](#the-five-merge-questions-as-ruled)): the `defineForm` factory with the Studio helper renamed `defineMetadataForm`, after measuring outside use of today's `defineForm` (question 1); the public-address clash refusal at the `form` write door, `os validate` and publish (question 3); the reader of old-shape withdrawals built as exempt from the kit age-out and anchored as such (question 4); the top-level document shape (question 5). Question 2 asks ② for no change: the name is the one served today. ⑤ carries question 4's other half, the upgrade precheck of major 19. -- **② is one releasable change.** It adds and removes nothing an author wrote: `view` reads, old-shape writes and the shipped console behave as before. It owes [D6](#d6)'s pins and ablations (rule 11's replacement pin among them), [D5](#d5)'s pin that a `form` write leaves a list row of the same name untouched, the measurement of whether a write door admits a declared override that carries no form at a form's name ([D7](#d7), D7-b), the package-less close kept across the two types with [D5](#d5)'s two pins for the row that carries no form (the bound, and the closed reading), the showcase's `examples/app-showcase/src/coverage.ts#KIND_COVERAGE` row (its coverage test holds exact registry membership), and the same-change override row of [D4](#d4). The showcase's one authored `form` item is a new form, not a move of one the console opens today: moving one waits for ③, for the reason in the ④ bullet below. +- **② is one releasable change.** It adds and removes nothing an author wrote: `view` reads, old-shape writes and the shipped console behave as before. It owes [D6](#d6)'s pins and ablations (rule 11's replacement pin among them), [D5](#d5)'s pin that a `form` write leaves a list row of the same name untouched, the measurement of whether a write door admits a declared override that carries no form at a form's name ([D7](#d7), D7-b), the refusal of a package-less list at a form's name, items and container expansions alike, with [D5](#d5)'s two pins for the row that carries no form (the bound, and the closed reading), the showcase's `examples/app-showcase/src/coverage.ts#KIND_COVERAGE` row (its coverage test holds exact registry membership), and the same-change override row of [D4](#d4). The showcase's one authored `form` item is a new form, not a move of one the console opens today: moving one waits for ③, for the reason in the ④ bullet below. - **③ carries PR #36784's work.** #36444 stays paused until ③ is filed and then carries `Blocked-by:` ③. #36505 is closed (merged as `5c2d5cf2c4`); the public-forms part of its item 4 is superseded by this record and needs no card. - **④ runs after ③, not beside it.** [D5](#d5) freezes `view` reads to the old shapes, and until ③ lands the shipped console reads forms from `view`: `ui/apps/console/src/components/FormPage.tsx` reads `GET /api/v1/meta/view/:name`, and Setup's page lists type `view`. A first-party form moved to `forms:` before ③ would answer not found when its action opens it and would drop out of Setup's list, which takes its switch out of the administrator's reach. So ④ carries `Blocked-by:` ③ as well as ②, in both of its halves (HotCRM's waits for a release that carries both). After ④ no first-party source authors an old shape, which is what lets ⑤ measure "zero first-party" before it tombstones. - **⑤ is cut only when the maintainer opens major 19.** It is the one card with a breaking banner, an ADR-0087 disposition and a migration in its changeset. @@ -502,7 +512,7 @@ Ruling-ref: [`7131569242`](https://github.com/objectstack-ai/objectstack/issues/ - **A deployment must run a ceremony before major 19**, and that upgrade refuses without it. A stored row whose customization pair cannot be ensured holds the upgrade until the cause the precheck names is removed. Where the cause is the App's own manifest and the administrator does not author the App, the deployment stays on major 18 until the App ships a fix or is uninstalled ([D7](#d7)). - **A stored row that keeps a public address closed is never set aside as an internal record form**, whether it closes by a switch or by replacing its base's form. The migration moves it, and no report or precheck offers its removal ([D6](#d6) rule 11, [D7](#d7)). The price is one more read rule for the dual-read period, and a `.custom` source's overrides being moved by the conversion without a look at the base. `os validate` then refuses the one whose base ships no form of that name, so a record form's override does not stay among the `form` items (this record's reading of ruling item 3, [D7](#d7)). - **The ceremony can switch off a public form that is open today.** Where a stored row no layer reads today withdraws a form — a package-less row behind a writable package's own row, or behind a row bound to the base — the fold carries the withdrawal, and the form answers `404` after `--apply`. The report names it as newly closed, and the administrator switches it on again in Setup ([D7](#d7), D7-d). Where several stored rows of one form exist, the one whose body the read serves today is the one kept. -- **Until major 19 a package-less list is not saved at a name a package ships as a form**, as it is not today; the administrator picks another key or saves the list into a package. A package-less list that held a name before a package shipped a form under it keeps that form unserved in that deployment and holds the upgrade until the maintainer has decided its disposition ([D5](#d5), [D7](#d7)). +- **Until major 19 a package-less list is not saved at a name a read-only package ships as a form**, as an item or through a container's expansion. It is a refusal card ② adds and a temporary exception to [D3](#d3); the administrator picks another key or saves the list into an app of the environment's own. A package-less list that held a name before a package shipped a form under it keeps that form unserved in that deployment and holds the upgrade until the maintainer has decided its disposition ([D5](#d5), [D7](#d7)). - **One arrangement served today is refused once it is in the new type**: a retired form that keeps its link beside its successor on the same address. The author clears the retired form's link ([question 3](#q3), this record's reading of "holds"). - **`defineForm` changes meaning** in card ② ([ruled question 1](#q1)): a declared, compiler-carried export break, on the premise that its outside use is platform-internal. The 17 Studio form modules change file suffix in the same card ([D2](#d2), the seat's routing). - **First-party work**: about 100 non-test source files and about 160 test files name the old shapes; they move in ②, ③ and ④ and the remainder falls to ⑤. @@ -548,4 +558,5 @@ The card cites positions read at `14f4d8f8`. Each was read again. The numbers be - Review records on PR #36957 at head `352579004f9`, both folded by one patch round: contract review [`7132189584`](https://github.com/objectstack-ai/objectstack/pull/36957#issuecomment-7132189584) and seat record [`7132202077`](https://github.com/objectstack-ai/objectstack/pull/36957#issuecomment-7132202077). - Review records on PR #36957 at head `9336492ee13`, both folded by the next patch round: contract review [`7132974909`](https://github.com/objectstack-ai/objectstack/pull/36957#issuecomment-7132974909) (its S3 is [D6](#d6) rule 11 and D7-b) and seat record [`7132988092`](https://github.com/objectstack-ai/objectstack/pull/36957#issuecomment-7132988092). - Review records on PR #36957 at head `be1c0cbd4da`, both folded by the patch round after it: contract review [`7134054404`](https://github.com/objectstack-ai/objectstack/pull/36957#issuecomment-7134054404) (its S4 is D7-d's kept body, its S5 the marking of D7-b's conversion) and seat record [`7134079524`](https://github.com/objectstack-ai/objectstack/pull/36957#issuecomment-7134079524) (its S1 is TL;DR 10's five points, its S2 [D5](#d5)'s bound). +- Review records on PR #36957 at head `c74ae94fe1a`: contract review [`7135096933`](https://github.com/objectstack-ai/objectstack/pull/36957#issuecomment-7135096933), folded by the patch round after it (its S6 is what [D5](#d5)'s refusal covers, its S7 the no-form row in D7-d), and seat record [`7134976464`](https://github.com/objectstack-ai/objectstack/pull/36957#issuecomment-7134976464). - Touching cards named by #36868: #36797 and #36798 (Studio rail and docs on named default and create forms — re-read against [D1](#d1)), #36860 (the metadata list columns row, [D9](#d9)). From 102c857d0e9f0290d174bb2647a49d2dca99da91 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 24 Nov 2026 15:34:26 +0000 Subject: [PATCH 11/13] =?UTF-8?q?docs(adr):=20ADR-0159=20=E2=80=94=20card?= =?UTF-8?q?=202=20is=20narrowed=20for=20its=20refusal;=20the=20projection?= =?UTF-8?q?=20reads=20served=20rows=20only?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Folds the delta contract review of head 737f6f288c4 (S8, S9, N8, N9). - card 2's refusal refuses saves admitted today: named in D5, the execution plan (narrowed), TL;DR and Consequences, with the door that remains - D5: for the served form read the projection reads served rows only; a package-less form behind a writable package's list stays unserved - D7-d: the ceremony moves no row of that name; the package-less form row holds the upgrade; card 5's fold pin gains the fixture - the refusal is triggered by a form a package authors, covers a rollback, and does not judge a delete Claude-Session: https://claude.ai/code/session_01QSeKYpEsWWE9Y5YtSsDgqZ Co-authored-by: Claude --- ...forms-are-form-items-view-is-lists-only.md | 36 ++++++++++++------- 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md b/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md index 1a7ddc8b7a7..77919ec15a8 100644 --- a/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md +++ b/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md @@ -29,7 +29,7 @@ 6. **`form` is overridable by declaration** in the paired `.custom`, like `page` ([D4](#d4)). 7. **Translations get a `forms` family**; the form tails under `objects.OBJECT._views` are read as a fallback until the major ([D8](#d8)). 8. **Shipped work is kept and re-pointed**: Setup's page reads `form`, the paused designer becomes the `form` editor, the Studio Developer page and the Form-tab switch retire ([D9](#d9)). -9. **Five cards, in order**; ②, ③ and ④ are additive, ⑤ is the major ([Execution plan](#execution-plan-after-acceptance)). +9. **Five cards, in order**; ② adds the type and narrows one write, ③ and ④ are additive, ⑤ is the major ([Execution plan](#execution-plan-after-acceptance)). 10. **Five points the first ruling is silent on were put to the maintainer and are ruled, all option A**: `defineForm` is the type's factory, the name stays `OBJECT.KEY`, a taken public address is refused, the reader of old withdrawals is exempt from the age-out, and the body is at the top level ([The five merge questions, as ruled](#the-five-merge-questions-as-ruled)). **Five points go past the ruling's words. Each is marked where it stands, outside every ruled block, for the approver to accept with the record or strike**: - the `*.form.ts` file suffix follows the factory name, by the owning seat's routing on question 1 ([D2](#d2)); - a switched-off form that keeps its link still holds its address ([question 3](#q3), this record's reading of "holds"); @@ -37,9 +37,10 @@ - the source conversion moves an item that declares `overrides` to `forms[]` whatever its body, which for a time puts a record form's override among the `form` items, past ruling item 3; `os validate` refuses the one whose base ships no form of that name ([D7](#d7), D7-b); - rule 11's replacement check is kept after major 19 on the withdrawal reader's lifetime, past the "this one reader" that question 4 exempts ([D7](#d7), "After the major"; [question 4](#q4)). - Three more things touch no ruled word and are named here so they are read with them: + Four more things touch no ruled word and are named here so they are read with them: - the fold of several stored rows closes a form that is open today, where a row no layer reads withdraws it ([D7](#d7), D7-d); - - until major 19 a package-less list is refused at a name a read-only package ships as a form: a temporary exception to "a list and a form of one name do not collide" ([D3](#d3), [D5](#d5)); + - until major 19 a package-less list is refused at a name a read-only package authors as a form: a temporary exception to "a list and a form of one name do not collide". **Some of these saves are admitted today**, so card ② narrows one write and carries `Metadata-protocol: narrowed`; the list keeps a door, another key or an app of the environment's own ([D3](#d3), [D5](#d5), [Execution plan](#execution-plan-after-acceptance)); + - a package-less form that no layer reads today, behind a list of the same name, stays unserved from card ②'s release and is not moved by the ceremony ([D5](#d5), [D7](#d7), D7-d); - one decision is owed to the maintainer before major 19 opens: the disposition of a stored row that carries no form over a linked base ([D7](#d7), D7-b). --- @@ -154,7 +155,7 @@ ADR-0088's three clauses, each on a fact measured above: - **Grammar.** A `form` name is the dot-required qualified name the view item uses today (`packages/spec/src/ui/view.zod.ts#ViewItemNameSchema`). The part before the last segment **must equal `object`**; a mismatch is refused at parse. The view item never enforced that equality; the new type does from its first release. - **Why this name.** It is the name every form is served under today — a stored item's own `name`, and for a container's form the name `expandViewContainer` gives it. An action's `target`, a `/forms/:name` link, a `.custom` override's key and the withdrawal judgement's identity are all this string. Keeping it means the migration renames nothing, and a withdrawal recorded against a name keeps closing that name ([D6](#d6)). Under ADR-0150 D1 it is an object-derived literal name, the bucket `view` is in; `form` takes the same bucket and no (package, name) resolution. -- **Separate from lists.** After the split a list `crm_lead.all` and a form `crm_lead.all` are items of two types and do not collide. Until the old shapes are tombstoned they still share the `view` type's name space wherever the old shapes are stored, and the container name-collision refusal keeps judging them there. For the same period one write is refused, as a temporary exception to that sentence: a package-less list is not saved at a name a read-only package ships as a form, as an item or through a container's expansion ([D5](#d5)). A list in a package is another item beside the form from the first release. +- **Separate from lists.** After the split a list `crm_lead.all` and a form `crm_lead.all` are items of two types and do not collide. Until the old shapes are tombstoned they still share the `view` type's name space wherever the old shapes are stored, and the container name-collision refusal keeps judging them there. For the same period one write is refused, as a temporary exception to that sentence: a package-less list is not saved at a name a read-only package authors as a form, as an item or through a container's expansion ([D5](#d5)). A list in a package is another item beside the form from the first release. - **One form per name per package.** Inside a base's dependency closure ADR-0146 D2's rule applies unchanged: an undeclared same-name item of a dependent is refused at publish. - **The public address (slug) is a second identity**, declared in `sharing.publicLink`. Two different forms on one slug are not refused today. By [ruled question 3](#q3) the `form` write door, `os validate` and publish refuse it. @@ -173,16 +174,23 @@ The name is ruled ([question 2](#q2)); the alternative not taken is a short name From the release that adds the type until the next protocol major: - **The projection.** One pure function in `packages/spec` — beside `expandViewContainer`, built on it — turns a `view` body into the `form` items it carries: the container's `form`, each `formViews` entry, and a `viewKind: 'form'` item's `config`. Each projected item takes the name it is served under today, `object` from the old four-rung resolution, and the body unchanged. It is the **only** reader of the old shapes for form content: the loader, the stored-row read, the anonymous doors, the withdrawal judgement and the lint all call it, and none re-reads `formViews` by hand. +- **For the served `form` read the projection reads served rows only.** 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, in any binding; it stays in the withdrawal layer, where a row may only narrow ([D6](#d6) rules 4 and 5). ⛔ An implementation that projects every stored `view` row serves forms no door answers today. + - **The case this 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.** Today the package's row takes the slot, the effective `view` list holds the list, no layer reads the package-less row, and both doors answer `404`. From card ②'s release the answer is the same: the package-less form is not served. It is not served because the row is passed over, and not because the list is read as written over a form: the list is the package's own item and closes nothing of its package's. + - **This is the old shapes' shared name space, not a new collision.** [D3](#d3) keeps a list and a form of one name apart as items of two types, and says the old shapes still share the `view` type's name space wherever they are stored. Both rows here are `view` rows. So the rule also holds for a list saved into a writable package after card ② at the name of a package-less old-shape form: the save closes that form, as it does today. A form authored or stored as a `form` item is not passed over by a `view` row of any name. + - **Cost and way out.** The cost is nothing a door answers today. The rows cannot be told from two items their administrator means to keep, so nothing moves the form: [D7](#d7), D7-d says what the ceremony and the precheck do with the pair. + - **Pin card ② owes, 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 card ②'s change and after it (ablate: project every stored `view` row into the `form` read, and the address answers). - **`form` reads serve authored items and projected ones.** A projected item is marked as such in its read envelope so a surface can say "defined in a view" and offer the move. - **An authored `form` item shadows a projected one of the same name in the same package, inside one layer.** A package's source `form` item shadows the projection of that package's own source; a stored `form` row shadows the projection of a stored row at the same address. It never shadows a withdrawal ([D6](#d6)). ⛔ A package's source item never shadows the projection of a **stored** row: stored over source is the layering order whichever type each side is written in (next bullet). - **A stored old-shape row keeps replacing its base's form when the base moves to `form`.** Today a stored `view` row that stands over a package's form replaces it whole: a declared override in the pair, a row bound to the package, a package-less row, or a stored container whose expansion writes the name. The merge that does it runs inside one type (`packages/metadata-protocol/src/protocol-overlay-merge.ts#mergePackageAwareOverlay`). A package may move its source to `forms:` while the stored row is still a `view` row, and card ④ does exactly that to first-party apps. So the effective `form` read resolves a package's form over both types, in the one served-row order (`packages/metadata-protocol/src/protocol-overlay-merge.ts#servedOverlayRowCandidates`): the stored `view` row that order picks at the package's address is served, as the `form` item it projects, over the package's source `form` item of that name — as it is served over the package's old-shape form today. A stored `form` row at the same place in the order wins over the stored `view` row, and the `form` write of the bullet below removes the latter. A stored `view` row that carries no form at the name is the next bullet's. [D6](#d6) rule 11 says what this protects. - **A stored `view` row that carries no form at a form's name is read as written over the form only in the bindings where no write can put it there beside the form.** [D3](#d3) makes a list and a form of one name two items, so a list row closes nothing by sharing a form's name. Inside the one type it does today: a row at a package's address replaces whatever the package ships under the name. The `form` read keeps that answer — nothing is served for the name from that package until [D7](#d7) gives the row its disposition — for three bindings and for no other row. Two are closed by a write door that exists today; the third is closed by a refusal card ② adds: - 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`, `packages/metadata-protocol/src/protocol-packaged-base-refusal.ts#judgeOverrideWrite`), so a `view` override was declared while the package shipped the name as a `view` item; - a row **bound to a read-only package**. Once the package ships the name as a `form` item and not as a `view` item, a `view` save that names the package at that name is a new item in a read-only package, and that is refused (ADR-0070 D1, `WRITABLE_PACKAGE_REQUIRED`). So a row of this binding at the name was stored while the package shipped the name as a `view` item: the class `packages/metadata-protocol/src/protocol-packageless-overlay-migration.ts` carries as rows bound to a read-only base. This is exact for the name after the move, and only there. Before the move the close of saves that name a read-only package leaves a base with no pair open; a row saved through that corner was saved over the form, which is the reading; - - a **package-less row**: an item, or a stored container whose expansion writes the name. ⛔ No door of today closes this binding for a form's name. ADR-0146 D11's close (`packages/metadata-protocol/src/protocol-packaged-base-refusal.ts#packagelessOverlayWriteRefusal`) refuses a package-less write only where its ceremony would move the row, and by its contract leaves the rest open: a name several read-only packages ship, a base whose pair cannot be formed or ensured, a container-shaped body, a row whose pair already holds the item. The container name-collision refusal in `packages/metadata-protocol/src/protocol-save.ts` judges the names a package ships as `view` items. Neither judges a name the package ships as a `form` item. **So card ② adds one refusal of its own, until major 19**: every package-less `view` write that would store a list at a name a read-only package ships as a `form` item is refused. - - **What it covers.** A save, and the publish of a draft; of an item, and of a container whose expansion writes the name, judged on the expansion as the readers place it (the way the container name-collision refusal judges one). It does not ask the state of the base's pair or how many packages ship the name. A re-save of a row already stored is refused too; the stored row keeps its bytes. + - a **package-less row**: an item, or a stored container whose expansion writes the name. ⛔ No door of today closes this binding for a form's name. ADR-0146 D11's close (`packages/metadata-protocol/src/protocol-packaged-base-refusal.ts#packagelessOverlayWriteRefusal`) refuses a package-less write only where its ceremony would move the row, and by its contract leaves the rest open: a name several read-only packages ship, a base whose pair cannot be formed or ensured, a container-shaped body, a row whose pair already holds the item. The container name-collision refusal in `packages/metadata-protocol/src/protocol-save.ts` judges the names a package ships as `view` items. Neither judges a name the package ships as a `form` item. **So card ② adds one refusal of its own, until major 19**: every package-less `view` write that would store a list at a name a read-only package **authors** as a `form` item is refused. + - **What it covers.** A save, the publish of a draft, and a rollback to a version that carries a list at the name; of an item, and of a container whose expansion writes the name, judged on the expansion as the readers place it (the way the container name-collision refusal judges one). It does not ask the state of the base's pair or how many packages ship the name. A re-save of a row already stored is refused too; the stored row keeps its bytes. A delete is not judged: it stores nothing. + - **What triggers it.** The name is one 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: there the name is still a `view` item's, and today's doors judge the write as they do now. + - **It refuses saves that are admitted today.** Where a package's form is an old-shape `view` item, a package-less list saves at its name today in the cases ADR-0146 D11's close leaves open: 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, which neither the close nor the container name-collision refusal judges. Once the package authors the name as a `form` item, each of these is refused. An administrator who holds such a list can no longer edit it in place; a container is refused at every re-save until the member is renamed. That narrows what an administrator can save. It is small and it is meant: the list keeps a door (the next sub-bullet), a save that carries a form at the name is untouched, and the alternative is the corner the refusal closes — a list saved after the move that the read cannot tell from one written over the form. So card ② is `Metadata-protocol: narrowed` ([Execution plan](#execution-plan-after-acceptance)). The refusal reads a name only from the release in which a package authors it as a `form` item: for first-party apps that is card ④'s, for any other app its author's own. - **How it answers.** It sits beside the container name-collision refusal in the save door and answers with that refusal's envelope (`VALIDATION_ERROR`, `400`); no new `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. - - **What it does not cover.** A package-less `view` write that carries a form at the name is an old-shape write of the form and saves as before (two bullets down). A write that names a package is not package-less. + - **What it does not cover.** A package-less `view` write that carries a form at the name is an old-shape write of the form and saves as before (two bullets down); so does a rollback to a version that carries a form. A write that names a package is not package-less. - **So a list saved at a form's name after the package moved the form is never read as written over it.** Saved into a package — an app of the environment's own, or the base's pair as the pair's own item with no `overrides` — it is a list beside the form ([D3](#d3)), as an item or as a container's expansion alike: it is not in the base's served-row order, the form stays served, and the row is in no class that holds the upgrade ([D7](#d7)). Saved package-less it is refused. A row in a writable package is that package's own item and is never read as standing over that package's own form. A read-only package's own source is read the same way: a list its `views:` container expands at the name of its own `form` item is its list beside its form. - **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 — cannot be told from one written over the form. It is read the same way, an item and a container's expansion alike. That is today's answer inside one type too: a package that ships an item under a name an environment row already holds is served that row. The cost is availability in that one deployment: the package's form is not served there, the form's layered read names the row that stands over it, and the row holds the upgrade (D7-c). - **The reading and the refusal both end at major 19.** No deployment reaches it holding such a row ([D7](#d7)'s precheck), and from that release a `view` row is a list and nothing else. @@ -254,6 +262,7 @@ Each pin asserts the refusal's status and `code` and that no record was written, - **(D7-d) Several stored rows of one form fold into one: the body kept is the one served today, and the fold only narrows.** More than one stored row of a form can head for one destination. Over a read-only base there are three, all bound for the pair's declared override: the pair's own override, a row bound to the base, and a package-less row. For a writable package there are two, bound for the package's own row: that row and a package-less row (the ensure door refuses a writable base with "customize it directly"). - **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 whichever type it is stored in. It lands on the destination as written: a body with no link stays without one. ⛔ The ceremony never decides this by the order it moves rows in, and never by which row reached the destination first. - **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 (D7-b's row with nothing to move), nothing is served for the name today ([D5](#d5)), and the ceremony moves **no** row of that name. A form row behind it, bound to the base or package-less, stays where it is, and every stored row of the name holds the upgrade with the no-form row (D7-c), each named in the report. Moved alone, the form row would become the pair's override, first in the served-row order and ahead of the row that keeps the address closed. The same holds where the row picked is a declared `view` override that carries no form, if card ② finds a door for one: no form row behind it is moved into the pair, where a stored `form` row would win over it ([D5](#d5)). + - **A writable package's own list ahead of a package-less form row.** The same rule decides it, and the record says it by name because the list is not D7-b's row. The served row at the address is the package's own `view` row, which carries a list; the package-less row behind it carries a form no layer reads ([D5](#d5), "served rows only"). The ceremony moves **no** row of the name: moved to the package's own `form` row, the package-less body would be a `form` item of that package and would be served. The list is the package's own item: it is not an old-shape form row, it holds nothing, and neither the report nor the precheck names an action for it. The package-less form row is an old-shape form row the ceremony cannot move, so it holds the upgrade (D7-c) and the report names it, with the list that is served ahead of it. Its disposition is part of the decision owed to the maintainer before major 19 opens (D7-b): the record offers no deletion for a row that declares a link (D7-e), and no save that would serve it. - **Every other row of the form is folded into it and carries over 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 — not its link, not a switch that is on — so a body the read does not serve today is never served by the ceremony. The report names every row of the form, the one whose body was kept, and which one closes the form. - **Why the served order decides: a row bound to the base beside a package-less row.** The read serves the bound row today, in the effective list and in the base's per-package layer alike; the package-less row behind it is read by neither. Where the bound row has no link over a linked base, it closes the address by replacing the base's body (rule 11 of [D6](#d6)), and the package-less row may hold an open body. Both rows have the pair as destination, and the pair's override is first in the served-row order. Kept by the served order, the bound row's body is the pair's override and the address stays closed after `--apply`; the package-less body is folded and its open switch is not carried. - **A folded row's withdrawal that a layer reads today must keep closing.** The base's per-package layer reads the first of the bound row and the package-less row, under an open override of the pair. A withdrawal there closes the form today, and the fold carries it. @@ -287,10 +296,11 @@ One path the table does not close, by design: an administrator who resets an ove - **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` — and the form is deleted or left behind with its withdrawal); - **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 — and the pin turns red: the report lists the row for removal, and removing it as the report says serves the base's form); - **the ceremony keeps a withdrawal closed**: a form withdrawn before the ceremony — 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); -- **the fold keeps the served body and only narrows** (D7-d), four fixtures: +- **the fold keeps the served body and only narrows** (D7-d), five fixtures: - 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); - **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 — and the address answers); - **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); + - **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, and the report names the package-less row as holding the upgrade (ablate: fold the package-less form row into the package's own `form` row, as a row of that form, and the address answers); - **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, and the report names both rows as holding the upgrade (ablate: leave the no-form row out of the fold — find the served row among form rows only — and the address answers); - each "before" half proves one of this record's readings of today's layers. If one is not as stated here, the card stops and reports; - **the precheck refuses**: a deployment that holds a stored old-shape form row of each class (movable, internal, pair not ensurable, body not readable), or a stored row of the fifth class — one that carries no form over a linked base, in a binding [D5](#d5) bounds — 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 it names 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 by the precheck and does not hold the upgrade (ablate: [D5](#d5)'s bound); @@ -355,16 +365,16 @@ Five cards, in this order. ⛔ None lands before this record is accepted. The de | # | Card | Lane | `Metadata-protocol:` | Blocked by | |:--|:--|:--|:--|:--| | ① | This record (#36868) | `domain:spec`, contract tier | `none` | — | -| ② | Spec and server: the `form` type, its registry and override rows, the `forms` collection and translation family, the projection, `form` reads and writes, the doors and the withdrawal judgement over both types | `domain:spec` with `domain:server` | `added` | ① | +| ② | Spec and server: the `form` type, its registry and override rows, the `forms` collection and translation family, the projection, `form` reads and writes, the doors and the withdrawal judgement over both types | `domain:spec` with `domain:server` | `narrowed` (it adds the type, and narrows one write) | ① | | ③ | Console: re-point Setup's page, land the designer as the `form` editor, re-point `FormPage`, retire the Studio Developer page (closes #36444) | `domain:ui` | `none` | ② | | ④ | Sources and teaching: move this repository's examples and HotCRM's forms to `forms:`, their translation keys, the skills and docs | `domain:spec` (examples, skills, docs) and HotCRM's lane | `none` | ② and ③ | | ⑤ | Major 19: tombstone the three old shapes, the two conversions and the chain entry, the stored-row ceremony and the upgrade precheck, `view` reads lists only | `domain:spec` with `domain:server` | `narrowed` | ③ and ④ | - **② carries four of the five rulings as requirements** ([the questions](#the-five-merge-questions-as-ruled)): the `defineForm` factory with the Studio helper renamed `defineMetadataForm`, after measuring outside use of today's `defineForm` (question 1); the public-address clash refusal at the `form` write door, `os validate` and publish (question 3); the reader of old-shape withdrawals built as exempt from the kit age-out and anchored as such (question 4); the top-level document shape (question 5). Question 2 asks ② for no change: the name is the one served today. ⑤ carries question 4's other half, the upgrade precheck of major 19. -- **② is one releasable change.** It adds and removes nothing an author wrote: `view` reads, old-shape writes and the shipped console behave as before. It owes [D6](#d6)'s pins and ablations (rule 11's replacement pin among them), [D5](#d5)'s pin that a `form` write leaves a list row of the same name untouched, the measurement of whether a write door admits a declared override that carries no form at a form's name ([D7](#d7), D7-b), the refusal of a package-less list at a form's name, items and container expansions alike, with [D5](#d5)'s two pins for the row that carries no form (the bound, and the closed reading), the showcase's `examples/app-showcase/src/coverage.ts#KIND_COVERAGE` row (its coverage test holds exact registry membership), and the same-change override row of [D4](#d4). The showcase's one authored `form` item is a new form, not a move of one the console opens today: moving one waits for ③, for the reason in the ④ bullet below. +- **② is one releasable change.** Nothing an author wrote stops loading, and `view` reads and the shipped console behave as before. Old-shape writes save as before with one exception, which is why the card's value is `narrowed` and not `added`: a package-less `view` write that would store a list at a name a read-only package authors as a `form` item is refused ([D5](#d5)), and some of those saves are admitted today (several packages ship the name; the base has no pair; a re-save of a row its pair already holds; a container that overlays the package's own). By the rule for the line, a value refused is `narrowed`, and several kinds take `narrowed` over `added`. Card ②'s changeset names the refused saves and the door that remains (another key, or an app of the environment's own) beside the export break of question 1; the seat settles the `Clause-②:` arm at claim. The refusal bites for a name from the release in which a package authors it as a `form` item — card ④'s for first-party apps. Card ④ stays `none`: it moves sources and changes no rule. It owes [D6](#d6)'s pins and ablations (rule 11's replacement pin among them), [D5](#d5)'s pin that a `form` write leaves a list row of the same name untouched, the measurement of whether a write door admits a declared override that carries no form at a form's name ([D7](#d7), D7-b), the refusal of a package-less list at a form's name, items and container expansions alike, with [D5](#d5)'s two pins for the row that carries no form (the bound, and the closed reading), the showcase's `examples/app-showcase/src/coverage.ts#KIND_COVERAGE` row (its coverage test holds exact registry membership), and the same-change override row of [D4](#d4). The showcase's one authored `form` item is a new form, not a move of one the console opens today: moving one waits for ③, for the reason in the ④ bullet below. - **③ carries PR #36784's work.** #36444 stays paused until ③ is filed and then carries `Blocked-by:` ③. #36505 is closed (merged as `5c2d5cf2c4`); the public-forms part of its item 4 is superseded by this record and needs no card. - **④ runs after ③, not beside it.** [D5](#d5) freezes `view` reads to the old shapes, and until ③ lands the shipped console reads forms from `view`: `ui/apps/console/src/components/FormPage.tsx` reads `GET /api/v1/meta/view/:name`, and Setup's page lists type `view`. A first-party form moved to `forms:` before ③ would answer not found when its action opens it and would drop out of Setup's list, which takes its switch out of the administrator's reach. So ④ carries `Blocked-by:` ③ as well as ②, in both of its halves (HotCRM's waits for a release that carries both). After ④ no first-party source authors an old shape, which is what lets ⑤ measure "zero first-party" before it tombstones. -- **⑤ is cut only when the maintainer opens major 19.** It is the one card with a breaking banner, an ADR-0087 disposition and a migration in its changeset. +- **⑤ is cut only when the maintainer opens major 19.** It is the one card that tombstones authored shapes and carries a migration and the chain entry in its changeset. It is not the only one with a breaking banner: ② carries one for the export change of question 1 and for the refusal above. --- @@ -512,7 +522,8 @@ Ruling-ref: [`7131569242`](https://github.com/objectstack-ai/objectstack/issues/ - **A deployment must run a ceremony before major 19**, and that upgrade refuses without it. A stored row whose customization pair cannot be ensured holds the upgrade until the cause the precheck names is removed. Where the cause is the App's own manifest and the administrator does not author the App, the deployment stays on major 18 until the App ships a fix or is uninstalled ([D7](#d7)). - **A stored row that keeps a public address closed is never set aside as an internal record form**, whether it closes by a switch or by replacing its base's form. The migration moves it, and no report or precheck offers its removal ([D6](#d6) rule 11, [D7](#d7)). The price is one more read rule for the dual-read period, and a `.custom` source's overrides being moved by the conversion without a look at the base. `os validate` then refuses the one whose base ships no form of that name, so a record form's override does not stay among the `form` items (this record's reading of ruling item 3, [D7](#d7)). - **The ceremony can switch off a public form that is open today.** Where a stored row no layer reads today withdraws a form — a package-less row behind a writable package's own row, or behind a row bound to the base — the fold carries the withdrawal, and the form answers `404` after `--apply`. The report names it as newly closed, and the administrator switches it on again in Setup ([D7](#d7), D7-d). Where several stored rows of one form exist, the one whose body the read serves today is the one kept. -- **Until major 19 a package-less list is not saved at a name a read-only package ships as a form**, as an item or through a container's expansion. It is a refusal card ② adds and a temporary exception to [D3](#d3); the administrator picks another key or saves the list into an app of the environment's own. A package-less list that held a name before a package shipped a form under it keeps that form unserved in that deployment and holds the upgrade until the maintainer has decided its disposition ([D5](#d5), [D7](#d7)). +- **Until major 19 a package-less list is not saved at a name a read-only package authors as a form**, as an item or through a container's expansion. It is a refusal card ② adds and a temporary exception to [D3](#d3). **Some of these saves are admitted today**: where several packages ship the name, where the base has no pair, a re-save of a row its pair already holds, and a container that overlays the package's own container. An administrator who holds such a list can no longer edit it in place once the package authors the form. The door that remains: another key, or the list saved into an app of the environment's own. Card ② is `narrowed` for it. +- **A package-less form that no layer reads today stays unread.** Behind a writable package's own list of the same name it is not served from card ②'s release, the ceremony does not move it, and it holds the upgrade until the maintainer has decided its disposition ([D5](#d5), [D7](#d7), D7-d). A package-less list that held a name before a package shipped a form under it keeps that form unserved in that deployment and holds the upgrade until the maintainer has decided its disposition ([D5](#d5), [D7](#d7)). - **One arrangement served today is refused once it is in the new type**: a retired form that keeps its link beside its successor on the same address. The author clears the retired form's link ([question 3](#q3), this record's reading of "holds"). - **`defineForm` changes meaning** in card ② ([ruled question 1](#q1)): a declared, compiler-carried export break, on the premise that its outside use is platform-internal. The 17 Studio form modules change file suffix in the same card ([D2](#d2), the seat's routing). - **First-party work**: about 100 non-test source files and about 160 test files name the old shapes; they move in ②, ③ and ④ and the remainder falls to ⑤. @@ -559,4 +570,5 @@ The card cites positions read at `14f4d8f8`. Each was read again. The numbers be - Review records on PR #36957 at head `9336492ee13`, both folded by the next patch round: contract review [`7132974909`](https://github.com/objectstack-ai/objectstack/pull/36957#issuecomment-7132974909) (its S3 is [D6](#d6) rule 11 and D7-b) and seat record [`7132988092`](https://github.com/objectstack-ai/objectstack/pull/36957#issuecomment-7132988092). - Review records on PR #36957 at head `be1c0cbd4da`, both folded by the patch round after it: contract review [`7134054404`](https://github.com/objectstack-ai/objectstack/pull/36957#issuecomment-7134054404) (its S4 is D7-d's kept body, its S5 the marking of D7-b's conversion) and seat record [`7134079524`](https://github.com/objectstack-ai/objectstack/pull/36957#issuecomment-7134079524) (its S1 is TL;DR 10's five points, its S2 [D5](#d5)'s bound). - Review records on PR #36957 at head `c74ae94fe1a`: contract review [`7135096933`](https://github.com/objectstack-ai/objectstack/pull/36957#issuecomment-7135096933), folded by the patch round after it (its S6 is what [D5](#d5)'s refusal covers, its S7 the no-form row in D7-d), and seat record [`7134976464`](https://github.com/objectstack-ai/objectstack/pull/36957#issuecomment-7134976464). +- Review record on PR #36957 at head `737f6f288c4`, folded by the patch round after it: contract review [`7136181190`](https://github.com/objectstack-ai/objectstack/pull/36957#issuecomment-7136181190) (its S8 is card ②'s `narrowed` value, its S9 the projection's "served rows only"). - Touching cards named by #36868: #36797 and #36798 (Studio rail and docs on named default and create forms — re-read against [D1](#d1)), #36860 (the metadata list columns row, [D9](#d9)). From a9b2da75f7aa3bfbf1b8cf55eba2370238fc769d Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 24 Nov 2026 16:03:55 +0000 Subject: [PATCH 12/13] =?UTF-8?q?docs(adr):=20ADR-0159=20=E2=80=94=20the?= =?UTF-8?q?=20two=20kinds=20of=20held=20row=20are=20ruled=20to=20get=20no?= =?UTF-8?q?=20disposition;=20served=20rows=20are=20asked=20per=20package?= =?UTF-8?q?=20address?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Folds the delta contract review of head 102c857d0e9 (S10, N11 to N15) and ruling record 7136809727 on the card. - the ruling, quoted beside question 4 outside the ruled blocks: the rows stay as stored, are not moved, and do not hold major 19 - rule 11's kept check covers the row that carries no form; D5's bounded reading and card 2's refusal last as long as that check - D5 and D7-d: the served-row order is asked per package address in the form read's own resolution, never from the effective view list - card 2's fixture for a read-only base; card 5's precheck pin for the two ruled kinds; the Clause-2 arm and disposition under narrowed Claude-Session: https://claude.ai/code/session_01QSeKYpEsWWE9Y5YtSsDgqZ Co-authored-by: Claude --- ...forms-are-form-items-view-is-lists-only.md | 63 +++++++++++-------- 1 file changed, 36 insertions(+), 27 deletions(-) diff --git a/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md b/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md index 77919ec15a8..2d74a97ab83 100644 --- a/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md +++ b/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md @@ -23,7 +23,7 @@ 1. **`form` is a metadata type.** A `form` item is `name` + `object` + the form body. Its name is `OBJECT.KEY`, the name the form is served under today, so no served name changes ([D2](#d2), [D3](#d3)). 2. **It passes ADR-0088's admission test on three consumers that exist today**: the anonymous form doors, an action of `type: 'form'`, and Setup's public-forms list. A record create or edit form is not `form` content ([D1](#d1)). -3. **Adding the type is additive.** From the release that adds it until the next protocol major, the loader projects the three old shapes into `form` items, `view` reads are unchanged, and nothing an author wrote stops loading ([D5](#d5)). +3. **Adding the type is additive, with one write narrowed.** From the release that adds it until the next protocol major, the loader projects the three old shapes into `form` items, `view` reads are unchanged, and nothing an author wrote stops loading. One package-less save is refused, and some forms of it are admitted today (items 9 and 10, [D5](#d5)). 4. **The anonymous doors and the withdrawal judgement read both types through one projection.** A form switched off in either type is closed in both; a stored row that closes an address by replacing its base's form keeps replacing it when the base moves to `form`; a stored body the projection cannot read closes the slugs it names ([D6](#d6)). 5. **The old shapes are tombstoned only in the next protocol major**, with an ADR-0087 conversion for sources and a ceremony for stored rows, `.custom` overrides included. A stored row that keeps a public address closed, by its switch or by replacing its base's form, is moved and is never deleted or offered for deletion ([D7](#d7)). 6. **`form` is overridable by declaration** in the paired `.custom`, like `page` ([D4](#d4)). @@ -37,11 +37,11 @@ - the source conversion moves an item that declares `overrides` to `forms[]` whatever its body, which for a time puts a record form's override among the `form` items, past ruling item 3; `os validate` refuses the one whose base ships no form of that name ([D7](#d7), D7-b); - rule 11's replacement check is kept after major 19 on the withdrawal reader's lifetime, past the "this one reader" that question 4 exempts ([D7](#d7), "After the major"; [question 4](#q4)). - Four more things touch no ruled word and are named here so they are read with them: + Four more things are named here so they are read with them. The first three touch no ruled word; the fourth is a later ruling: - the fold of several stored rows closes a form that is open today, where a row no layer reads withdraws it ([D7](#d7), D7-d); - - until major 19 a package-less list is refused at a name a read-only package authors as a form: a temporary exception to "a list and a form of one name do not collide". **Some of these saves are admitted today**, so card ② narrows one write and carries `Metadata-protocol: narrowed`; the list keeps a door, another key or an app of the environment's own ([D3](#d3), [D5](#d5), [Execution plan](#execution-plan-after-acceptance)); + - from card ②, and for as long as rule 11's replacement check is kept, a package-less list is refused at a name a read-only package authors as a form: an exception to "a list and a form of one name do not collide" that outlasts major 19. **Some of these saves are admitted today**, so card ② narrows one write and carries `Metadata-protocol: narrowed`; the list keeps a door, another key or an app of the environment's own ([D3](#d3), [D5](#d5), [Execution plan](#execution-plan-after-acceptance)); - a package-less form that no layer reads today, behind a list of the same name, stays unserved from card ②'s release and is not moved by the ceremony ([D5](#d5), [D7](#d7), D7-d); - - one decision is owed to the maintainer before major 19 opens: the disposition of a stored row that carries no form over a linked base ([D7](#d7), D7-b). + - the decision earlier heads of this record left owed before major 19 is ruled: 「两类特殊的旧存储行怎么处置。不考虑」. The two kinds of stored row the migration cannot place — a row that carries no form over a linked base, and a package-less form no layer reads behind a list — get no disposition of their own. They stay as stored, the ceremony does not move them, and the precheck does not hold major 19 for them. No closed form opens by it: the first kind's address stays closed by rule 11's kept check (the fifth point above), the second is read by no layer ([question 4](#q4), the last paragraph after it; [D7](#d7)). --- @@ -155,7 +155,7 @@ ADR-0088's three clauses, each on a fact measured above: - **Grammar.** A `form` name is the dot-required qualified name the view item uses today (`packages/spec/src/ui/view.zod.ts#ViewItemNameSchema`). The part before the last segment **must equal `object`**; a mismatch is refused at parse. The view item never enforced that equality; the new type does from its first release. - **Why this name.** It is the name every form is served under today — a stored item's own `name`, and for a container's form the name `expandViewContainer` gives it. An action's `target`, a `/forms/:name` link, a `.custom` override's key and the withdrawal judgement's identity are all this string. Keeping it means the migration renames nothing, and a withdrawal recorded against a name keeps closing that name ([D6](#d6)). Under ADR-0150 D1 it is an object-derived literal name, the bucket `view` is in; `form` takes the same bucket and no (package, name) resolution. -- **Separate from lists.** After the split a list `crm_lead.all` and a form `crm_lead.all` are items of two types and do not collide. Until the old shapes are tombstoned they still share the `view` type's name space wherever the old shapes are stored, and the container name-collision refusal keeps judging them there. For the same period one write is refused, as a temporary exception to that sentence: a package-less list is not saved at a name a read-only package authors as a form, as an item or through a container's expansion ([D5](#d5)). A list in a package is another item beside the form from the first release. +- **Separate from lists.** After the split a list `crm_lead.all` and a form `crm_lead.all` are items of two types and do not collide. Until the old shapes are tombstoned they still share the `view` type's name space wherever the old shapes are stored, and the container name-collision refusal keeps judging them there. From card ②, and for as long as rule 11's replacement check is kept ([D5](#d5)), one write is refused, as an exception to that sentence: a package-less list is not saved at a name a read-only package authors as a form, as an item or through a container's expansion ([D5](#d5)). A list in a package is another item beside the form from the first release. - **One form per name per package.** Inside a base's dependency closure ADR-0146 D2's rule applies unchanged: an undeclared same-name item of a dependent is refused at publish. - **The public address (slug) is a second identity**, declared in `sharing.publicLink`. Two different forms on one slug are not refused today. By [ruled question 3](#q3) the `form` write door, `os validate` and publish refuse it. @@ -169,31 +169,32 @@ The name is ruled ([question 2](#q2)); the alternative not taken is a short name - **Whole-document replace stands.** The switch-only override Setup writes is the base's whole document with one key changed; `ui/packages/app-shell/src/views/setup/publicForms.ts#overrideHoldsOnlySwitch` is how the page tells such an override from a redesign. - **`form` is not a security-catalog type** (ADR-0146 D6): the anonymous grant is derived from the resolved form's object at the door (ADR-0138 D2), not held by name in the security catalog. What an override may do to anonymous intake is bounded by [D6](#d6), not by excluding the type. -### D5 — Adding the type is additive: one projection reads the three old shapes {#d5} +### D5 — Adding the type is additive, with one write narrowed: one projection reads the three old shapes {#d5} From the release that adds the type until the next protocol major: - **The projection.** One pure function in `packages/spec` — beside `expandViewContainer`, built on it — turns a `view` body into the `form` items it carries: the container's `form`, each `formViews` entry, and a `viewKind: 'form'` item's `config`. Each projected item takes the name it is served under today, `object` from the old four-rung resolution, and the body unchanged. It is the **only** reader of the old shapes for form content: the loader, the stored-row read, the anonymous doors, the withdrawal judgement and the lint all call it, and none re-reads `formViews` by hand. -- **For the served `form` read the projection reads served rows only.** 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, in any binding; it stays in the withdrawal layer, where a row may only narrow ([D6](#d6) rules 4 and 5). ⛔ An implementation that projects every stored `view` row serves forms no door answers today. - - **The case this 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.** Today the package's row takes the slot, the effective `view` list holds the list, no layer reads the package-less row, and both doors answer `404`. From card ②'s release the answer is the same: the package-less form is not served. It is not served because the row is passed over, and not because the list is read as written over a form: the list is the package's own item and closes nothing of its package's. - - **This is the old shapes' shared name space, not a new collision.** [D3](#d3) keeps a list and a form of one name apart as items of two types, and says the old shapes still share the `view` type's name space wherever they are stored. Both rows here are `view` rows. So the rule also holds for a list saved into a writable package after card ② at the name of a package-less old-shape form: the save closes that form, as it does today. A form authored or stored as a `form` item is not passed over by a `view` row of any name. - - **Cost and way out.** The cost is nothing a door answers today. The rows cannot be told from two items their administrator means to keep, so nothing moves the form: [D7](#d7), D7-d says what the ceremony and the precheck do with the pair. - - **Pin card ② owes, 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 card ②'s change and after it (ablate: project every stored `view` row into the `form` read, and the address answers). +- **For the served `form` read the projection reads served rows only, and "served" is asked at each package's address.** A stored `view` row enters the effective `form` read through the projection only where the served-row order serves that row today. The order is asked per package address, inside the `form` read's own resolution over both types (the bullet "A stored old-shape row keeps replacing its base's form", below). ⛔ It is 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, at the same name: a package-less row is in every package's order. A row passed over at an address is projected into no served read at that address, in any binding; it stays in whichever withdrawal layer reads it today, where a row may only narrow ([D6](#d6) rules 4 and 5). + - ⛔ **Two implementations this rules out.** One that projects every stored `view` row serves forms no door answers today. One that takes its served rows from the effective `view` list loses a row that still stands over a read-only package's form: once that package authors the form in `forms:` it has left the `view` type, the `view` merge no longer resolves its address, and the package's source `form` item would be served in place of the row that keeps the address closed. + - **The case this 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.** Today the package's row takes the slot at the package's address, the read there serves the list, no layer reads the package-less row, and both doors answer `404`. From card ②'s release the answer is the same: the package-less form is not served. It is not served because the row is passed over, and not because the list is read as written over a form: the list is the package's own item and closes nothing of its package's. + - **This is the old shapes' shared name space, not a new collision.** [D3](#d3) keeps a list and a form of one name apart as items of two types, and says the old shapes still share the `view` type's name space wherever they are stored. Both rows here are `view` rows. So the rule also holds for a list saved into a writable package after card ② at the name of a package-less old-shape form: at that package's address the list is served and the package-less row is passed over, as today. Where no read-only package's address serves the package-less row, the save closes its form. Where the row is the served row at a read-only package's address, because it stands over that package's form, it stays the served body of that form there, whatever a writable package holds at the name: a link-less row that keeps a base's address closed keeps it closed after the list is saved. A form authored or stored as a `form` item is not passed over by a `view` row of any name. + - **Cost.** The cost is nothing a door answers today. The rows cannot be told from two items their administrator means to keep, so nothing moves the form: [D7](#d7), D7-d says what the ceremony does with the pair, and by the ruling recorded beside [question 4](#q4) the row stays as stored. + - **Pin card ② owes, 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 card ②'s change and after it (ablate: project every stored `view` row into the `form` read, and 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, and the address answers). - **`form` reads serve authored items and projected ones.** A projected item is marked as such in its read envelope so a surface can say "defined in a view" and offer the move. - **An authored `form` item shadows a projected one of the same name in the same package, inside one layer.** A package's source `form` item shadows the projection of that package's own source; a stored `form` row shadows the projection of a stored row at the same address. It never shadows a withdrawal ([D6](#d6)). ⛔ A package's source item never shadows the projection of a **stored** row: stored over source is the layering order whichever type each side is written in (next bullet). - **A stored old-shape row keeps replacing its base's form when the base moves to `form`.** Today a stored `view` row that stands over a package's form replaces it whole: a declared override in the pair, a row bound to the package, a package-less row, or a stored container whose expansion writes the name. The merge that does it runs inside one type (`packages/metadata-protocol/src/protocol-overlay-merge.ts#mergePackageAwareOverlay`). A package may move its source to `forms:` while the stored row is still a `view` row, and card ④ does exactly that to first-party apps. So the effective `form` read resolves a package's form over both types, in the one served-row order (`packages/metadata-protocol/src/protocol-overlay-merge.ts#servedOverlayRowCandidates`): the stored `view` row that order picks at the package's address is served, as the `form` item it projects, over the package's source `form` item of that name — as it is served over the package's old-shape form today. A stored `form` row at the same place in the order wins over the stored `view` row, and the `form` write of the bullet below removes the latter. A stored `view` row that carries no form at the name is the next bullet's. [D6](#d6) rule 11 says what this protects. - **A stored `view` row that carries no form at a form's name is read as written over the form only in the bindings where no write can put it there beside the form.** [D3](#d3) makes a list and a form of one name two items, so a list row closes nothing by sharing a form's name. Inside the one type it does today: a row at a package's address replaces whatever the package ships under the name. The `form` read keeps that answer — nothing is served for the name from that package until [D7](#d7) gives the row its disposition — for three bindings and for no other row. Two are closed by a write door that exists today; the third is closed by a refusal card ② adds: - 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`, `packages/metadata-protocol/src/protocol-packaged-base-refusal.ts#judgeOverrideWrite`), so a `view` override was declared while the package shipped the name as a `view` item; - a row **bound to a read-only package**. Once the package ships the name as a `form` item and not as a `view` item, a `view` save that names the package at that name is a new item in a read-only package, and that is refused (ADR-0070 D1, `WRITABLE_PACKAGE_REQUIRED`). So a row of this binding at the name was stored while the package shipped the name as a `view` item: the class `packages/metadata-protocol/src/protocol-packageless-overlay-migration.ts` carries as rows bound to a read-only base. This is exact for the name after the move, and only there. Before the move the close of saves that name a read-only package leaves a base with no pair open; a row saved through that corner was saved over the form, which is the reading; - - a **package-less row**: an item, or a stored container whose expansion writes the name. ⛔ No door of today closes this binding for a form's name. ADR-0146 D11's close (`packages/metadata-protocol/src/protocol-packaged-base-refusal.ts#packagelessOverlayWriteRefusal`) refuses a package-less write only where its ceremony would move the row, and by its contract leaves the rest open: a name several read-only packages ship, a base whose pair cannot be formed or ensured, a container-shaped body, a row whose pair already holds the item. The container name-collision refusal in `packages/metadata-protocol/src/protocol-save.ts` judges the names a package ships as `view` items. Neither judges a name the package ships as a `form` item. **So card ② adds one refusal of its own, until major 19**: every package-less `view` write that would store a list at a name a read-only package **authors** as a `form` item is refused. + - a **package-less row**: an item, or a stored container whose expansion writes the name. ⛔ No door of today closes this binding for a form's name. ADR-0146 D11's close (`packages/metadata-protocol/src/protocol-packaged-base-refusal.ts#packagelessOverlayWriteRefusal`) refuses a package-less write only where its ceremony would move the row, and by its contract leaves the rest open: a name several read-only packages ship, a base whose pair cannot be formed or ensured, a container-shaped body, a row whose pair already holds the item. The container name-collision refusal in `packages/metadata-protocol/src/protocol-save.ts` judges the names a package ships as `view` items. Neither judges a name the package ships as a `form` item. **So card ② adds one refusal of its own, kept as long as the reading it protects**: every package-less `view` write that would store a list at a name a read-only package **authors** as a `form` item is refused. - **What it covers.** A save, the publish of a draft, and a rollback to a version that carries a list at the name; of an item, and of a container whose expansion writes the name, judged on the expansion as the readers place it (the way the container name-collision refusal judges one). It does not ask the state of the base's pair or how many packages ship the name. A re-save of a row already stored is refused too; the stored row keeps its bytes. A delete is not judged: it stores nothing. - **What triggers it.** The name is one 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: there the name is still a `view` item's, and today's doors judge the write as they do now. - **It refuses saves that are admitted today.** Where a package's form is an old-shape `view` item, a package-less list saves at its name today in the cases ADR-0146 D11's close leaves open: 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, which neither the close nor the container name-collision refusal judges. Once the package authors the name as a `form` item, each of these is refused. An administrator who holds such a list can no longer edit it in place; a container is refused at every re-save until the member is renamed. That narrows what an administrator can save. It is small and it is meant: the list keeps a door (the next sub-bullet), a save that carries a form at the name is untouched, and the alternative is the corner the refusal closes — a list saved after the move that the read cannot tell from one written over the form. So card ② is `Metadata-protocol: narrowed` ([Execution plan](#execution-plan-after-acceptance)). The refusal reads a name only from the release in which a package authors it as a `form` item: for first-party apps that is card ④'s, for any other app its author's own. - **How it answers.** It sits beside the container name-collision refusal in the save door and answers with that refusal's envelope (`VALIDATION_ERROR`, `400`); no new `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. - **What it does not cover.** A package-less `view` write that carries a form at the name is an old-shape write of the form and saves as before (two bullets down); so does a rollback to a version that carries a form. A write that names a package is not package-less. - **So a list saved at a form's name after the package moved the form is never read as written over it.** Saved into a package — an app of the environment's own, or the base's pair as the pair's own item with no `overrides` — it is a list beside the form ([D3](#d3)), as an item or as a container's expansion alike: it is not in the base's served-row order, the form stays served, and the row is in no class that holds the upgrade ([D7](#d7)). Saved package-less it is refused. A row in a writable package is that package's own item and is never read as standing over that package's own form. A read-only package's own source is read the same way: a list its `views:` container expands at the name of its own `form` item is its list beside its form. - - **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 — cannot be told from one written over the form. It is read the same way, an item and a container's expansion alike. That is today's answer inside one type too: a package that ships an item under a name an environment row already holds is served that row. The cost is availability in that one deployment: the package's form is not served there, the form's layered read names the row that stands over it, and the row holds the upgrade (D7-c). - - **The reading and the refusal both end at major 19.** No deployment reaches it holding such a row ([D7](#d7)'s precheck), and from that release a `view` row is a list and nothing else. + - **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 — cannot be told from one written over the form. It is read the same way, an item and a container's expansion alike. That is today's answer inside one type too: a package that ships an item under a name an environment row already holds is served that row. The cost is availability in that one deployment: the package's form is not served there, the form's layered read names the row that stands over it, and the row gets no disposition of its own: it stays as stored and does not hold the upgrade (the ruling recorded beside [question 4](#q4)). + - **The reading and the refusal last as long as rule 11's replacement check, past major 19.** By the ruling recorded beside [question 4](#q4), a row of this reading is not moved and does not hold major 19, so it reaches the major as stored. What keeps its base's address closed there is the replacement check this record keeps ([D7](#d7), "After the major"), and the bounded reading stays with it. The refusal stays too: without it a package-less list saved after the major at a form's name could not be told from a row written over the form. Card ⑤ removes neither; both leave in the release that removes the check. - **Pins card ② owes for this bullet, each with an ablation.** - (a) The bound. Over a package that authors an open `form` item: a list saved package-less at the form's name is refused (status and `code`); a package-less container whose expansion writes a list at that name is refused; 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 (let 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`. - (b) 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; 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). If card ②'s measurement ([D7](#d7), D7-b) finds a door that admits a declared override carrying no form, this pin gains that row as a fixture in the same change. @@ -249,7 +250,7 @@ Each pin asserts the refusal's status and `code` and that no record was written, - **It does not stay: `os validate` refuses it.** `os validate` sees both packages. An item that declares an override of a form its base ships in neither type is an error and not a warning — the grade the override write gate gives today to a declaration of an item its base does not ship (`declared_package_ships_no_such_item`, `packages/metadata-protocol/src/protocol-packaged-base-refusal.ts#judgeOverrideWrite`). "Ships" is read over both types, through the projection, so an override of a base that still authors an old shape passes. The message names the base and the two ways out: remove the item (a record form's layout belongs to the object's `fieldGroups`), or correct the name. Only there is a removal offered, and only because the base ships no form of that name, so no address depends on the item. `os migrate meta` lists it as an edit for the author. It is a refusal so that a record form's override cannot stay among the `form` items for good. - **The alternative not taken**: leave such an item where it is, in `views[]` with a structured TODO, as the `data.object` disagreement is left, and report it. Major 19 refuses the old shape, so an item left in place is out of the source until its author acts. Where the base's form is linked, the override that kept the address closed is then not shipped and the base's form is served — the item this record protects is the one the alternative drops. If the maintainer strikes the reading, this is the fallback, and it needs its own answer to that case before card ⑤ builds it. - **The ceremony and the precheck do read the base**: the package's own document in the deployment, in whichever type the package authors it. A row in a record-form slot, with no link and no action target, over a base whose form declares no link either is internal like its base. - - **A row that carries no form at a name its base ships as a linked form** (a list item saved over the name, say) has nothing to move. [D5](#d5) bounds which rows are read this way: a declared override, a row bound to a read-only base, or a package-less row. ⛔ A list saved in a package beside the form is not one of them: it is a list ([D3](#d3)), it holds nothing, and neither the ceremony nor the precheck names it. Whether a write door admits a declared override whose body carries no form over a form was not measured for this record; card ② measures it. A package-less row of the class needs no such door: a list that held the name before the package shipped anything under it is one ([D5](#d5)'s known limit). Rule 11 keeps the address closed in dual-read either way. For the migration the row is in the class that holds the upgrade (D7-c): the ceremony writes nothing for it, and its disposition goes to the maintainer before major 19 opens, with the kernel case below. That decision is owed whatever card ② measures, because the package-less row can exist without the door; the measurement says only whether the declared one can. + - **A row that carries no form at a name its base ships as a linked form** (a list item saved over the name, say) has nothing to move. [D5](#d5) bounds which rows are read this way: a declared override, a row bound to a read-only base, or a package-less row. ⛔ A list saved in a package beside the form is not one of them: it is a list ([D3](#d3)), it holds nothing, and neither the ceremony nor the precheck names it. Whether a write door admits a declared override whose body carries no form over a form was not measured for this record; card ② measures it. A package-less row of the class needs no such door: a list that held the name before the package shipped anything under it is one ([D5](#d5)'s known limit). Rule 11 keeps the address closed in dual-read either way. For the migration the row gets no disposition of its own, by the ruling recorded beside [question 4](#q4): 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, which this record keeps ("After the major"). The ruling stands whatever card ② measures; the measurement says only whether the declared row can exist. - The translation tails move with them ([D8](#d8)), by a second conversion on `translations`. - A D3 chain entry for major 19 carries the semantic half; `os migrate meta --from 18` lists the edits and `--write` applies the ones it can prove. @@ -261,8 +262,8 @@ Each pin asserts the refusal's status and `code` and that no record was written, - A **row bound to a read-only base** — a customization saved under the base's own id before that door closed, the class ADR-0146 D11's ceremony carries beside the package-less one (`packages/metadata-protocol/src/protocol-packageless-overlay-migration.ts`) — has the same destination: a declared `form` override in the base's pair, with its body as written (D7-b). - **(D7-d) Several stored rows of one form fold into one: the body kept is the one served today, and the fold only narrows.** More than one stored row of a form can head for one destination. Over a read-only base there are three, all bound for the pair's declared override: the pair's own override, a row bound to the base, and a package-less row. For a writable package there are two, bound for the package's own row: that row and a package-less row (the ensure door refuses a writable base with "customize it directly"). - **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 whichever type it is stored in. It lands on the destination as written: a body with no link stays without one. ⛔ The ceremony never decides this by the order it moves rows in, and never by which row reached the destination first. - - **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 (D7-b's row with nothing to move), nothing is served for the name today ([D5](#d5)), and the ceremony moves **no** row of that name. A form row behind it, bound to the base or package-less, stays where it is, and every stored row of the name holds the upgrade with the no-form row (D7-c), each named in the report. Moved alone, the form row would become the pair's override, first in the served-row order and ahead of the row that keeps the address closed. The same holds where the row picked is a declared `view` override that carries no form, if card ② finds a door for one: no form row behind it is moved into the pair, where a stored `form` row would win over it ([D5](#d5)). - - **A writable package's own list ahead of a package-less form row.** The same rule decides it, and the record says it by name because the list is not D7-b's row. The served row at the address is the package's own `view` row, which carries a list; the package-less row behind it carries a form no layer reads ([D5](#d5), "served rows only"). The ceremony moves **no** row of the name: moved to the package's own `form` row, the package-less body would be a `form` item of that package and would be served. The list is the package's own item: it is not an old-shape form row, it holds nothing, and neither the report nor the precheck names an action for it. The package-less form row is an old-shape form row the ceremony cannot move, so it holds the upgrade (D7-c) and the report names it, with the list that is served ahead of it. Its disposition is part of the decision owed to the maintainer before major 19 opens (D7-b): the record offers no deletion for a row that declares a link (D7-e), and no save that would serve it. + - **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 (D7-b's row with nothing to move), nothing is served for the name today ([D5](#d5)), and the ceremony moves **no** row of that name. 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. By the ruling recorded beside [question 4](#q4) none of them holds the upgrade; 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 ahead of the row that keeps the address closed. The same holds where the row picked is a declared `view` override that carries no form, if card ② finds a door for one: no form row behind it is moved into the pair, where a stored `form` row would win over it ([D5](#d5)). + - **A writable package's own list ahead of a package-less form row.** The same rule decides it, and the record says it by name because the list is not D7-b's row. The served row at the address is the package's own `view` row, which carries a list; the package-less row behind it carries a form no layer reads ([D5](#d5), "served rows only"). The ceremony moves **no** row of the name: moved to the package's own `form` row, the package-less body would be a `form` item of that package and would be served. The list is the package's own item: it is not an old-shape form row, it holds nothing, and neither the report nor the precheck names an action for it. The package-less form row stays as stored: by the ruling recorded beside [question 4](#q4) it gets no disposition of its own and does not hold the upgrade. The report names it as left in place, with the list that is served ahead of it, and offers no deletion for it (D7-e) and no save that would serve it. No layer reads it before the major or after it. **This is the rule at the writable package's address, and only there.** A package-less row that is also the served row at a read-only base's address, standing over that base's form, keeps at that address what [D7](#d7) gives it: its destination in the base's pair, or D7-c's hold where the pair cannot be ensured. - **Every other row of the form is folded into it and carries over 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 — not its link, not a switch that is on — so a body the read does not serve today is never served by the ceremony. The report names every row of the form, the one whose body was kept, and which one closes the form. - **Why the served order decides: a row bound to the base beside a package-less row.** The read serves the bound row today, in the effective list and in the base's per-package layer alike; the package-less row behind it is read by neither. Where the bound row has no link over a linked base, it closes the address by replacing the base's body (rule 11 of [D6](#d6)), and the package-less row may hold an open body. Both rows have the pair as destination, and the pair's override is first in the served-row order. Kept by the served order, the bound row's body is the pair's override and the address stays closed after `--apply`; the package-less body is folded and its open switch is not carried. - **A folded row's withdrawal that a layer reads today must keep closing.** The base's per-package layer reads the first of the bound row and the package-less row, under an open override of the pair. A withdrawal there closes the form today, and the fold carries it. @@ -276,7 +277,7 @@ Each pin asserts the refusal's status and `code` and that no record was written, - **(D7-e)** ⛔ In none of these cases does the precheck or the ceremony's report offer 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-b), and card ⑤ does not let such a row through. Deleting a switched-off form's row switches the form back on; deleting a link-less row over a linked base serves the base's form again. - History rows stay verbatim under the type they were written as (ADR-0087: the version layer is not converted); the new row's history starts with the move. - Internal record forms in stored rows are reported and left for the administrator to remove: an item-shaped row is deleted, a container that also holds lists is re-saved without that member. The set is the one defined above, all three parts: no `sharing.publicLink`, no action target, and not standing over a base form that declares a link. The ceremony deletes nothing it did not move. Removing a row of that set changes no door's answer: it steers nothing, it holds no switch because it has no link, and it replaces no linked body because its base has none. ⛔ That holds for this set only. A row with no link of its own that stands over a linked base is not in it (D7-b), and the report never lists one for removal. The precheck counts the internal ones like any other old-shape form row and names them with that action. -- The ceremony can be run from the release that adds the type. It **must** be run before a deployment moves to major 19: that release's upgrade refuses to proceed 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 (D7-c: its pair cannot be ensured, its body cannot be read, or it carries no form over a linked base) — naming the ceremony, each row, and the action for its class. +- The ceremony can be run from the release that adds the type. It **must** be run before a deployment moves to major 19: that release's upgrade refuses to proceed 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 (D7-c: its pair cannot be ensured, or its body cannot be read) — naming the ceremony, each row, and the action for its class. Two kinds of row are not counted, by the ruling recorded beside [question 4](#q4): 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. They stay as stored and the upgrade proceeds with them. **What keeps a public address closed today, and the rule that carries it.** The break was tried once more for this record across the four stages, for every way a stored row can be the thing that keeps an address closed. Each cell names the rule that holds; "D6-n" is rule n of [D6](#d6). @@ -286,7 +287,7 @@ Each pin asserts the refusal's status and `code` and that no record was written, | **Setup's switch-off**: the same withdrawal, as a switch-only `.custom` override | as above; the re-pointed switch writes the `form` override in the transaction that clears the `view` one ([D5](#d5)) | D7-a | D7-a ("every switch Setup has written") | D7-e | as above | | **Removing the link over a linked base**: the body has no `publicLink`, or no `sharing` | D6-11: the row stays the served body when the base moves to `forms:` | D7-b: an item that declares `overrides` is moved whatever its body | D7-b: moved as the override it is, without a link; beside another row of the form, D7-d keeps the body served today; no pair, D7-c | D7-e, and never listed as internal | the `form` override replaces the base's form whole ([D4](#d4)); a survivor keeps replacing — rule 11's kept half, this record's own reading past question 4's scope and not the ruled exemption ("After the major", below) | | **Pointing the link at another address over a linked base**: the base's address closes, the new one opens | D6-11 for the base's address | D7-a | D7-a | D7-e | [D4](#d4); the new address is held under [question 3](#q3) | -| **Carrying no form at the name over a linked base**, in one of the three bindings [D5](#d5) bounds (a declared one: not measured whether a door admits it; a package-less one can predate the package's form) | D6-11 through [D5](#d5)'s bounded reading: nothing is served for the name from that package. A list saved in a package beside the form is not in this row | not converted: the item is not a form | D7-c: holds the upgrade, and every stored row of the name with it (D7-d); a decision before major 19 | D7-e | none: no deployment passes the precheck holding one, and from the major a `view` row is a list ([D3](#d3)); the reading ends there | +| **Carrying no form at the name over a linked base**, in one of the three bindings [D5](#d5) bounds (a declared one: not measured whether a door admits it; a package-less one can predate the package's form) | D6-11 through [D5](#d5)'s bounded reading: nothing is served for the name from that package. A list saved in a package beside the form is not in this row | not converted: the item is not a form | not moved, and no row of the name with it (D7-d); stays as stored, by the ruling beside [question 4](#q4) | not held; no deletion offered (D7-e) | the row keeps replacing: rule 11's kept check, with [D5](#d5)'s bounded reading ("After the major", below) | | **A body the projection cannot read** that names a link | D6-7 | refused by the schema before the conversion runs | D7-c: holds the upgrade | D7-e | D6-7's half of the kept reader (D7-f) | One path the table does not close, by design: an administrator who resets an override, or switches a form on, in Setup or through the `form` write door. That is the administrator's own act on the form, judged by the write-time rules of [D6](#d6) rule 9; no migration step performs it and none prescribes it. @@ -300,11 +301,12 @@ One path the table does not close, by design: an administrator who resets an ove - 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); - **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 — and the address answers); - **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); - - **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, and the report names the package-less row as holding the upgrade (ablate: fold the package-less form row into the package's own `form` row, as a row of that form, and the address answers); - - **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, and the report names both rows as holding the upgrade (ablate: leave the no-form row out of the fold — find the served row among form rows only — and the address answers); + - **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, as a row of that form, and the address answers); + - **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 — and the address answers); - each "before" half proves one of this record's readings of today's layers. If one is not as stated here, the card stops and reports; -- **the precheck refuses**: a deployment that holds a stored old-shape form row of each class (movable, internal, pair not ensurable, body not readable), or a stored row of the fifth class — one that carries no form over a linked base, in a binding [D5](#d5) bounds — 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 it names 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 by the precheck and does not hold the upgrade (ablate: [D5](#d5)'s bound); -- **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, and a stored old-shape row with no link over a package's open form still keeps that address closed (ablate: the exempt reader, then its replacement half); +- **the precheck refuses**: a deployment that holds 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 it names 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 by the precheck (ablate: [D5](#d5)'s bound); +- **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](#d5) bounds, and a package-less form row behind a writable package's list reaches major 19 with every one 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, and the base's address answers on the major-19 build); +- **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](#d5) bounds (ablate: the exempt reader, then its replacement half); - **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 is never deleted or moved package-less by `--apply` (ablate: the pair-refusal branch of the ceremony). **(D7-f) The withdrawal reader is exempt from the kit age-out** ([ruled question 4](#q4)). ADR-0087, as amended on 2026-10-26, lets a retired conversion and its tombstone leave the tree one major after they retire. The reader that finds a withdrawal in a stored old-shape body does not follow that clock: it stays as long as such a row can exist, and it is removed only by a release whose upgrade precheck has refused every deployment that still holds one. A withdrawal nobody reads would re-open a form, and that direction is never taken by a clean-up. **This record's own choice, stricter than the ruling:** major 19's upgrade carries such a precheck, so the ruling's words would let the reader leave in major 19. This record keeps it through major 19 — card ⑤ does not remove it — and leaves its removal to a later release with its own precheck ([question 4](#q4) marks the same choice, outside the ruled block). @@ -316,7 +318,7 @@ One path the table does not close, by design: an administrator who resets an ove - **Why**: an address closed by replacement is as closed to its administrator as one closed by a switch, and a clean-up schedule would open the first while the ruling keeps the second closed. - **What it goes past**: it widens, by one read, a scope the maintainer ruled by name. It is listed in TL;DR 10 and beside question 4 for the approver to accept or strike. - **The alternative not taken** is the ruled scope as written: the check is registered as kit on ADR-0087's clock and leaves one major after major 19; from then an old-shape row that arrives out of band over a package's form is not read, and the package's form is served. If the reading is struck, card ⑤ builds that, and the table above cites ADR-0087's clock where it cites this paragraph. -- **It does not cover the row that carries no form.** After the major a `view` row is a list ([D3](#d3)), and [D5](#d5)'s bounded reading has ended. +- **It covers the row that carries no form, in the bindings [D5](#d5) bounds.** By the ruling recorded beside [question 4](#q4) such a row reaches major 19 as stored, and this check is what keeps its base's address closed there. So [D5](#d5)'s bounded reading and card ②'s refusal stay as long as the check does. If the reading above is struck, the address of such a row opens when the check ages out: the ruling's answer rests on the check being kept, and striking it puts that question back to the maintainer. ### D8 — Translations: a `forms` family, the old form tails as fallback {#d8} @@ -371,7 +373,7 @@ Five cards, in this order. ⛔ None lands before this record is accepted. The de | ⑤ | Major 19: tombstone the three old shapes, the two conversions and the chain entry, the stored-row ceremony and the upgrade precheck, `view` reads lists only | `domain:spec` with `domain:server` | `narrowed` | ③ and ④ | - **② carries four of the five rulings as requirements** ([the questions](#the-five-merge-questions-as-ruled)): the `defineForm` factory with the Studio helper renamed `defineMetadataForm`, after measuring outside use of today's `defineForm` (question 1); the public-address clash refusal at the `form` write door, `os validate` and publish (question 3); the reader of old-shape withdrawals built as exempt from the kit age-out and anchored as such (question 4); the top-level document shape (question 5). Question 2 asks ② for no change: the name is the one served today. ⑤ carries question 4's other half, the upgrade precheck of major 19. -- **② is one releasable change.** Nothing an author wrote stops loading, and `view` reads and the shipped console behave as before. Old-shape writes save as before with one exception, which is why the card's value is `narrowed` and not `added`: a package-less `view` write that would store a list at a name a read-only package authors as a `form` item is refused ([D5](#d5)), and some of those saves are admitted today (several packages ship the name; the base has no pair; a re-save of a row its pair already holds; a container that overlays the package's own). By the rule for the line, a value refused is `narrowed`, and several kinds take `narrowed` over `added`. Card ②'s changeset names the refused saves and the door that remains (another key, or an app of the environment's own) beside the export break of question 1; the seat settles the `Clause-②:` arm at claim. The refusal bites for a name from the release in which a package authors it as a `form` item — card ④'s for first-party apps. Card ④ stays `none`: it moves sources and changes no rule. It owes [D6](#d6)'s pins and ablations (rule 11's replacement pin among them), [D5](#d5)'s pin that a `form` write leaves a list row of the same name untouched, the measurement of whether a write door admits a declared override that carries no form at a form's name ([D7](#d7), D7-b), the refusal of a package-less list at a form's name, items and container expansions alike, with [D5](#d5)'s two pins for the row that carries no form (the bound, and the closed reading), the showcase's `examples/app-showcase/src/coverage.ts#KIND_COVERAGE` row (its coverage test holds exact registry membership), and the same-change override row of [D4](#d4). The showcase's one authored `form` item is a new form, not a move of one the console opens today: moving one waits for ③, for the reason in the ④ bullet below. +- **② is one releasable change.** Nothing an author wrote stops loading, and `view` reads and the shipped console behave as before. Old-shape writes save as before with one exception, which is why the card's value is `narrowed` and not `added`: a package-less `view` write that would store a list at a name a read-only package authors as a `form` item is refused ([D5](#d5)), and some of those saves are admitted today (several packages ship the name; the base has no pair; a re-save of a row its pair already holds; a container that overlays the package's own). By the rule for the line, a value refused is `narrowed`, and several kinds take `narrowed` over `added`. Card ②'s changeset names the refused saves and the door that remains (another key, or an app of the environment's own) beside the export break of question 1; With `narrowed`, the `Clause-②:` line carries the `(narrowing)` arm: the changeset gate reads `narrowed` beside a line without it as a contradiction, and the arm brings the title's `!` and the dogfood battery. Only its `yes` or `no` is the seat's at claim. The changeset's one ADR-0087 disposition marker, for the export break and the refusal together, is a registered semantic entry or a category that rests on a checked fact: on a declared narrowing the `not-required (no-migration-prescription)` category is refused. The refusal bites for a name from the release in which a package authors it as a `form` item — card ④'s for first-party apps. Card ④ stays `none`: it moves sources and changes no rule. It owes [D6](#d6)'s pins and ablations (rule 11's replacement pin among them), [D5](#d5)'s pin that a `form` write leaves a list row of the same name untouched, the measurement of whether a write door admits a declared override that carries no form at a form's name ([D7](#d7), D7-b), the refusal of a package-less list at a form's name, items and container expansions alike, with [D5](#d5)'s two pins for the row that carries no form (the bound, and the closed reading), the showcase's `examples/app-showcase/src/coverage.ts#KIND_COVERAGE` row (its coverage test holds exact registry membership), and the same-change override row of [D4](#d4). The showcase's one authored `form` item is a new form, not a move of one the console opens today: moving one waits for ③, for the reason in the ④ bullet below. - **③ carries PR #36784's work.** #36444 stays paused until ③ is filed and then carries `Blocked-by:` ③. #36505 is closed (merged as `5c2d5cf2c4`); the public-forms part of its item 4 is superseded by this record and needs no card. - **④ runs after ③, not beside it.** [D5](#d5) freezes `view` reads to the old shapes, and until ③ lands the shipped console reads forms from `view`: `ui/apps/console/src/components/FormPage.tsx` reads `GET /api/v1/meta/view/:name`, and Setup's page lists type `view`. A first-party form moved to `forms:` before ③ would answer not found when its action opens it and would drop out of Setup's list, which takes its switch out of the administrator's reach. So ④ carries `Blocked-by:` ③ as well as ②, in both of its halves (HotCRM's waits for a release that carries both). After ④ no first-party source authors an old shape, which is what lets ⑤ measure "zero first-party" before it tombstones. - **⑤ is cut only when the maintainer opens major 19.** It is the one card that tombstones authored shapes and carries a migration and the chain entry in its changeset. It is not the only one with a breaking banner: ② carries one for the export change of question 1 and for the refusal above. @@ -491,6 +493,12 @@ Ruling-ref: [`7131569242`](https://github.com/objectstack-ai/objectstack/issues/ **A second point of this record on question 4, also not the ruling's words.** "Scope of the exemption" above is ruled: it is this one reader. [D7](#d7) ("After the major") keeps one more read on the same lifetime: rule 11's replacement check, which is not a withdrawal reader. That goes past the ruled scope. [D7](#d7) gives the reason and the alternative not taken (the check ages out on ADR-0087's clock, one major after major 19). It stands outside the ruled block for the same reason as the paragraph above. +**A later ruling of the maintainer, recorded here outside the ruled blocks of the five questions: two kinds of old stored row get no disposition.** Earlier heads of this record left one decision owed to the maintainer before major 19 opens: what the migration does with two kinds of stored row it cannot place. The first is a stored `view` row that carries no form over a linked base, in a binding [D5](#d5) bounds. The second is a package-less form row that no layer reads, behind a writable package's own list of the same name. The maintainer's words, verbatim: 「两类特殊的旧存储行怎么处置。不考虑」 (ruling record [`7136809727`](https://github.com/objectstack-ai/objectstack/issues/36868#issuecomment-7136809727) on #36868, recorded 2026-11-24T15:53Z). + +- **The owning seat's reading, as that record carries it; the maintainer may correct it.** These rows need no disposition of their own. The ceremony does not move them, the upgrade precheck does not hold major 19 for them, and they stay as stored. +- **No form that is closed today opens by it.** The first kind keeps its base's address closed through rule 11's replacement check, which this record keeps after the major ([D7](#d7), "After the major"). The second kind is read by no layer, before the major or after it ([D5](#d5), "served rows only"). +- **What follows in this record, and is this record's own.** [D5](#d5)'s bounded reading and card ②'s refusal last as long as the replacement check, past major 19. A form row left in place behind a no-form row over a read-only base stays as stored with it ([D7](#d7), D7-d). And the answer rests on the replacement check being kept, which is the fifth point of TL;DR 10: striking that point puts this question back. + ### 5. The document shape: body at the top level, or under `config` {#q5} - **A — `name`, `object` and the body keys at the top level** (ruled, [D2](#d2)). @@ -522,8 +530,8 @@ Ruling-ref: [`7131569242`](https://github.com/objectstack-ai/objectstack/issues/ - **A deployment must run a ceremony before major 19**, and that upgrade refuses without it. A stored row whose customization pair cannot be ensured holds the upgrade until the cause the precheck names is removed. Where the cause is the App's own manifest and the administrator does not author the App, the deployment stays on major 18 until the App ships a fix or is uninstalled ([D7](#d7)). - **A stored row that keeps a public address closed is never set aside as an internal record form**, whether it closes by a switch or by replacing its base's form. The migration moves it, and no report or precheck offers its removal ([D6](#d6) rule 11, [D7](#d7)). The price is one more read rule for the dual-read period, and a `.custom` source's overrides being moved by the conversion without a look at the base. `os validate` then refuses the one whose base ships no form of that name, so a record form's override does not stay among the `form` items (this record's reading of ruling item 3, [D7](#d7)). - **The ceremony can switch off a public form that is open today.** Where a stored row no layer reads today withdraws a form — a package-less row behind a writable package's own row, or behind a row bound to the base — the fold carries the withdrawal, and the form answers `404` after `--apply`. The report names it as newly closed, and the administrator switches it on again in Setup ([D7](#d7), D7-d). Where several stored rows of one form exist, the one whose body the read serves today is the one kept. -- **Until major 19 a package-less list is not saved at a name a read-only package authors as a form**, as an item or through a container's expansion. It is a refusal card ② adds and a temporary exception to [D3](#d3). **Some of these saves are admitted today**: where several packages ship the name, where the base has no pair, a re-save of a row its pair already holds, and a container that overlays the package's own container. An administrator who holds such a list can no longer edit it in place once the package authors the form. The door that remains: another key, or the list saved into an app of the environment's own. Card ② is `narrowed` for it. -- **A package-less form that no layer reads today stays unread.** Behind a writable package's own list of the same name it is not served from card ②'s release, the ceremony does not move it, and it holds the upgrade until the maintainer has decided its disposition ([D5](#d5), [D7](#d7), D7-d). A package-less list that held a name before a package shipped a form under it keeps that form unserved in that deployment and holds the upgrade until the maintainer has decided its disposition ([D5](#d5), [D7](#d7)). +- **From card ②, and for as long as rule 11's replacement check is kept, a package-less list is not saved at a name a read-only package authors as a form**, as an item or through a container's expansion. It is a refusal card ② adds and an exception to [D3](#d3) that outlasts major 19. **Some of these saves are admitted today**: where several packages ship the name, where the base has no pair, a re-save of a row its pair already holds, and a container that overlays the package's own container. An administrator who holds such a list can no longer edit it in place once the package authors the form. The door that remains: another key, or the list saved into an app of the environment's own. Card ② is `narrowed` for it. +- **Two kinds of stored row get no disposition of their own** (ruled; [question 4](#q4), the last paragraph after it). A package-less form that no layer reads today, behind a writable package's own list of the same name, stays unread: it is not served from card ②'s release and the ceremony does not move it. A row that carries no form over a linked base — a package-less list that held the name before the package shipped a form under it, say — keeps that form unserved in that deployment for as long as rule 11's replacement check is kept. Both stay as stored, and major 19 is not held for them. Serving the base's form in such a deployment is the administrator's own act on the row; no report prescribes it ([D5](#d5), [D7](#d7)). - **One arrangement served today is refused once it is in the new type**: a retired form that keeps its link beside its successor on the same address. The author clears the retired form's link ([question 3](#q3), this record's reading of "holds"). - **`defineForm` changes meaning** in card ② ([ruled question 1](#q1)): a declared, compiler-carried export break, on the premise that its outside use is platform-internal. The 17 Studio form modules change file suffix in the same card ([D2](#d2), the seat's routing). - **First-party work**: about 100 non-test source files and about 160 test files name the old shapes; they move in ②, ③ and ④ and the remainder falls to ⑤. @@ -571,4 +579,5 @@ The card cites positions read at `14f4d8f8`. Each was read again. The numbers be - Review records on PR #36957 at head `be1c0cbd4da`, both folded by the patch round after it: contract review [`7134054404`](https://github.com/objectstack-ai/objectstack/pull/36957#issuecomment-7134054404) (its S4 is D7-d's kept body, its S5 the marking of D7-b's conversion) and seat record [`7134079524`](https://github.com/objectstack-ai/objectstack/pull/36957#issuecomment-7134079524) (its S1 is TL;DR 10's five points, its S2 [D5](#d5)'s bound). - Review records on PR #36957 at head `c74ae94fe1a`: contract review [`7135096933`](https://github.com/objectstack-ai/objectstack/pull/36957#issuecomment-7135096933), folded by the patch round after it (its S6 is what [D5](#d5)'s refusal covers, its S7 the no-form row in D7-d), and seat record [`7134976464`](https://github.com/objectstack-ai/objectstack/pull/36957#issuecomment-7134976464). - Review record on PR #36957 at head `737f6f288c4`, folded by the patch round after it: contract review [`7136181190`](https://github.com/objectstack-ai/objectstack/pull/36957#issuecomment-7136181190) (its S8 is card ②'s `narrowed` value, its S9 the projection's "served rows only"). +- Review record on PR #36957 at head `102c857d0e9`, folded by the patch round after it: contract review [`7136878154`](https://github.com/objectstack-ai/objectstack/pull/36957#issuecomment-7136878154) (its S10 is "served" asked at each package's address). The same round folds ruling record [`7136809727`](https://github.com/objectstack-ai/objectstack/issues/36868#issuecomment-7136809727) on #36868. - Touching cards named by #36868: #36797 and #36798 (Studio rail and docs on named default and create forms — re-read against [D1](#d1)), #36860 (the metadata list columns row, [D9](#d9)). From d9a00e5acf546c27455be88c53241afe0a9c6061 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 24 Nov 2026 16:41:05 +0000 Subject: [PATCH 13/13] =?UTF-8?q?docs(adr):=20ADR-0159=20=E2=80=94=20three?= =?UTF-8?q?=20sentences=20brought=20in=20line=20with=20the=20later=20rulin?= =?UTF-8?q?g;=20the=20confirmation=20is=20cited?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Folds the delta contract review of head a9b2da75f7a (S11, N16 to N18, N20, N21). - D7 and D5: the sentences that still said no deployment reaches the major holding such a row, and that D7 gives the row a disposition - the paragraph after question 4 cites the maintainer's confirmation beside the ruling, says which rows the ruling names and which this record reads in, and what a later release owes - striking TL;DR 10's fifth point returns the later ruling to the maintainer, said where the point is offered Claude-Session: https://claude.ai/code/session_01QSeKYpEsWWE9Y5YtSsDgqZ Co-authored-by: Claude --- ...forms-are-form-items-view-is-lists-only.md | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md b/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md index 2d74a97ab83..413b5f28dc0 100644 --- a/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md +++ b/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md @@ -25,7 +25,7 @@ 2. **It passes ADR-0088's admission test on three consumers that exist today**: the anonymous form doors, an action of `type: 'form'`, and Setup's public-forms list. A record create or edit form is not `form` content ([D1](#d1)). 3. **Adding the type is additive, with one write narrowed.** From the release that adds it until the next protocol major, the loader projects the three old shapes into `form` items, `view` reads are unchanged, and nothing an author wrote stops loading. One package-less save is refused, and some forms of it are admitted today (items 9 and 10, [D5](#d5)). 4. **The anonymous doors and the withdrawal judgement read both types through one projection.** A form switched off in either type is closed in both; a stored row that closes an address by replacing its base's form keeps replacing it when the base moves to `form`; a stored body the projection cannot read closes the slugs it names ([D6](#d6)). -5. **The old shapes are tombstoned only in the next protocol major**, with an ADR-0087 conversion for sources and a ceremony for stored rows, `.custom` overrides included. A stored row that keeps a public address closed, by its switch or by replacing its base's form, is moved and is never deleted or offered for deletion ([D7](#d7)). +5. **The old shapes are tombstoned only in the next protocol major**, with an ADR-0087 conversion for sources and a ceremony for stored rows, `.custom` overrides included. A stored row that keeps a public address closed, by its switch or by replacing its base's form, is moved, or by the later ruling left as stored, and is never deleted or offered for deletion ([D7](#d7)). 6. **`form` is overridable by declaration** in the paired `.custom`, like `page` ([D4](#d4)). 7. **Translations get a `forms` family**; the form tails under `objects.OBJECT._views` are read as a fallback until the major ([D8](#d8)). 8. **Shipped work is kept and re-pointed**: Setup's page reads `form`, the paused designer becomes the `form` editor, the Studio Developer page and the Form-tab switch retire ([D9](#d9)). @@ -35,7 +35,7 @@ - a switched-off form that keeps its link still holds its address ([question 3](#q3), this record's reading of "holds"); - this record keeps the withdrawal reader through major 19, although the ruling would let it leave there ([question 4](#q4)); - the source conversion moves an item that declares `overrides` to `forms[]` whatever its body, which for a time puts a record form's override among the `form` items, past ruling item 3; `os validate` refuses the one whose base ships no form of that name ([D7](#d7), D7-b); - - rule 11's replacement check is kept after major 19 on the withdrawal reader's lifetime, past the "this one reader" that question 4 exempts ([D7](#d7), "After the major"; [question 4](#q4)). + - rule 11's replacement check is kept after major 19 on the withdrawal reader's lifetime, past the "this one reader" that question 4 exempts ([D7](#d7), "After the major"; [question 4](#q4)). Striking this returns the later ruling on the two kinds of row, named below, to the maintainer. Four more things are named here so they are read with them. The first three touch no ruled word; the fourth is a later ruling: - the fold of several stored rows closes a form that is open today, where a row no layer reads withdraws it ([D7](#d7), D7-d); @@ -171,7 +171,7 @@ The name is ruled ([question 2](#q2)); the alternative not taken is a short name ### D5 — Adding the type is additive, with one write narrowed: one projection reads the three old shapes {#d5} -From the release that adds the type until the next protocol major: +From the release that adds the type until the next protocol major; two things here last longer, and say so where they stand: - **The projection.** One pure function in `packages/spec` — beside `expandViewContainer`, built on it — turns a `view` body into the `form` items it carries: the container's `form`, each `formViews` entry, and a `viewKind: 'form'` item's `config`. Each projected item takes the name it is served under today, `object` from the old four-rung resolution, and the body unchanged. It is the **only** reader of the old shapes for form content: the loader, the stored-row read, the anonymous doors, the withdrawal judgement and the lint all call it, and none re-reads `formViews` by hand. - **For the served `form` read the projection reads served rows only, and "served" is asked at each package's address.** A stored `view` row enters the effective `form` read through the projection only where the served-row order serves that row today. The order is asked per package address, inside the `form` read's own resolution over both types (the bullet "A stored old-shape row keeps replacing its base's form", below). ⛔ It is 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, at the same name: a package-less row is in every package's order. A row passed over at an address is projected into no served read at that address, in any binding; it stays in whichever withdrawal layer reads it today, where a row may only narrow ([D6](#d6) rules 4 and 5). @@ -183,7 +183,7 @@ From the release that adds the type until the next protocol major: - **`form` reads serve authored items and projected ones.** A projected item is marked as such in its read envelope so a surface can say "defined in a view" and offer the move. - **An authored `form` item shadows a projected one of the same name in the same package, inside one layer.** A package's source `form` item shadows the projection of that package's own source; a stored `form` row shadows the projection of a stored row at the same address. It never shadows a withdrawal ([D6](#d6)). ⛔ A package's source item never shadows the projection of a **stored** row: stored over source is the layering order whichever type each side is written in (next bullet). - **A stored old-shape row keeps replacing its base's form when the base moves to `form`.** Today a stored `view` row that stands over a package's form replaces it whole: a declared override in the pair, a row bound to the package, a package-less row, or a stored container whose expansion writes the name. The merge that does it runs inside one type (`packages/metadata-protocol/src/protocol-overlay-merge.ts#mergePackageAwareOverlay`). A package may move its source to `forms:` while the stored row is still a `view` row, and card ④ does exactly that to first-party apps. So the effective `form` read resolves a package's form over both types, in the one served-row order (`packages/metadata-protocol/src/protocol-overlay-merge.ts#servedOverlayRowCandidates`): the stored `view` row that order picks at the package's address is served, as the `form` item it projects, over the package's source `form` item of that name — as it is served over the package's old-shape form today. A stored `form` row at the same place in the order wins over the stored `view` row, and the `form` write of the bullet below removes the latter. A stored `view` row that carries no form at the name is the next bullet's. [D6](#d6) rule 11 says what this protects. -- **A stored `view` row that carries no form at a form's name is read as written over the form only in the bindings where no write can put it there beside the form.** [D3](#d3) makes a list and a form of one name two items, so a list row closes nothing by sharing a form's name. Inside the one type it does today: a row at a package's address replaces whatever the package ships under the name. The `form` read keeps that answer — nothing is served for the name from that package until [D7](#d7) gives the row its disposition — for three bindings and for no other row. Two are closed by a write door that exists today; the third is closed by a refusal card ② adds: +- **A stored `view` row that carries no form at a form's name is read as written over the form only in the bindings where no write can put it there beside the form.** [D3](#d3) makes a list and a form of one name two items, so a list row closes nothing by sharing a form's name. Inside the one type it does today: a row at a package's address replaces whatever the package ships under the name. The `form` read keeps that answer — nothing is served for the name from that package for as long as the row stands and rule 11's replacement check is kept — for three bindings and for no other row. Two are closed by a write door that exists today; the third is closed by a refusal card ② adds: - 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`, `packages/metadata-protocol/src/protocol-packaged-base-refusal.ts#judgeOverrideWrite`), so a `view` override was declared while the package shipped the name as a `view` item; - a row **bound to a read-only package**. Once the package ships the name as a `form` item and not as a `view` item, a `view` save that names the package at that name is a new item in a read-only package, and that is refused (ADR-0070 D1, `WRITABLE_PACKAGE_REQUIRED`). So a row of this binding at the name was stored while the package shipped the name as a `view` item: the class `packages/metadata-protocol/src/protocol-packageless-overlay-migration.ts` carries as rows bound to a read-only base. This is exact for the name after the move, and only there. Before the move the close of saves that name a read-only package leaves a base with no pair open; a row saved through that corner was saved over the form, which is the reading; - a **package-less row**: an item, or a stored container whose expansion writes the name. ⛔ No door of today closes this binding for a form's name. ADR-0146 D11's close (`packages/metadata-protocol/src/protocol-packaged-base-refusal.ts#packagelessOverlayWriteRefusal`) refuses a package-less write only where its ceremony would move the row, and by its contract leaves the rest open: a name several read-only packages ship, a base whose pair cannot be formed or ensured, a container-shaped body, a row whose pair already holds the item. The container name-collision refusal in `packages/metadata-protocol/src/protocol-save.ts` judges the names a package ships as `view` items. Neither judges a name the package ships as a `form` item. **So card ② adds one refusal of its own, kept as long as the reading it protects**: every package-less `view` write that would store a list at a name a read-only package **authors** as a `form` item is refused. @@ -262,7 +262,7 @@ Each pin asserts the refusal's status and `code` and that no record was written, - A **row bound to a read-only base** — a customization saved under the base's own id before that door closed, the class ADR-0146 D11's ceremony carries beside the package-less one (`packages/metadata-protocol/src/protocol-packageless-overlay-migration.ts`) — has the same destination: a declared `form` override in the base's pair, with its body as written (D7-b). - **(D7-d) Several stored rows of one form fold into one: the body kept is the one served today, and the fold only narrows.** More than one stored row of a form can head for one destination. Over a read-only base there are three, all bound for the pair's declared override: the pair's own override, a row bound to the base, and a package-less row. For a writable package there are two, bound for the package's own row: that row and a package-less row (the ensure door refuses a writable base with "customize it directly"). - **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 whichever type it is stored in. It lands on the destination as written: a body with no link stays without one. ⛔ The ceremony never decides this by the order it moves rows in, and never by which row reached the destination first. - - **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 (D7-b's row with nothing to move), nothing is served for the name today ([D5](#d5)), and the ceremony moves **no** row of that name. 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. By the ruling recorded beside [question 4](#q4) none of them holds the upgrade; 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 ahead of the row that keeps the address closed. The same holds where the row picked is a declared `view` override that carries no form, if card ② finds a door for one: no form row behind it is moved into the pair, where a stored `form` row would win over it ([D5](#d5)). + - **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 (D7-b's row with nothing to move), nothing is served for the name today ([D5](#d5)), and the ceremony moves **no** row of that name. 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. The no-form row is one of the two kinds the ruling recorded beside [question 4](#q4) names; by this record's reading of that answer, a form row left behind a no-form row is not held either. None of them holds the upgrade; 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 ahead of the row that keeps the address closed. The same holds where the row picked is a declared `view` override that carries no form, if card ② finds a door for one: no form row behind it is moved into the pair, where a stored `form` row would win over it ([D5](#d5)). - **A writable package's own list ahead of a package-less form row.** The same rule decides it, and the record says it by name because the list is not D7-b's row. The served row at the address is the package's own `view` row, which carries a list; the package-less row behind it carries a form no layer reads ([D5](#d5), "served rows only"). The ceremony moves **no** row of the name: moved to the package's own `form` row, the package-less body would be a `form` item of that package and would be served. The list is the package's own item: it is not an old-shape form row, it holds nothing, and neither the report nor the precheck names an action for it. The package-less form row stays as stored: by the ruling recorded beside [question 4](#q4) it gets no disposition of its own and does not hold the upgrade. The report names it as left in place, with the list that is served ahead of it, and offers no deletion for it (D7-e) and no save that would serve it. No layer reads it before the major or after it. **This is the rule at the writable package's address, and only there.** A package-less row that is also the served row at a read-only base's address, standing over that base's form, keeps at that address what [D7](#d7) gives it: its destination in the base's pair, or D7-c's hold where the pair cannot be ensured. - **Every other row of the form is folded into it and carries over 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 — not its link, not a switch that is on — so a body the read does not serve today is never served by the ceremony. The report names every row of the form, the one whose body was kept, and which one closes the form. - **Why the served order decides: a row bound to the base beside a package-less row.** The read serves the bound row today, in the effective list and in the base's per-package layer alike; the package-less row behind it is read by neither. Where the bound row has no link over a linked base, it closes the address by replacing the base's body (rule 11 of [D6](#d6)), and the package-less row may hold an open body. Both rows have the pair as destination, and the pair's override is first in the served-row order. Kept by the served order, the bound row's body is the pair's override and the address stays closed after `--apply`; the package-less body is folded and its open switch is not carried. @@ -277,7 +277,7 @@ Each pin asserts the refusal's status and `code` and that no record was written, - **(D7-e)** ⛔ In none of these cases does the precheck or the ceremony's report offer 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-b), and card ⑤ does not let such a row through. Deleting a switched-off form's row switches the form back on; deleting a link-less row over a linked base serves the base's form again. - History rows stay verbatim under the type they were written as (ADR-0087: the version layer is not converted); the new row's history starts with the move. - Internal record forms in stored rows are reported and left for the administrator to remove: an item-shaped row is deleted, a container that also holds lists is re-saved without that member. The set is the one defined above, all three parts: no `sharing.publicLink`, no action target, and not standing over a base form that declares a link. The ceremony deletes nothing it did not move. Removing a row of that set changes no door's answer: it steers nothing, it holds no switch because it has no link, and it replaces no linked body because its base has none. ⛔ That holds for this set only. A row with no link of its own that stands over a linked base is not in it (D7-b), and the report never lists one for removal. The precheck counts the internal ones like any other old-shape form row and names them with that action. -- The ceremony can be run from the release that adds the type. It **must** be run before a deployment moves to major 19: that release's upgrade refuses to proceed 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 (D7-c: its pair cannot be ensured, or its body cannot be read) — naming the ceremony, each row, and the action for its class. Two kinds of row are not counted, by the ruling recorded beside [question 4](#q4): 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. They stay as stored and the upgrade proceeds with them. +- The ceremony can be run from the release that adds the type. It **must** be run before a deployment moves to major 19: that release's upgrade refuses to proceed 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 (D7-c: its pair cannot be ensured, or its body cannot be read) — naming the ceremony, each row, and the action for its class. Not counted are the two kinds of row the ruling recorded beside [question 4](#q4) names — a row that carries no form over a linked base, and a package-less form row no layer reads behind a writable package's own list — and, by this record's reading of that answer, a form row left behind a no-form row. They stay as stored and the upgrade proceeds with them. "Not counted" is asked per package address, as [D5](#d5) 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. **What keeps a public address closed today, and the rule that carries it.** The break was tried once more for this record across the four stages, for every way a stored row can be the thing that keeps an address closed. Each cell names the rule that holds; "D6-n" is rule n of [D6](#d6). @@ -313,11 +313,11 @@ One path the table does not close, by design: an administrator who resets an ove **After the major**: `ViewSchema` is lists (`list`, `listViews`), `ViewKindSchema` is `list` alone, and `anonymousFormObjectName`'s list rung is gone. The projection serves no content: no `form` read and no `view` read gets an item from it. Its other half stays in the tree with the exempt reader ([D6](#d6) rule 10): the read that finds a withdrawal in a stored old-shape body, and rule 7's closing of a body it cannot read. -**This record's own reading, past the scope question 4 rules: rule 11's replacement check keeps the withdrawal reader's lifetime.** [Question 4](#q4) exempts "this one reader", the reader of old-shape withdrawals, and lets ADR-0087's age-out stand for the rest of this record's kit. Rule 11's closing is not a withdrawal reader ([D6](#d6) rule 11 says so), so by the ruled scope it is kit and ages out one major after the old shapes retire. This record does not put it on that clock. It keeps the check after the major and gives it the reader's lifetime: it leaves in the release that removes the reader, by the same precheck, and not before. 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. No deployment that passed the precheck holds such a row; the check is there for a row that arrives out of band, and it only narrows. +**This record's own reading, past the scope question 4 rules: rule 11's replacement check keeps the withdrawal reader's lifetime.** [Question 4](#q4) exempts "this one reader", the reader of old-shape withdrawals, and lets ADR-0087's age-out stand for the rest of this record's kit. Rule 11's closing is not a withdrawal reader ([D6](#d6) rule 11 says so), so by the ruled scope it is kit and ages out one major after the old shapes retire. This record does not put it on that clock. It keeps the check after the major and gives it the reader's lifetime: it leaves in the release that removes the reader, by the same precheck, and not before. 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. A deployment that passed the precheck can hold one of the rows the later ruling leaves as stored ([question 4](#q4), the last paragraph after it); for those rows the check is what keeps the address closed, and for any other it is there for a row that arrives out of band. It only narrows. - **Why**: an address closed by replacement is as closed to its administrator as one closed by a switch, and a clean-up schedule would open the first while the ruling keeps the second closed. - **What it goes past**: it widens, by one read, a scope the maintainer ruled by name. It is listed in TL;DR 10 and beside question 4 for the approver to accept or strike. -- **The alternative not taken** is the ruled scope as written: the check is registered as kit on ADR-0087's clock and leaves one major after major 19; from then an old-shape row that arrives out of band over a package's form is not read, and the package's form is served. If the reading is struck, card ⑤ builds that, and the table above cites ADR-0087's clock where it cites this paragraph. +- **The alternative not taken** is the ruled scope as written: the check is registered as kit on ADR-0087's clock and leaves one major after major 19; from then an old-shape row that arrives out of band over a package's form is not read, and the package's form is served. If the reading is struck, card ⑤ builds that only after the maintainer has answered again for the rows the later ruling leaves as stored, and the table above cites ADR-0087's clock where it cites this paragraph. - **It covers the row that carries no form, in the bindings [D5](#d5) bounds.** By the ruling recorded beside [question 4](#q4) such a row reaches major 19 as stored, and this check is what keeps its base's address closed there. So [D5](#d5)'s bounded reading and card ②'s refusal stay as long as the check does. If the reading above is struck, the address of such a row opens when the check ages out: the ruling's answer rests on the check being kept, and striking it puts that question back to the maintainer. ### D8 — Translations: a `forms` family, the old form tails as fallback {#d8} @@ -373,7 +373,7 @@ Five cards, in this order. ⛔ None lands before this record is accepted. The de | ⑤ | Major 19: tombstone the three old shapes, the two conversions and the chain entry, the stored-row ceremony and the upgrade precheck, `view` reads lists only | `domain:spec` with `domain:server` | `narrowed` | ③ and ④ | - **② carries four of the five rulings as requirements** ([the questions](#the-five-merge-questions-as-ruled)): the `defineForm` factory with the Studio helper renamed `defineMetadataForm`, after measuring outside use of today's `defineForm` (question 1); the public-address clash refusal at the `form` write door, `os validate` and publish (question 3); the reader of old-shape withdrawals built as exempt from the kit age-out and anchored as such (question 4); the top-level document shape (question 5). Question 2 asks ② for no change: the name is the one served today. ⑤ carries question 4's other half, the upgrade precheck of major 19. -- **② is one releasable change.** Nothing an author wrote stops loading, and `view` reads and the shipped console behave as before. Old-shape writes save as before with one exception, which is why the card's value is `narrowed` and not `added`: a package-less `view` write that would store a list at a name a read-only package authors as a `form` item is refused ([D5](#d5)), and some of those saves are admitted today (several packages ship the name; the base has no pair; a re-save of a row its pair already holds; a container that overlays the package's own). By the rule for the line, a value refused is `narrowed`, and several kinds take `narrowed` over `added`. Card ②'s changeset names the refused saves and the door that remains (another key, or an app of the environment's own) beside the export break of question 1; With `narrowed`, the `Clause-②:` line carries the `(narrowing)` arm: the changeset gate reads `narrowed` beside a line without it as a contradiction, and the arm brings the title's `!` and the dogfood battery. Only its `yes` or `no` is the seat's at claim. The changeset's one ADR-0087 disposition marker, for the export break and the refusal together, is a registered semantic entry or a category that rests on a checked fact: on a declared narrowing the `not-required (no-migration-prescription)` category is refused. The refusal bites for a name from the release in which a package authors it as a `form` item — card ④'s for first-party apps. Card ④ stays `none`: it moves sources and changes no rule. It owes [D6](#d6)'s pins and ablations (rule 11's replacement pin among them), [D5](#d5)'s pin that a `form` write leaves a list row of the same name untouched, the measurement of whether a write door admits a declared override that carries no form at a form's name ([D7](#d7), D7-b), the refusal of a package-less list at a form's name, items and container expansions alike, with [D5](#d5)'s two pins for the row that carries no form (the bound, and the closed reading), the showcase's `examples/app-showcase/src/coverage.ts#KIND_COVERAGE` row (its coverage test holds exact registry membership), and the same-change override row of [D4](#d4). The showcase's one authored `form` item is a new form, not a move of one the console opens today: moving one waits for ③, for the reason in the ④ bullet below. +- **② is one releasable change.** Nothing an author wrote stops loading, and `view` reads and the shipped console behave as before. Old-shape writes save as before with one exception, which is why the card's value is `narrowed` and not `added`: a package-less `view` write that would store a list at a name a read-only package authors as a `form` item is refused ([D5](#d5)), and some of those saves are admitted today (several packages ship the name; the base has no pair; a re-save of a row its pair already holds; a container that overlays the package's own). By the rule for the line, a value refused is `narrowed`, and several kinds take `narrowed` over `added`. Card ②'s changeset names the refused saves and the door that remains (another key, or an app of the environment's own) beside the export break of question 1. With `narrowed`, the `Clause-②:` line carries the `(narrowing)` arm: the changeset gate reads `narrowed` beside a line without it as a contradiction, and the arm brings the title's `!` and the dogfood battery. Only its `yes` or `no` is the seat's at claim. The changeset's one ADR-0087 disposition marker, for the export break and the refusal together, is a registered semantic entry or a category that rests on a checked fact: on a declared narrowing the `not-required (no-migration-prescription)` category is refused. The refusal bites for a name from the release in which a package authors it as a `form` item — card ④'s for first-party apps. Card ④ stays `none`: it moves sources and changes no rule. It owes [D6](#d6)'s pins and ablations (rule 11's replacement pin among them), [D5](#d5)'s pin that a `form` write leaves a list row of the same name untouched, the measurement of whether a write door admits a declared override that carries no form at a form's name ([D7](#d7), D7-b), the refusal of a package-less list at a form's name, items and container expansions alike, with [D5](#d5)'s two pins for the row that carries no form (the bound, and the closed reading), the showcase's `examples/app-showcase/src/coverage.ts#KIND_COVERAGE` row (its coverage test holds exact registry membership), and the same-change override row of [D4](#d4). The showcase's one authored `form` item is a new form, not a move of one the console opens today: moving one waits for ③, for the reason in the ④ bullet below. - **③ carries PR #36784's work.** #36444 stays paused until ③ is filed and then carries `Blocked-by:` ③. #36505 is closed (merged as `5c2d5cf2c4`); the public-forms part of its item 4 is superseded by this record and needs no card. - **④ runs after ③, not beside it.** [D5](#d5) freezes `view` reads to the old shapes, and until ③ lands the shipped console reads forms from `view`: `ui/apps/console/src/components/FormPage.tsx` reads `GET /api/v1/meta/view/:name`, and Setup's page lists type `view`. A first-party form moved to `forms:` before ③ would answer not found when its action opens it and would drop out of Setup's list, which takes its switch out of the administrator's reach. So ④ carries `Blocked-by:` ③ as well as ②, in both of its halves (HotCRM's waits for a release that carries both). After ④ no first-party source authors an old shape, which is what lets ⑤ measure "zero first-party" before it tombstones. - **⑤ is cut only when the maintainer opens major 19.** It is the one card that tombstones authored shapes and carries a migration and the chain entry in its changeset. It is not the only one with a breaking banner: ② carries one for the export change of question 1 and for the refusal above. @@ -491,13 +491,14 @@ Ruling-ref: [`7131569242`](https://github.com/objectstack-ai/objectstack/issues/ **This record's own narrowing on question 4, not the ruling's words.** The ruling lets the reader leave "by a release whose upgrade precheck refuses a deployment still holding an old-shape form row", and major 19 is such a release: by the ruling alone, card ⑤ could remove the reader. This record does not take that leave ([D7](#d7)). Card ⑤ keeps the reader when it tombstones the old shapes, and removing it is neither card's work: it is a later release with its own precheck, and a new decision. The choice only narrows — the reader stays longer and nothing is licensed. It stands outside the ruled block so it is read as this record's, which the maintainer accepts with the record or strikes. -**A second point of this record on question 4, also not the ruling's words.** "Scope of the exemption" above is ruled: it is this one reader. [D7](#d7) ("After the major") keeps one more read on the same lifetime: rule 11's replacement check, which is not a withdrawal reader. That goes past the ruled scope. [D7](#d7) gives the reason and the alternative not taken (the check ages out on ADR-0087's clock, one major after major 19). It stands outside the ruled block for the same reason as the paragraph above. +**A second point of this record on question 4, also not the ruling's words.** "Scope of the exemption" above is ruled: it is this one reader. [D7](#d7) ("After the major") keeps one more read on the same lifetime: rule 11's replacement check, which is not a withdrawal reader. That goes past the ruled scope. [D7](#d7) gives the reason and the alternative not taken (the check ages out on ADR-0087's clock, one major after major 19). Striking this returns the later ruling on the two kinds of row, in the next paragraph, to the maintainer. It stands outside the ruled block for the same reason as the paragraph above. -**A later ruling of the maintainer, recorded here outside the ruled blocks of the five questions: two kinds of old stored row get no disposition.** Earlier heads of this record left one decision owed to the maintainer before major 19 opens: what the migration does with two kinds of stored row it cannot place. The first is a stored `view` row that carries no form over a linked base, in a binding [D5](#d5) bounds. The second is a package-less form row that no layer reads, behind a writable package's own list of the same name. The maintainer's words, verbatim: 「两类特殊的旧存储行怎么处置。不考虑」 (ruling record [`7136809727`](https://github.com/objectstack-ai/objectstack/issues/36868#issuecomment-7136809727) on #36868, recorded 2026-11-24T15:53Z). +**A later ruling of the maintainer, recorded here outside the ruled blocks of the five questions: two kinds of old stored row get no disposition.** Earlier heads of this record left one decision owed to the maintainer before major 19 opens: what the migration does with two kinds of stored row it cannot place. The first is a stored `view` row that carries no form over a linked base, in a binding [D5](#d5) bounds. The second is a package-less form row that no layer reads, behind a writable package's own list of the same name. The maintainer's words, verbatim: 「两类特殊的旧存储行怎么处置。不考虑」 (ruling record [`7136809727`](https://github.com/objectstack-ai/objectstack/issues/36868#issuecomment-7136809727) on #36868, recorded 2026-11-24T15:53Z). The owning seat then put to him the two kinds of row, the effect of the answer and its cost, and he confirmed the reading below, verbatim: 「同意」 (record [`7137033870`](https://github.com/objectstack-ai/objectstack/issues/36868#issuecomment-7137033870) on #36868, 2026-11-24T16:02Z). -- **The owning seat's reading, as that record carries it; the maintainer may correct it.** These rows need no disposition of their own. The ceremony does not move them, the upgrade precheck does not hold major 19 for them, and they stay as stored. +- **The reading, as the first record carries it and the second confirms it.** These rows need no disposition of their own. The ceremony does not move them, the upgrade precheck does not hold major 19 for them, and they stay as stored. - **No form that is closed today opens by it.** The first kind keeps its base's address closed through rule 11's replacement check, which this record keeps after the major ([D7](#d7), "After the major"). The second kind is read by no layer, before the major or after it ([D5](#d5), "served rows only"). -- **What follows in this record, and is this record's own.** [D5](#d5)'s bounded reading and card ②'s refusal last as long as the replacement check, past major 19. A form row left in place behind a no-form row over a read-only base stays as stored with it ([D7](#d7), D7-d). And the answer rests on the replacement check being kept, which is the fifth point of TL;DR 10: striking that point puts this question back. +- **What follows in this record, and is this record's own.** [D5](#d5)'s bounded reading and card ②'s refusal last as long as the replacement check, past major 19. The ruling record names two kinds of row; by this record's reading of that answer, a form row left behind a no-form row over a read-only base stays as stored with it and is not held either ([D7](#d7), D7-d). And the answer rests on the replacement check being kept, which is the fifth point of TL;DR 10: striking that point puts this question back. Only this bullet is still open to correction. +- **What a later release owes.** The ruling narrows which rows major 19's precheck counts, and two of the uncounted kinds are old-shape form rows. So the release that one day removes the withdrawal reader, or the replacement check, owes its own answer for these rows: major 19's precheck no longer refuses a deployment that holds them. Nothing opens meanwhile: this record keeps the reader through major 19, and the uncounted form rows are read by no layer or stand behind a row the check keeps closed. ### 5. The document shape: body at the top level, or under `config` {#q5} @@ -528,7 +529,7 @@ Ruling-ref: [`7131569242`](https://github.com/objectstack-ai/objectstack/issues/ - **Until major 19 there are two readers of form content** (the type and the projection). The cost is bounded by the rule that the projection is the only reader of the old shapes. - **The anonymous doors read two types for at least one major.** [D6](#d6)'s pins are the price; a withdrawal is honoured in both. - **A deployment must run a ceremony before major 19**, and that upgrade refuses without it. A stored row whose customization pair cannot be ensured holds the upgrade until the cause the precheck names is removed. Where the cause is the App's own manifest and the administrator does not author the App, the deployment stays on major 18 until the App ships a fix or is uninstalled ([D7](#d7)). -- **A stored row that keeps a public address closed is never set aside as an internal record form**, whether it closes by a switch or by replacing its base's form. The migration moves it, and no report or precheck offers its removal ([D6](#d6) rule 11, [D7](#d7)). The price is one more read rule for the dual-read period, and a `.custom` source's overrides being moved by the conversion without a look at the base. `os validate` then refuses the one whose base ships no form of that name, so a record form's override does not stay among the `form` items (this record's reading of ruling item 3, [D7](#d7)). +- **A stored row that keeps a public address closed is never set aside as an internal record form**, whether it closes by a switch or by replacing its base's form. The migration moves it, or by the later ruling leaves it as stored, and no report or precheck offers its removal ([D6](#d6) rule 11, [D7](#d7)). Where a form row stands behind a no-form row, removing the row in front before the major serves the row behind it and not the base's form; the report names both. The price is one more read rule for the dual-read period, and a `.custom` source's overrides being moved by the conversion without a look at the base. `os validate` then refuses the one whose base ships no form of that name, so a record form's override does not stay among the `form` items (this record's reading of ruling item 3, [D7](#d7)). - **The ceremony can switch off a public form that is open today.** Where a stored row no layer reads today withdraws a form — a package-less row behind a writable package's own row, or behind a row bound to the base — the fold carries the withdrawal, and the form answers `404` after `--apply`. The report names it as newly closed, and the administrator switches it on again in Setup ([D7](#d7), D7-d). Where several stored rows of one form exist, the one whose body the read serves today is the one kept. - **From card ②, and for as long as rule 11's replacement check is kept, a package-less list is not saved at a name a read-only package authors as a form**, as an item or through a container's expansion. It is a refusal card ② adds and an exception to [D3](#d3) that outlasts major 19. **Some of these saves are admitted today**: where several packages ship the name, where the base has no pair, a re-save of a row its pair already holds, and a container that overlays the package's own container. An administrator who holds such a list can no longer edit it in place once the package authors the form. The door that remains: another key, or the list saved into an app of the environment's own. Card ② is `narrowed` for it. - **Two kinds of stored row get no disposition of their own** (ruled; [question 4](#q4), the last paragraph after it). A package-less form that no layer reads today, behind a writable package's own list of the same name, stays unread: it is not served from card ②'s release and the ceremony does not move it. A row that carries no form over a linked base — a package-less list that held the name before the package shipped a form under it, say — keeps that form unserved in that deployment for as long as rule 11's replacement check is kept. Both stay as stored, and major 19 is not held for them. Serving the base's form in such a deployment is the administrator's own act on the row; no report prescribes it ([D5](#d5), [D7](#d7)).