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 413b5f28dc0..468fda42d84 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). **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. +**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. **Revised 2026-11-25** to record five maintainer rulings and two seat decisions made after PR #36957 merged (ruling record [`7142585849`](https://github.com/objectstack-ai/objectstack/issues/36868#issuecomment-7142585849) on #36868, 2026-11-24T19:46Z, and its addendum [`7142658348`](https://github.com/objectstack-ai/objectstack/issues/36868#issuecomment-7142658348), 19:49Z; the words are under "Decided by"): the type is added in major 19 and no release carries the dual-read; the major's upgrade command runs the stored-row ceremony and then switches, all or nothing; that upgrade removes stored internal record forms; the major's release notes lead with #36425's effect; HotCRM moves its sources with its own bump to the major. Each revised sentence carries the record's id and the ruling's number, and nothing else in this record is re-opened. - **Date**: 2026-11-24 - **Decided by**: the maintainer, 2026-11-24, verbatim and untranslated, as the card and the two ruling records carry them: @@ -9,6 +9,13 @@ - 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. + - 2026-11-24, after this record merged (PR #36957), on its release sequencing and on stored internal record forms; entered here by the revision of 2026-11-25. Rulings 1 to 4 are in ruling record [`7142585849`](https://github.com/objectstack-ai/objectstack/issues/36868#issuecomment-7142585849) on #36868 (recorded 19:46Z), ruling 5 in its addendum [`7142658348`](https://github.com/objectstack-ai/objectstack/issues/36868#issuecomment-7142658348) (19:49Z): + 1. 「卡⑤ 不用暂缓,下一个版本就是大版本」 + 2. 「B:全部放进下一个大版本,升级命令先自动转换、再切换」 + 3. 「B(fable 推荐):升级时自动删除。」 + 4. 「要在发版说明里重点提示」 + 5. On HotCRM: 「HotCRM 的迁移跟着它升级到大版本那次一起做」「卡⑤ 不再等 HotCRM 卡,否则两边会互相等待。」 + - Two seat decisions stand under those rulings. They are the owning seat's, not the maintainer's words, and are in his veto window: the upgrade's move is all-or-nothing with the switch (`7142585849`); the ceremony's `--apply` is reached only from the upgrade command, and the standalone command is read-only (`7142658348`). - **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. @@ -23,7 +30,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, 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)). +3. **Adding the type is additive, with one write narrowed.** The release that adds the type is major 19 (`7142585849`, rulings 1 and 2). The dual-read exists on `main` between the cards' merges and in no release: there the loader projects the three old shapes into `form` items, `view` reads are unchanged, and nothing an author wrote stops loading. After the major the projection serves no content, and only the kept reader and rule 11's check remain ([D7](#d7), "After the major"). 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, 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)). @@ -42,6 +49,13 @@ - 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); - 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)). +11. **Revised 2026-11-25 by five later rulings** (ruling record `7142585849` and its addendum `7142658348`, verbatim under "Decided by"). Four changes: + - **one major**: no release between today's and major 19 carries the `form` type. Every card ships in the major, and the dual-read exists on `main` only (rulings 1 and 2; [D5](#d5), [D8](#d8), [Execution plan](#execution-plan-after-acceptance)); + - **convert, then switch**: the major's upgrade command runs the stored-row ceremony and then the precheck, and switches only when the precheck counts no row (ruling 2). The move is all-or-nothing with the switch, which is a seat decision ([D7](#d7)); + - **the upgrade removes stored internal record forms**, in the run that switches, and only those (ruling 3; [D7](#d7)); + - **the major's release notes lead with #36425's customer-visible effect** (ruling 4; [Execution plan](#execution-plan-after-acceptance)). + + HotCRM moves its sources with its own bump to the major, and the major-19 card does not wait on the HotCRM card (ruling 5; [Execution plan](#execution-plan-after-acceptance)). --- @@ -171,7 +185,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; two things here last longer, and say so where they stand: +The release that adds the type is major 19 (`7142585849`, rulings 1 and 2). What follows is the state of `main` between the cards' merges, and of no release; after the major the projection serves no content, and only the kept reader and rule 11's check remain ([D7](#d7), "After the 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). @@ -202,6 +216,7 @@ From the release that adds the type until the next protocol major; two things he - **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). - **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 ④. +- **The three "until the major" rules above — `view` reads unchanged, old-shape writes still saving, no notice and no new warning — are true of each card's change on `main`, and of no release** (`7142585849`, rulings 1 and 2). They stand as written: the cards are still built to them, so that each merge leaves `main` working. ### D6 — The anonymous doors and the withdrawal judgement read both types {#d6} @@ -220,6 +235,8 @@ This is the security-sensitive part. ADR-0138 D2 row 1 is unchanged: the admissi 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. +**Rule 7's boot line, as revised (`7142585849`, ruling 2). It is written here, outside the rules, and the rules stand as written.** The line names the row, the links it closed and the repair. It names the ceremony once the ceremony card has landed: the ceremony ships with the major and its upgrade command runs it, so `main` before that card has no ceremony to name. + **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); @@ -235,7 +252,7 @@ Each pin asserts the refusal's status and `code` and that no record was written, ### 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. +**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`. The type is added in the same major (`7142585849`, rulings 1 and 2). 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`.** @@ -254,7 +271,7 @@ Each pin asserts the refusal's status and `code` and that no record was written, - 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. +**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 ceremony the major's upgrade command runs: convert first, then switch (`7142585849`, ruling 2). An administrator can take the read-only run before upgrading. The write is reached only from the upgrade command, and the standalone command is read-only (a seat decision, addendum `7142658348`). It is idempotent and reports 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, 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). @@ -269,15 +286,16 @@ Each pin asserts the refusal's status and `code` and that no record was written, - **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. +- **(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 on the pre-upgrade release, which reads it as it does today — that release has no [D6](#d6) (`7142585849`, ruling 2, and the seat's all-or-nothing decision below) — 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 on the pre-upgrade release and runs the upgrade command again (`7142585849`, ruling 2); 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. "Stays on major 18" stands: it is the state of a deployment whose upgrade does not switch (`7142585849`, ruling 2). 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. - - **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. + - **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 on the pre-upgrade release both doors answer for it as they do today: rule 7 runs on `main` and on the major, not there. It leaves the class by an old-shape save that repairs the body, made on the pre-upgrade release; the upgrade command, run again, then moves it (`7142585849`, ruling 2). - **(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. 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. +- Internal record forms in stored rows are removed by the upgrade, in the run that switches (`7142585849`, ruling 3): an item-shaped row is deleted, a container that also holds lists is re-saved without that member, its lists byte-equal. The report names each removed form, writes out its body, and says per object that New and Edit now follow the object's field groups and whether it has any. History rows stay verbatim. A deployment that does not switch keeps every one. 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. Ruling 3 widens nothing: a row that declares a `sharing.publicLink`, or stands over a linked base, is never removed, and D7-e and the three-part test are unchanged. 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 does not count the internal ones as holding the upgrade; the read-only run lists them as "will be removed" (`7142585849`, ruling 3). +- The major's upgrade command runs the ceremony and then the precheck (`7142585849`, ruling 2). It switches when the precheck counts no row. It refuses to switch when the precheck counts one, naming each row and its action, and the deployment stays on the release it is running. What refuses is a row that holds the upgrade (D7-c: its pair cannot be ensured, or its body cannot be read). A row the ceremony can move does not refuse, and neither does an internal record form: the upgrade moves the one and removes the other (ruling 3). 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. +- **A seat decision, not the maintainer's words (`7142585849`; in his veto window): the upgrade's move is all-or-nothing with the switch.** A deployment that does not switch holds every stored row as it was. The pre-upgrade release has no `form` type and reads `view` rows only, so a switch-off moved to a `form` row there is read by nothing and the base's form answers. The decision rests on [ruled question 4](#q4). **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). @@ -290,6 +308,8 @@ Each pin asserts the refusal's status and `code` and that no record was written, | **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) | +The "Precheck" column stands as written after ruling 3 (`7142585849`): the upgrade's removal of stored internal record forms never reaches any row of this table. + 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): @@ -304,7 +324,8 @@ One path the table does not close, by design: an administrator who resets an ove - **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) 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 refuses**: a deployment that holds a stored old-shape form row of each stopping class (pair not ensurable, body not readable) does not reach major 19, and the refusal names the row and its action (`7142585849`, rulings 2 and 3: a movable row is moved and an internal one is removed, so neither is a stopping class); 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); +- **internal record forms are removed, and only those** (`7142585849`, ruling 3): after the run that switches, a stored internal record form is gone and the report names it with its body; a row with a link, or over a linked base, in the same slot is not removed, and both doors answer at its address as before (ablate: the link test of the internal set, then its base half, and the row is removed); - **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). @@ -327,7 +348,7 @@ One path the table does not close, by design: an administrator who resets an ove - `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 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. No release reads the fallback: it exists on `main` between card ② and the major-19 card (`7142585849`, rulings 1 and 2). `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. @@ -364,19 +385,25 @@ One path the table does not close, by design: an administrator who resets an ove 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. +**Revised 2026-11-25** (`7142585849`, rulings 1 and 2; addendum `7142658348`, ruling 5). Every card below ships in major 19; no release carries one without the others. ④ is cut as this repository's sources and docs, the published skill as its own card, and HotCRM's card. ⑤ is not held: it is cut now as two cards, ⑤a and ⑤b. + | # | 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` | `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 ④ | +| ④ | Sources and teaching, this repository's half: move the examples to `forms:`, their translation keys, and the docs | `domain:spec` (examples, docs) | `none` | ② and ③ | +| ④, the skill | The published skill teaches `forms:`; split from ④, because an implementation card's surface never includes `skills/**` | `domain:skills` | `none` | ② and ③ | +| ④, HotCRM | HotCRM moves its forms to `forms:` in the same change as its bump to the major (addendum `7142658348`, ruling 5) | HotCRM's lane | `none` | HotCRM's own bump to the major | +| ⑤a | The stored-row ceremony with the precheck report (`7142585849`, rulings 2 and 3) | `domain:server` | `none` | ② | +| ⑤b | Major 19: tombstone the three old shapes, the two conversions and the chain entry, the upgrade command that runs the ceremony and then switches, `view` reads lists only | `domain:spec` with `domain:server` | `narrowed` | ③, this repository's half of ④ (the skill's card included), and ⑤a. It does not wait on the HotCRM card (addendum `7142658348`, ruling 5) | - **② 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 landable change** (`7142585849`, rulings 1 and 2: it ships in major 19 and in no release before it). 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. +- **④ 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 each of this repository's cards. After this repository's half of ④ no first-party source here authors an old shape, which is what lets ⑤ measure "zero first-party" before it tombstones: the reading covers this repository. HotCRM moves its sources in the same change as its bump to the major, and ⑤ does not wait on the HotCRM card (addendum `7142658348`, ruling 5). +- **⑤ is not held, and is cut now as two cards** (`7142585849`, ruling 1). ⑤a is the stored-row ceremony with the precheck report. ⑤b is the major: it tombstones the old shapes and wires the ceremony into the upgrade command, which converts first and then switches (ruling 2). ⑤b 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. +- **⑤b's changeset leads its BREAKING section with #36425's customer-visible effect** (`7142585849`, ruling 4), because that change now reaches customers in the same release: New and Edit lay out by the object's field groups; a form's sections, tabs, wizard steps, create defaults and form-level required rules stop applying; nothing converts them. --- @@ -526,9 +553,9 @@ Ruling-ref: [`7131569242`](https://github.com/objectstack-ai/objectstack/issues/ - **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. 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)). +- **Two readers of form content exist on `main` only, until the major-19 card** (the type and the projection; `7142585849`, rulings 1 and 2: no release carries both). The cost is bounded by the rule that the projection is the only reader of the old shapes. +- **The anonymous doors read two types on `main` until the major-19 card, and keep the second type's withdrawal reader after it**, as D7-f says (`7142585849`, rulings 1 and 2). [D6](#d6)'s pins are the price; a withdrawal is honoured in both. +- **The major-19 upgrade runs the ceremony**, and refuses to switch only for a row it cannot move (`7142585849`, ruling 2). 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, 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. @@ -575,6 +602,7 @@ 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). +- Ruling record [`7142585849`](https://github.com/objectstack-ai/objectstack/issues/36868#issuecomment-7142585849) on #36868 and its addendum [`7142658348`](https://github.com/objectstack-ai/objectstack/issues/36868#issuecomment-7142658348) (2026-11-24): the major-release rulings 1 to 5 and two seat decisions, entered by the revision of 2026-11-25. - 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).