Skip to content

feat(spec)!: form is a metadata type of its own, and the form doors read a form over both types - #37422

Merged
os-alice merged 45 commits into
claude/project-thread-pu5dntfrom
claude/project-thread-pu5dnt-b
Nov 27, 2026
Merged

os-alice merged 45 commits into
claude/project-thread-pu5dntfrom
claude/project-thread-pu5dnt-b

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Alice · project thread

Fixes #37086 — PR B of the card's fixed 3,000-line cut, stacked on #37366 (the rename only). Merge #37366 first, then retarget this onto main. The two land together, because ADR-0159:109 anchors view.zod.ts#defineForm, and only this PR declares it again.

Clause-②: yes (narrowing)
Metadata-protocol: narrowed
Skills-docs: follow-up #37105

维护者速读

  • 用户能看到什么变化:开发者可以把公开表单单独定义成一种"表单"元数据;写在视图里的旧表单照常工作,公开表单的地址和回答都不变。
  • 为什么做:"表单成为独立元数据类型"系列的第二步,给后面 Setup 里的表单开关和表单设计器打基础。
  • 出错会怎样:碰到的是保存、发布或恢复被拒(公开地址已被另一个表单占用,或在只读包的表单名下放没有归属的列表),或公开表单打不开;已存数据不会被改写,可以整体撤回。
  • 要你做什么:无。

What changes

form becomes a metadata type of its own (ADR-0159 card ②, items 1, 2 and 4 to 10, as the card rules them):

  • spec
    • FormSchema derives every body key from FormViewSchema by reference. The name is OBJECT.KEY. data, viewKind, config, isDefault, order and scope are refused by name.
    • Also new: defineForm, the registry row (*.form.ts|yml|json), the stack's forms: and the forms translation family. The family reads forms.NAME first, with the _views title and thank-you tails as the fallback. A form's own section copy is forms.NAME.sections.SECTION.{label,description} and .fields.FIELD.{label,placeholder,helpText} (D8). Each key the form's node lacks reads objects.OBJECT._sections.SECTION, the object-level default.
    • One projection, projectViewForms, reads the three old view shapes. The intake layer is formIntakeLayer / openFormAt.
    • New error code FORM_ADDRESS_TAKEN, a liveness ledger form.json, and a semantic migration entry 18.form-type-define-form-and-packageless-list-at-form-name.
  • metadata-protocol
    • The effective form read resolves over both types in the served-row order (D5). Each address holds one definition. A package-less stored form row over a base that ships the form as an old shape is listed once, at the base's address, with the row's body.
    • A form left open on a held address is refused with 409 FORM_ADDRESS_TAKEN. The refusal applies on the save, on the publish of a draft whose address was taken after the draft was saved, and on a rollback to a version that is open on a held address.
    • A form save, publish, reset or delete removes, in the same transaction, only the package's old-shape row that carries that same form. Which forms a stored row carries, and under which names, is the form read's own answer (storedViewRowHoldings), so the write and the read name a stored container's members one way. This touches form content only: a list of that name, and a container member served under another name, stay byte-equal.
    • A package-less list at a name that a read-only package authors as a form is refused with 400. The refusal applies on the save, on the publish of a pre-gate draft and on restore.
    • After an old-shape removal, one registry heal (healOldShapeFormRowRemovals) restores the view registry for each removed row.
    • An unreadable stored body closes the links it names. It is reported once per process at error, the first time the form doors read it. There is no boot hook: a project kernel must not read sys_metadata view rows at boot.
    • getPackagedFormBase answers a form's packaged base: the authored form item, or else the form the base's view item projects.
    • An undo puts back the rows the publish moved: the undo of a package publish refused part-way on an engine that cannot roll back, and a commit revert, on every engine.
    • When one view row a commit edited cannot be put back, every form item of that commit is kept as published, and each is listed in the revert's failed[].
    • After a refused or undone publish, the doors and the meta reads answer only committed state.
  • rest
    • GET /forms/:slug and its submit read their candidates from ONE effective form read. They judge withdrawal across form and view, both effective and per-package (D6 rules 1 to 11). This narrows only.
    • The door keeps no second candidate source: a protocol that serves no form item serves no candidate.
    • GET /api/v1/meta/form/NAME refuses whoever /meta/view/NAME refuses, on the cached plain read as well as on the uncached read.
    • A form override's own changed text outranks the base's catalog, on /meta/form and on the public door (the form row of PACKAGED_BASE_ACCESSORS).
  • lint
    • New rules: form-public-address-taken (gating), form-consumer-less (advisory), form-object-outside-closure and form-object-unknown.
    • The i18n walker emits a form item's section copy at the form's own node, forms.NAME.sections.SECTION…, with the object-level _sections slot as each key's fallback address. The translation reference lint judges forms.NAME.sections.SECTION against the sections the form names, and .fields.FIELD against each section's entries (translation-target-unknown). A form the stack does not author is not judged.
  • metadata, metadata-core, objectql, runtime, cli
    • forms is loaded, typed, registered and counted for i18n coverage.
    • The coverage count and os i18n extract read the fallback address: a section translated at either address counts as translated, and extract writes no translated-locale scaffold over a translation the object-level slot holds.

Why

ADR-0159 card ②. The breaking surface is written out in .changeset/37086-form-metadata-type.md.

Measure-first answer (D7-b)

  • Over a base that authors a form item: a declared view list override at the form's name is refused with 403 NOT_OVERRIDABLE.
  • Over an old-shape base: the same override is admitted, and it closes the address.

Both cases are pinned in packages/rest/src/public-form-two-type-withdrawal.test.ts ("measure-first").

Rule 9: the premise is stale

D6 rule 9 asks that an organization-scoped form save be judged as the same view save is. On this tree, every organization-scoped write is refused before any other gate reads the body. packages/metadata-protocol/src/protocol-save.ts, saveMetaItemUnaudited:

[ADR-0131 D6] FIRST, before every other gate and every read: an organization-scoped write is refused for every type, draft or publish.

It calls refuseOrganizationScopedWrite. protocol-write-gates.ts#organizationScopedWriteRefusal returns null only for an empty organization; otherwise it returns 403 NOT_OVERRIDABLE. So no organization layer exists to hold a withdrawal, in either type. The pin "rule 9" holds the form save and the view save to the same answer: 403 NOT_OVERRIDABLE, nothing written, the doors still closed. protocol.org-scoped-write-refused.test.ts already enumerates DEFAULT_METADATA_TYPE_REGISTRY, so it covers form.

Door pins and ablations

The pins are in packages/rest/src/public-form-two-type-withdrawal.test.ts. The harness is a real ObjectQL engine with SqlDriver on :memory:, the real protocol and the real routes. Each door pin drives both doors: GET /forms/:slug and its submit.

First round (the head this PR opened at):

Ablation Removes Pins that go red
A1 view half of the layer 3, 5v, narrowing
A2 form half of the layer none (pin 2b, below, closes this)
A3 projection step 3, 5v, narrowing
A4 whole-item name match (replaced by slug equality) 4
A5f per-package form layer none
A5v per-package view layer 5v
A6 rule 7 (an unreadable body closes its links) 6
A7 cross-type resolution (D5) 7, 7 twin
A8 A1 + A7 3, 5v, 7, 7 twin, narrowing

Pin 1 stays green under A1 and A8, and pin 2 under A2: D5's cross-type resolution, or the candidate itself, already holds the withdrawal. That is why the second round adds pin 2b, where the form half is the only reader. A5f and the exempt reader are measured again in the third round (T3, T7 to T9).

Second round (this rework). Each run follows the same steps:

  1. Mutate the source on disk.
  2. Rebuild the package's dist that the harness reads.
  3. Run the whole harness file and record the red pins.
  4. Restore with git checkout and rebuild.
  5. Read git diff HEAD --stat (empty after every run).

No ablation was committed. No pin was weakened to get these readings.

Run Removes Pins that go red
R1 the form half of the layer (formIntakeLayer's loop over the forms) pin 2b, pin 2b twin, pin 5f
R2 served rows only: every stored view row projected served rows only (F1), pins 4 and 5v
R3 the served row taken from the effective view list, not the served-row order served rows only at the address (F2), both closed readings, pin 7
R4 the closed reading (a stored list falls through to the package's source form) both closed readings (list and container)
R5 the bound (the package-less list refusal) both bound pins, and the three refusal pins
R6 the expansion half of the bound the container refusal, the bound pin
R7 the form-content test of the old-shape row removal the list stays untouched; byte-equal across save, publish and reset; byte-equal across delete
R8 the projection half of the override gate's "ships" read the declared_package_ships_no_such_item pin (its CONTROL is refused), pin 2, narrowing, and the five pins that write a form override over an old-shape base
R9 projected items parsed as form items (data stripped, refused ones dropped) the data.object door pin, the /meta/form route pin
R10 the publish refusal the publish clash pin, the pre-gate list draft pin
R11 the restore refusal the restore pin
R12 the form row of PACKAGED_BASE_ACCESSORS the override's own text pin
R13 one definition per address (the package-less form row deferral) the one-definition pin
R14 form in the cached plain read's audience fold the /meta/form route pin
R15 forms.NAME.sections in translateForm (spec source; spec tests read the source, so there was no rebuild) i18n-resolver.form-item.test.ts "reads the form's own section node first"

The per-run proof (the mutation diff, the build exits, the red titles and the empty git diff HEAD) is below. In the diffs, angle brackets are written as ‹ › so the body's sanitizer keeps them.

R1, form-half: 3 of 48 red
  • The mutation, on disk in packages/spec/src/ui/form-intake-layer.ts (diff below). Rebuilt: the spec dist, exit 0.
  • The harness: 45 passed, 3 failed. The red pins are named in the table.
  • Restored with git checkout and rebuilt (exit 0). git diff HEAD --stat after: (empty).
--- packages/spec/src/ui/form-intake-layer.ts
@@ -63,7 +63,7 @@
-  for (const form of input.forms) {
+  for (const form of [] as ReadonlyArray‹unknown›) {
R2, every-stored-view-row: 3 of 48 red
  • The mutation, on disk in packages/metadata-protocol/src/protocol-form-reads.ts (diff below). Rebuilt: the metadata-protocol dist, exit 0.
  • The harness: 45 passed, 3 failed. The red pins are named in the table.
  • Restored with git checkout and rebuilt (exit 0). git diff HEAD --stat after: (empty).
--- packages/metadata-protocol/src/protocol-form-reads.ts
@@ -249,7 +249,7 @@
-    for (const view of views) {
+    for (const view of [...views, ...(await storedEntries(host, 'view')).map((e) =› ({ ...(e.data as object), ...(e.packageId ? { _packageId: e.packageId } : {}) }))]) {
R3, served-rows-from-view-list: 4 of 48 red
  • The mutation, on disk in packages/metadata-protocol/src/protocol-form-reads.ts (diff below). Rebuilt: the metadata-protocol dist, exit 0.
  • The harness: 44 passed, 4 failed. The red pins are named in the table.
  • Restored with git checkout and rebuilt (exit 0). git diff HEAD --stat after: (empty).
--- packages/metadata-protocol/src/protocol-form-reads.ts
@@ -311,7 +311,8 @@
-        const served = servedFormHolding(await placesOf(), name, pkg!, installed);
+        const viaList = projected.get(keyOf(pkg, name)) ?? projected.get(keyOf(undefined, name));
+        const served = (viaList ? { holding: { kind: 'form', item: viaList }, place: { type: 'view' } } : undefined) as any;
R4, closed-reading-fallthrough: 2 of 48 red
  • The mutation, on disk in packages/metadata-protocol/src/protocol-form-reads.ts (diff below). Rebuilt: the metadata-protocol dist, exit 0.
  • The harness: 46 passed, 2 failed. The red pins are named in the table.
  • Restored with git checkout and rebuilt (exit 0). git diff HEAD --stat after: (empty).
--- packages/metadata-protocol/src/protocol-form-reads.ts
@@ -320,7 +320,7 @@
-        // …else the closed reading: nothing is served for the name from the package.
+        else put(key, item);
R5, the-bound: 5 of 48 red
  • The mutation, on disk in packages/metadata-protocol/src/protocol-form-writes.ts (diff below). Rebuilt: the metadata-protocol dist, exit 0.
  • The harness: 43 passed, 5 failed. The red pins are named in the table.
  • Restored with git checkout and rebuilt (exit 0). git diff HEAD --stat after: (empty).
--- packages/metadata-protocol/src/protocol-form-writes.ts
@@ -77,7 +77,7 @@
-    if ((PLURAL_TO_SINGULAR[type] ?? type) !== 'view') return undefined;
+    if (type.length › 0) return undefined;
R6, expansion-half: 2 of 48 red
  • The mutation, on disk in packages/metadata-protocol/src/protocol-form-writes.ts (diff below). Rebuilt: the metadata-protocol dist, exit 0.
  • The harness: 46 passed, 2 failed. The red pins are named in the table.
  • Restored with git checkout and rebuilt (exit 0). git diff HEAD --stat after: (empty).
--- packages/metadata-protocol/src/protocol-form-writes.ts
@@ -43,7 +43,7 @@
-            names.push(...projectViewForms(expanded).lists);
+            void expanded;
R7, removal-form-content-test: 3 of 48 red
  • The mutation, on disk in packages/metadata-protocol/src/protocol-form-writes.ts (diff below). Rebuilt: the metadata-protocol dist, exit 0.
  • The harness: 45 passed, 3 failed. The red pins are named in the table.
  • Restored with git checkout and rebuilt (exit 0). git diff HEAD --stat after: (empty).
--- packages/metadata-protocol/src/protocol-form-writes.ts
@@ -206,7 +206,7 @@
-        if (!projection.forms.some((form) =› form.name === name)) continue;
+        void projection;
R8, override-gate-projection-half: 8 of 48 red
  • The mutation, on disk in packages/metadata-protocol/src/protocol-packaged-base-refusal.ts (diff below). Rebuilt: the metadata-protocol dist, exit 0.
  • The harness: 40 passed, 8 failed. The red pins are named in the table.
  • Restored with git checkout and rebuilt (exit 0). git diff HEAD --stat after: (empty).
--- packages/metadata-protocol/src/protocol-packaged-base-refusal.ts
@@ -1439,7 +1439,7 @@
-                    .filter((a) =› projectViewForms(a).forms.some((form) =› form.name === request.name))
+                    .filter((a) =› projectViewForms(a).forms.some(() =› false))
R9, parse-projected-with-FormSchema: 2 of 48 red
  • The mutation, on disk in packages/metadata-protocol/src/protocol-form-reads.ts (diff below). Rebuilt: the metadata-protocol dist, exit 0.
  • The harness: 46 passed, 2 failed. The red pins are named in the table.
  • Restored with git checkout and rebuilt (exit 0). git diff HEAD --stat after: (empty).
--- packages/metadata-protocol/src/protocol-form-reads.ts
@@ -249,9 +249,12 @@
+    // ABLATION: the projected items parsed as `form` items (`data` stripped, as a normalizing parse would), the refused ones dropped.
+    const { FormSchema: AblFormSchema } = await import('@objectstack/spec/ui');
+    const asFormItem = (f: unknown): boolean =› { const { [PROJECTED_FORM_SOURCE_KEY]: _m, data: _d, ...plain } = f as Record‹string, unknown›; return (AblFormSchema as any).safeParse(plain).success; };
-        for (const form of projectViewForms(view).forms) {
+        for (const form of projectViewForms(view).forms.filter(asFormItem)) {
R10, publish-refusal: 2 of 48 red
  • The mutation, on disk in packages/metadata-protocol/src/protocol-history-and-publish.ts (diff below). Rebuilt: the metadata-protocol dist, exit 0.
  • The harness: 46 passed, 2 failed. The red pins are named in the table.
  • Restored with git checkout and rebuilt (exit 0). git diff HEAD --stat after: (empty).
--- packages/metadata-protocol/src/protocol-history-and-publish.ts
@@ -1205,10 +1205,7 @@
-            const formRefusal = await formTypeWriteRefusal(
-                host, singularType, draftForGate.body, request.name, promoteInto,
-            );
-            if (formRefusal) throw formRefusal;
+            void formTypeWriteRefusal;
R11, restore-refusal: 1 of 48 red
  • The mutation, on disk in packages/metadata-protocol/src/protocol.ts (diff below). Rebuilt: the metadata-protocol dist, exit 0.
  • The harness: 47 passed, 1 failed. The red pins are named in the table.
  • Restored with git checkout and rebuilt (exit 0). git diff HEAD --stat after: (empty).
--- packages/metadata-protocol/src/protocol.ts
@@ -1593,7 +1593,7 @@
-        return formTypeWriteRefusal(protocolHost(this), type, item, name, binding);
+        return formTypeWriteRefusal(protocolHost(this), type, item, name, binding).then(() =› undefined);
R12, packaged-base-accessor-form-row: 1 of 48 red
  • The mutation, on disk in packages/rest/src/meta-item-read-gate.ts (diff below). Rebuilt: none (the rest tests run its source), exit 0.
  • The harness: 47 passed, 1 failed. The red pins are named in the table.
  • Restored with git checkout and rebuilt (exit 0). git diff HEAD --stat after: (empty).
--- packages/rest/src/meta-item-read-gate.ts
@@ -3444,7 +3444,6 @@
-    ['form', 'getPackagedFormBase'],
R13, one-definition-per-address: 1 of 48 red
  • The mutation, on disk in packages/metadata-protocol/src/protocol-form-reads.ts (diff below). Rebuilt: the metadata-protocol dist, exit 0.
  • The harness: 47 passed, 1 failed. The red pins are named in the table.
  • Restored with git checkout and rebuilt (exit 0). git diff HEAD --stat after: (empty).
--- packages/metadata-protocol/src/protocol-form-reads.ts
@@ -303,7 +303,7 @@
-        if (pkg === undefined && projectedAddressesOf.has(name)) {
+        if (pkg === undefined && projectedAddressesOf.has(name) && name.length ‹ 0) {
R14, cached-read-audience-form: 1 of 48 red
  • The mutation, on disk in packages/rest/src/meta-item-read-routes.ts (diff below). Rebuilt: none (the rest tests run its source), exit 0.
  • The harness: 47 passed, 1 failed. The red pins are named in the table.
  • Restored with git checkout and rebuilt (exit 0). git diff HEAD --stat after: (empty).
--- packages/rest/src/meta-item-read-routes.ts
@@ -775,7 +775,7 @@
-                        const audienceFolds = metaType === 'view' || metaType === 'object' || metaType === 'form';
+                        const audienceFolds = metaType === 'view' || metaType === 'object';
R15, forms.NAME.sections: 1 of 10 red
  • The mutation, on disk in packages/spec/src/system/i18n-resolver.ts: translateForm passes no form name to translateFormSections, so only _sections is read.
  • pnpm exec vitest run src/system/i18n-resolver.form-item.test.ts (spec tests import the source): 9 passed, 1 failed. Red: "reads the form's own section node first, and _sections for each key it lacks". The CONTROL ("with no forms.NAME.sections node, _sections translates the section as before") stays green.
  • Restored with git checkout. git diff HEAD --stat after: (empty).
-    ? translateFormSections(form.sections, catalogs, formSectionObjectName(form, objectName), opts, base, name)
+    ? translateFormSections(form.sections, catalogs, formSectionObjectName(form, objectName), opts, base)

Third round (rework 3). Same steps as the second round. The harness now holds 53 pins: five new ones in its last describe, on an engine double that cannot roll back (NoRollbackSqlDriver, supports.transactionsUnsupported) and on SqlDriver. Pin titles name the rule each holds.

Run Removes Red
T1 the rule "an undo puts back the rows the publish moved", undo leg 1 of 53: the refused-publish pin
T2 the same rule, commit revert leg 2 of 53: both revert pins
T3 A5f again: the per-package form layer 2 of 53: pin 5f, pin 2b twin
T4 the bound written the D5 way (any stored view place holds the name) 2 of 53: pin 2b, the ensurable-pair bound pin
T5 question 3, holder half (only an open form holds) 1 of 53: the switched-off holder pin
T6 question 3, writer half (every save keeping a link is judged) 2 of 53: the closed-save CONTROL, the container re-save pin
T7 the exempt reader (oldShapeFormWithdrawals returns none) 4 of 53: pins 3, 4, 5v, narrowing
T8 T7 + the form half (R1) 7 of 53: pins 3, 4, 5f, 5v, narrowing, 2b, 2b twin
T9 T8 + cross-type resolution (the served form row is the generic item) 10 of 53: pin 1, pins 3, 4, 5f, 5v, 7, 7 twin, narrowing, 2b, served rows at the address
T10 the forms leg of the reference lint 1 of 270: the new reference-lint test
T11 the walker's forms.NAME.sections emission 3 of 7: all three cli section tests
T12 the fallback address in the coverage count 1 of 7: the coverage test
T13 the fallback address in extract 1 of 7: the extract test

Readings from this round:

  • A5f read "none" in the first round because no pin then had the per-package form layer as its only reader. Pin 5f and pin 2b's twin now go red without it (T3).
  • The exempt reader (T7): pins 1 and 6 stay green. Pin 1 is held by the form half and by D5's cross-type resolution, pin 6 by rule 7's closed links. T8 and T9 remove those readers in turn. Pin 1 goes red only in T9, with all three removed. Pin 6 stays green in all three: only the first round's A6 (rule 7) turns it red.
T1: 1 of 53 red
  • At 7b0f2f8c7; the mutation in packages/metadata-protocol/src/protocol-history-and-publish.ts (the undo leg of the rule); rebuilt mp exit 0; 52 passed. Then restored and rebuilt mp exit 0; git diff HEAD --stat (empty). The red pin is named in the table.
T2: 2 of 53 red
  • At 7b0f2f8c7; the mutation in packages/metadata-protocol/src/protocol-history-and-publish.ts (the commit revert leg of the rule); rebuilt mp exit 0; 51 passed. Then restored and rebuilt mp exit 0; git diff HEAD --stat (empty). The red pins are named in the table.
T3: 2 of 53 red
  • At 7b0f2f8c7; no rebuild (the tests import the source); 51 passed. Then restored; git diff HEAD --stat (empty). The red pins are named in the table.
--- packages/rest/src/form-routes.ts
@@ -325,7 +325,7 @@
-            forms: [...forms, ...(await perPackage(formsRequest))],
+            forms: [...forms],
T4: 2 of 53 red
  • At 7b0f2f8c7; rebuilt mp exit 0; 51 passed. Then restored and rebuilt mp exit 0; git diff HEAD --stat (empty). The red pins are named in the table.
--- packages/metadata-protocol/src/protocol-form-reads.ts
@@ -160,10 +160,10 @@
-        const at = places.filter((place) => place.holds.has(name)
-            && (candidate.packageId === undefined || (place.packageId ?? null) === candidate.packageId)
+        const at = places.filter((place) => place.holds.has(name) && (place.type === 'view'
+            || ((candidate.packageId === undefined || (place.packageId ?? null) === candidate.packageId)
-                { type: place.entry.type, package_id: place.packageId ?? null, metadata: place.entry.data }, installed, undefined));
+                { type: place.entry.type, package_id: place.packageId ?? null, metadata: place.entry.data }, installed, undefined))));
T5: 1 of 53 red
  • At 7b0f2f8c7; rebuilt mp exit 0; 52 passed. Then restored and rebuilt mp exit 0; git diff HEAD --stat (empty). The red pins are named in the table.
--- packages/metadata-protocol/src/protocol-form-writes.ts
@@ -136,7 +136,7 @@
-        if (formHeldSlug(form) !== slug) return false;
+        if (anonymousFormIntakeSlug((form as { sharing?: unknown }).sharing) !== slug) return false;
T6: 2 of 53 red
  • At 7b0f2f8c7; rebuilt mp exit 0; 51 passed. Then restored and rebuilt mp exit 0; git diff HEAD --stat (empty). The red pins are named in the table.
--- packages/metadata-protocol/src/protocol-form-writes.ts
@@ -130,7 +130,7 @@
-    const slug = anonymousFormIntakeSlug((item as { sharing?: unknown }).sharing);
+    const slug = formHeldSlug(item) ?? null;
T7: 4 of 53 red
  • At 7b0f2f8c7; rebuilt spec exit 0; 49 passed. Then restored and rebuilt spec exit 0; git diff HEAD --stat (empty). The red pins are named in the table.
--- packages/spec/src/ui/old-shape-form-withdrawals.ts
@@ -24,7 +24,7 @@
-  for (const form of projectViewForms(body).forms) {
+  for (const form of projectViewForms(body).forms.filter(() => false)) {
T8: 7 of 53 red
  • At 7b0f2f8c7; rebuilt spec exit 0; 46 passed. Then restored and rebuilt spec exit 0; git diff HEAD --stat names only packages/lint/src/i18n-walk.ts, this round's S11 edit then in progress (committed in 8ccb511), not an ablated file. The red pins are named in the table.
  • The diff: T7's hunk plus R1's hunk, both shown above.
T9: 10 of 53 red
  • At 8ccb511ce; rebuilt spec exit 0, mp exit 0; 43 passed. Then restored and rebuilt spec exit 0, mp exit 0; git diff HEAD --stat (empty). The red pins are named in the table.
  • The diff: T8's two hunks plus this one.
--- packages/metadata-protocol/src/protocol-form-reads.ts
@@ -319,7 +319,7 @@
-        if (served.holding.kind === 'form') put(key, projectedServed(served.holding.item, pkg));
+        if (served.holding.kind === 'form') put(key, item);
T10: 1 of 270 red
  • At 95cb02acf; no rebuild (the tests import the source); 269 passed. Then restored; git diff HEAD --stat (empty). The red pins are named in the table.
--- packages/lint/src/validate-translation-references.ts
@@ -2385,7 +2385,7 @@
-      for (const [formName, rawForm] of Object.entries(asRecord(rawData.forms))) {
+      for (const [formName, rawForm] of Object.entries(asRecord(undefined))) {
T11: 3 of 7 red
  • At 95cb02acf; rebuilt lint exit 0; 4 passed. Then restored and rebuilt lint exit 0; git diff HEAD --stat (empty). The red pins are named in the table.
--- packages/lint/src/i18n-walk.ts
@@ -2271,7 +2271,7 @@
-    for (const raw of Array.isArray(form.sections) ? form.sections : []) {
+    for (const raw of [] as unknown[]) {
T12: 1 of 7 red
  • At 95cb02acf; no rebuild (the tests import the source); 6 passed. Then restored; git diff HEAD --stat (empty). The red pins are named in the table.
--- packages/cli/src/utils/i18n-coverage.ts
@@ -782,7 +782,6 @@
-        ?? (key.fallbackPath !== undefined ? lookupKey(data, key.fallbackPath) : undefined)
T13: 1 of 7 red
  • At 95cb02acf; no rebuild (the tests import the source); 6 passed. Then restored; git diff HEAD --stat (empty). The red pins are named in the table.
--- packages/cli/src/utils/i18n-bundle-extract.ts
@@ -223,7 +223,7 @@
-          if (fallbackValue !== undefined && fallbackValue !== '') continue;
+          void fallbackValue;

Rework 4: after a refused publish the doors answer only committed state

The rule (6bea26c97): after a refused or undone publish, the doors and the meta reads answer only committed state, on an engine that can roll back as on one that cannot. It is held at every transaction this package opens, through one helper, retireOverlayCacheOnRollback (packages/metadata-protocol/src/meta-overlay-cache.ts):

Site Covers
protocol-history-and-publish.ts (inTxn) the package publish batch (Phase 1 and its commit record)
protocol-history-and-publish.ts (promoteFormAware) a form promotion with its old-shape row removal, single publish and batch member
protocol-save.ts (putFormAware) a form save with its old-shape row removal
protocol-diff-delete-load.ts (deleteFormAware) a form delete or reset with its old-shape row removal
sys-metadata-repository.ts (withTxn) every repository write unit (put, delete, and through them promoteDraft, restoreVersion, the rollback, revert and reset doors)
protocol-batch-data.ts the atomic data batch

A transaction that commits, or that writes no sys_metadata row, costs nothing. protocol.ts is untouched (11705 of 11705).

Pins. The harness's last describe, on SqlDriver (can roll back), at the shipped defaults:

  • a batch whose first form opens a new public link: two form drafts in the pair on one new link; success: false, failed is [[NAME, BATCH_ABORTED], [SECOND, FORM_ADDRESS_TAKEN]]; both doors 404 FORM_NOT_FOUND on that link with no record written; the store rows and GET /api/v1/meta/view/NAME and /meta/form/NAME equal to their reading before the publish.
  • a batch whose first form opens the address the pair's switched-off row holds: the first draft on that address, two more on a new link; refused at the third (FORM_ADDRESS_TAKEN, the other two BATCH_ABORTED); the same assertions at that address.
  • Two CONTROLs: the first draft published alone opens its address on both doors.
  • At protocol level, meta-overlay-cache.test.ts §11 ("after a transaction that does not commit, the reads answer only committed rows"), with two CONTROLs.
U1: 2 of 4 door pins and 1 of 3 protocol pins red
  • At c75ea6281; the mutation in packages/metadata-protocol/src/meta-overlay-cache.ts (the rule's helper); rebuilt metadata-protocol exit 0, the mutated line present in dist/index.js and dist/index.cjs (1 each).
  • Door pins (-t 'leaves nothing of the batch served'): 2 failed, 2 passed (the CONTROLs), 53 skipped. Red: both refused-batch pins.
  • Protocol pins (§11, source): 1 failed, 2 passed (the CONTROLs). Red: the rolled-back pin.
  • Restored with git restore --source=HEAD --staged --worktree; git diff HEAD --stat (empty); rebuilt exit 0, the mutation absent from dist; the four door pins 4 of 4.

Rework 5: one naming of a stored row's forms, and the cost of a revert that stops

The rule: a form write removes only the old-shape row that carries that same form. The write side now asks the form read's own naming: storedViewRowHoldings (packages/metadata-protocol/src/protocol-form-reads.ts) answers which forms one stored view row carries and under which names, for the form read (storedFormPlaces) and for oldShapeFormRowRemovals (protocol-form-writes.ts) alike. A stored container's members carry the names the view list and the doors serve them under: OBJECT.CONTAINER.KEY for a named container on another package's object, OBJECT.KEY on its own package's object. A form item is named OBJECT.KEY, so on another package's object no form write names a member of such a container.

Measured on the fixed tree, with a pair's stored container whose member is served under the base's form name: form writes of every other name tried (a name the member's key spells under the object alone, the container's own name, open elsewhere or switched off), the reset of each, a package publish and its revert. In every one the container row stayed byte-equal and the address stayed closed.

The cost of a revert that stops, as a rule (S12, dee2c2106): when one view row a commit edited cannot be put back, every form item of that commit is kept as published, and each is listed in the revert's failed[] with nothing written for it. The scope is the commit, not the form: the plan does not record which form a row carried.

Pins (packages/rest/src/public-form-two-type-withdrawal.test.ts):

  • "a form write removes only the old-shape row that carries that form: a stored container whose member is served under another name stays as it was across the save, the publish and the reset, and the address stays closed", on a pre-gate stored container row.
  • "CONTROL: the form write of the name a stored container's member is served under re-saves the container without it, and the form is served as written".
  • "a stored container is re-saved without the member the form write names, its lists byte-equal": the existing pin, now on a container of the pair's own object, where the member is served as OBJECT.KEY.
  • S12: "a commit revert that cannot put back … keeps the form as published and lists it in failed[]", for both kinds of row: an item-shaped row, and a re-saved container (on the pair's own object). Each has its CONTROL ("the same revert with the store restoring puts back … and removes the form").

T6 (rework 3) was read before the container re-save pin moved onto the pair's own object.

Run Rule ablated Red
W1 a form write removes only the old-shape row that carries that form (the write side's naming) 1 of 3: the "removes only" pin; its CONTROL and the re-save pin stay green
W2 when one edited view row cannot be put back, the commit's form items are kept (the commit-wide scope) 2 of 4: both S12 pins, the item-shaped row and the re-saved container
W1 and W2: the proofs
  • W1, at 76ec9b3e4: the mutation in packages/metadata-protocol/src/protocol-form-writes.ts through scripts/ablation-replace.mjs (anchor 1 to 0, blob efa21564701c to edb06759f765); rebuilt metadata-protocol exit 0; ablation-dist-preflight found the marker in dist/index.js and dist/index.cjs. Harness (-t on the three pins): 1 failed, 2 passed. Restored: blob equal to HEAD, git diff HEAD empty; rebuilt exit 0; the marker absent from all 24 built files; tree clean.
  • W2, at 76ec9b3e4: the mutation in packages/metadata-protocol/src/protocol-package-commits.ts, same tool (blob 01bffacef065 to 03946034e8d5); rebuilt exit 0; marker in both dist files. Harness (-t 'commit revert'): 2 failed, 2 passed. Restored: blob equal to HEAD, git diff HEAD empty; rebuilt exit 0; marker absent; tree clean.

The fixtures taken before the type

packages/rest/src/form-old-shape-before.json was captured on PR A's head, cb854ea4d: the rename-only tree, which has no form type. A throwaway test booted the same stacks these pins boot, and it was never committed (git status on PR A is clean). The fixture holds three answers:

  • GET /api/v1/meta/view over a container's default form, a formViews entry and a stored viewKind: 'form' item;
  • a formViews entry whose data.object names another object, on both doors;
  • the CRM's GET /forms/contact-us.

Each answer is compared as the wire serializes it, byte for byte. The save clock is written as TIME, because it is the one value two runs cannot share. The CRM pin (public-form-app-crm-byte-equal.test.ts, repo project) reads two examples/app-crm files. They are declared as rest test:repo inputs in scripts/cross-package-test-inputs.mjs and in turbo.json.

The capture source (S10). The throwaway test was packages/rest/src/__capture37086.test.ts in PR A's worktree. It sat there only for the run and was removed after it. Its sha256 is c320d476deac60cd1b4341ac613b77a08af9267cc7abd80f9c147aa1fc0a6577, and its source is below. The command, from packages/rest on PR A: CAPTURE_OUT=FILE pnpm exec vitest run --project local --maxWorkers=2 src/__capture37086.test.ts. This round ran it again on cb854ea4d: 1 passed. The JSON it wrote equals the committed fixture byte for byte except one value, changedAt of ftt_inquiry.standalone (line 104), the save clock the pins write as TIME. git status on PR A after the run: clean.

The capture test, as run
// TEMPORARY capture, run once on the rename-only head; never committed.
import { it } from 'vitest';
import { writeFileSync } from 'node:fs';
import { ObjectQL } from '@objectstack/objectql';
import { SqlDriver } from '@objectstack/driver-sql';
import { ObjectStackProtocolImplementation, resetEnvWritableMetadataTypes } from '@objectstack/metadata-protocol';
import { SysMetadataAuditObject, SysMetadataCommitObject, SysMetadataHistoryObject, SysMetadataObject } from '@objectstack/metadata-core';
import { RestServer } from './rest-server';
import * as CRM_OBJECTS from '../../../examples/app-crm/src/objects/index';
import { LeadViews } from '../../../examples/app-crm/src/views/lead.view';

const BASE = 'com.example.forms37086';
const OBJECT = 'ftt_inquiry';
const NAME = `${OBJECT}.contact`;
const SLUG = 'contact-37086';
const sharing = (open: boolean, slug = SLUG) => ({ enabled: true, allowAnonymous: open, publicLink: `/forms/${slug}` });
const body = (open: boolean | null, slug = SLUG) => ({ type: 'simple', sections: [{ fields: ['name', 'email'] }], ...(open === null ? {} : { sharing: sharing(open, slug) }) });
const viewItem = (open: boolean | null, extra: Record‹string, unknown› = {}, slug = SLUG) => ({
  name: NAME, object: OBJECT, viewKind: 'form', label: 'Contact us',
  config: { ...body(open, slug), data: { provider: 'object', object: OBJECT } }, ...extra,
});
const INQUIRY = { name: OBJECT, label: 'Inquiry', fields: { name: { name: 'name', type: 'text', label: 'Name' }, email: { name: 'email', type: 'text', label: 'Email' } } };
const LEAD = { name: 'ftt_lead', label: 'Lead', fields: { name: { name: 'name', type: 'text', label: 'Name' }, email: { name: 'email', type: 'text', label: 'Email' } } };
const threeShapes = () => ({
  views: [{
    object: OBJECT,
    form: { type: 'simple', sections: [{ fields: ['name'] }], sharing: sharing(true, 'whole-37086'), data: { provider: 'object', object: OBJECT } },
    formViews: { contact: { ...body(true), data: { provider: 'object', object: OBJECT } } },
  }],
});
const STANDALONE = `${OBJECT}.standalone`;
const otherObjectForm = () => ({
  objects: [LEAD],
  views: [{ object: OBJECT, formViews: { contact: { ...body(true), data: { provider: 'object', object: 'ftt_lead' } } } }],
});

function mockServer() { const noop = () => {}; return { get: noop, post: noop, put: noop, delete: noop, patch: noop, use: noop, listen: async () => {}, close: async () => {} }; }
function makeRes() {
  const res: any = { header: () => res, setHeader: () => res, send: (b: unknown) => { res._json = b; return res; }, write: () => true, end: () => res,
    status: (code: number) => { res._status = code; return res; }, json: (b: unknown) => { res._json = b; return res; } };
  return res;
}
async function boot(app: { id: string; namespace: string; objects: unknown[]; views: unknown[] }) {
  const driver = new SqlDriver({ client: 'better-sqlite3', connection: { filename: ':memory:' }, useNullAsDefault: true } as any);
  const engine = new ObjectQL();
  engine.registerDriver(driver, true);
  await engine.init();
  for (const o of [SysMetadataObject, SysMetadataHistoryObject, SysMetadataAuditObject, SysMetadataCommitObject]) engine.registry.registerObject(o as any, 'test-package');
  engine.registerApp({ id: app.id, name: app.id.split('.').pop(), version: '1.0.0', namespace: app.namespace, objects: app.objects, views: app.views } as any);
  await engine.syncSchemas();
  const protocol: any = new ObjectStackProtocolImplementation(engine as any, () => new Map());
  const rest = new RestServer(mockServer() as any, protocol, { api: { requireAuth: false } } as any);
  rest.registerRoutes();
  const route = (method: string, path: string) => rest.getRoutes().find((r: any) => r.method === method && r.path === path)!;
  const get = async (slug: string) => { const res = makeRes(); await route('GET', '/api/v1/forms/:slug').handler({ params: { slug }, query: {}, headers: {} } as any, res); return { status: res._status ?? 200, body: res._json }; };
  const post = async (slug: string, b: Record‹string, unknown›) => { const res = makeRes(); await route('POST', '/api/v1/forms/:slug/submit').handler({ params: { slug }, body: b, headers: {} } as any, res); return { status: res._status ?? 200, body: res._json }; };
  const metaList = async (type: string) => {
    (rest as any).resolveExecCtx = async () => ({ userId: 'u_reader', systemPermissions: [] });
    const res = makeRes();
    await route('GET', '/api/v1/meta/:type').handler({ method: 'GET', path: `/api/v1/meta/${type}`, params: { type }, query: {}, body: {}, headers: {} } as any, res);
    return { status: res._status ?? 200, body: res._json };
  };
  return { engine, protocol, get, post, metaList };
}

it('captures the before answers', async () => {
  delete process.env.OS_METADATA_WRITABLE;
  ObjectStackProtocolImplementation.resetEnvWritableCache();
  resetEnvWritableMetadataTypes();
  const out: Record‹string, unknown› = {};
  const a = await boot({ id: BASE, namespace: 'ftt', objects: [INQUIRY], views: threeShapes().views });
  await a.protocol.saveMetaItem({ type: 'view', name: STANDALONE, item: { ...viewItem(true, {}, 'standalone-37086'), name: STANDALONE }, mode: 'draft' });
  await a.protocol.publishMetaItem({ type: 'view', name: STANDALONE });
  out['meta-view-list'] = await a.metaList('view');
  const b = await boot({ id: BASE, namespace: 'ftt', objects: [INQUIRY, ...otherObjectForm().objects], views: otherObjectForm().views });
  out['data-object-resolve'] = await b.get(SLUG);
  out['data-object-submit'] = await b.post(SLUG, { name: 'Ada', email: 'ada@example.test' });
  const c = await boot({ id: 'com.example.crm', namespace: 'crm', objects: Object.values(CRM_OBJECTS), views: [LeadViews] });
  out['crm-resolve'] = await c.get('contact-us');
  writeFileSync(process.env.CAPTURE_OUT!, JSON.stringify(out, null, 2) + '\n');
});

Per-type arm inventory (card item 2)

Command: git grep -nE "=== 'view'|'view'," -- packages/rest/src packages/metadata-protocol/src packages/spec/src/kernel. It finds 64 hits in source files. The test files are left out: they hold fixture rows, not arms. Each hit is listed with whether form takes the arm.

64 source hits, by file

rest

  • form-routes.ts:245, 300, 511-514: the doors' own reads of the view carrier of a projected form. These are by design; form is the other half of the same reads.
  • meta-item-read-gate.ts:1796 (item audience) and :1998 (list audience): taken. The form arms sit at :1818 and :2015.
  • meta-item-read-gate.ts:2850 and :4780-4782 (the object list filter): not taken. The filter is the view list's. The form list declares no filter, and a form's object is its name's prefix.
  • meta-item-read-gate.ts:3438 (PACKAGED_BASE_ACCESSORS): taken, as ['form', 'getPackagedFormBase'] (S4).
  • meta-item-read-gate.ts:3791 and :3867 (withoutInventedViewLabel): not taken. translateForm translates only a label that the form authors, so it invents none.
  • meta-item-read-gate.ts:3843 and :3932 (container translation): not taken. A form item is never a container.
  • meta-item-read-gate.ts:4492 and :4526 (lists: 'app' | 'view'): not taken. These name the two list shapes that a navigation member reads.
  • meta-app-bundle-routes.ts:311 (an app bundle's view members): not taken. No app navigates to a form item until card ③.
  • meta-item-read-routes.ts:778 (the cached plain read's audience fold): taken (this rework), so the cached arm applies the same audience gate as the uncached one. See R14.
  • meta-item-read-routes.ts:766 and rest-server.ts:4445 (the public-form intake warning stamped on a served view): not taken. The warning's reader is the console's form designer, which is card ③. A form write is warned at the save door (runtime-authoring-gate.ts:437).
  • rest-server.ts:4096 (gatesOnItsOwnKey, the history, diff, audit and published doors): not taken. Those doors serve stored form rows only. An authored form item declares no requiredPermissions, so its gate always passes. A projected form, the only form that carries a gate, has no form rows, so those doors expose nothing of it.

metadata-protocol

  • build-probes.ts:653-674 (the renderer probe over published views): not taken. The probe reads the view renderer's path, and the public form renderer reads a form item through the doors pinned above.
  • destructive-still-shown-by.ts:343 (views that still show a field a destructive change removes): not taken in card ②. A form item's sections name fields too. Measuring that it should be shown is listed under "Named for the seat".
  • meta-compile-cache.ts:159: not taken, by design. The form read is never cached, because its answer moves with the stored view rows (protocol-meta-item-reads.ts, the by-name read's header).
  • metadata-diagnostics.ts:645 and :736 (form-layout diagnostics on a served form view): not taken. The consumer is Studio's form designer, card ③. The save and publish gate runs the form rules registered for the type.
  • package-namespace-rename.ts:133 and package-unmanaged-install.ts:634-642 and :1015-1017 (the copy names of a view and of a container's expansions): not measured for form. A form item named OBJECT.KEY follows the generic renameName, not the qualified-view rename. Whether an unmanaged copy of a package that authors forms: keeps the name's prefix equal to its renamed object is listed under "Named for the seat".
  • protocol-authoring-gate.ts:663 (the storage fold of a disabled extension's fields): not taken. No rule that a form write runs reads its object's fields. The form rules judge the object binding only.
  • protocol-discovery-and-bases.ts:879 and :947: the view half of getPackagedViewBase, and the old-shape fallback of the new getPackagedFormBase.
  • protocol-form-reads.ts and protocol-form-writes.ts (all hits): the cross-type reads and writes themselves.
  • protocol-meta-item-reads.ts:704: the projected-item mark. :1592 (ADR-0047 list-view reference diagnostics) is not taken: those rules read list-only keys.
  • protocol-meta-list-reads.ts:320 (the view merge's container handling) and :1027 (containers left out of the view list): not taken. A form row is never a container.
  • protocol-packaged-base-refusal.ts:1349 (a container's expansion in the override gate): not taken, for the same reason. :1441 is the form gate's projection half (R8).
  • protocol-registry-hydration.ts:872 and :2024 (finding(metadata-protocol): on an unscoped kernel, a package-bound stored row of a view name two packages ship is hydrated into the registry's bare slot, so a by-name read naming the other package serves that row's body under its own _packageId #22057, a view row bound to one package is not registered under a name another package ships): not taken in card ②. The header marks the case "View only". The form read resolves the address itself and does not read the registry for a stored row.
  • protocol-save.ts:1511: the package-less list refusal. :1706 (projectStorableViewBody) is not taken: a form body is stored through the generic path, and FormSchema is strict, so no undeclared key survives the parse.
  • protocol-unmanaged-import.ts:60: a container's expansions. Not taken.
  • runtime-authoring-gate.ts:1670: taken. PUBLIC_FORM_INTAKE_UNAVAILABLE runs for form.
  • protocol-diff-delete-load.ts:841, protocol-registry-hydration.ts:1694 and sys-metadata-repository.ts:2433: comments.

spec/kernel

  • metadata-plugin.zod.ts:98 and :967: form has its own enum member and its own registry row.

Notes for the review items

  • M3 (an undo puts back the rows the publish moved). The rule holds for the undo of a package publish refused part-way on an engine that cannot roll back, and for a commit revert on every engine. The writer is in the stored-row write census (protocol.view-expansion-reconcile-call-sites.test.ts), with its heal route named. Pins: the undo describe of the harness, with two CONTROLs. Ablations: T1 and T2.

  • S12 and N9. See "Rework 5": the commit-wide scope as a rule, and the re-saved container kind among the revert pins.

  • Rework 4. See its section: the rule, the six sites, the pins with their CONTROLs, and U1.

  • S10. The records asked for are T3 to T9 above, and the capture source is in "The fixtures taken before the type".

  • S11. packages/lint/src/i18n-walk.ts and validate-translation-references.ts follow forms.NAME.sections. The object-level _sections emission for a form item is gone from the walker: the form's own node carries the entry, with _sections as its fallback address. Pins: packages/cli/test/i18n-form-section-entry-coverage.test.ts (3, against the built lint) and validate-translation-references.test.ts (1, with a CONTROL). Ablations: T10 to T13.

  • S5 (one candidate read; predicates pushed down).

    • names is pushed into both generic reads.
    • packageId is not pushed, for two reasons, both written in readEffectiveFormList's docblock. A declared form override is re-keyed onto its base's address from the base's projected view item, and a list scoped to the pair never holds that item. A view list scoped to a package seats the package-less rows in that package's slots ([finding] getMetaItems scoped to a package reads only that package's rows, so it never falls back to the package-less row that getMetaItem naming the package serves #21817), and they would be projected as the package's own forms ahead of the served-row order.
    • The by-name read makes one unscoped read and filters it.
    • The door asks one form read. The view list and the stored rows it also needs are not shared through a new protocol extension: protocol.ts sits at its facade ceiling, 11705 of 11705 lines. The row sets come from the overlay row cache. That is the residual.
  • S8 (the @object-ui changeset stays patch). The diff adds and narrows nothing published:

    • a form row in TYPE_COUNT;
    • a Forms category in the translation preview;
    • the preview.changes.typeCount.form key in each bundled locale;
    • forms in the language loader's recognised groups;
    • form in HIDDEN_DIRECTORY_TYPES, a read-only set of strings whose type is unchanged. It hides a type that did not exist before this change.

    No export is removed or retyped, and no accepted input is refused.
    @object-ui/types has no changeset entry: its two touched files (src/__tests__/zod-mirror-parity.test.ts, src/__tests__/spec-object-refinements-7715.test.ts) are tests, and the package's files ships only dist, README.md, CHANGELOG.md and LICENSE.

  • S9. The forms row in skills/objectstack-platform/SKILL.md is done in this PR, in commit 6103f74: one line, with no teaching text, example or eval. The skills token ceiling rises from 6151 to 6153, the row's measured delta (+2), on a base where main's knowledge capability row had already moved it from 6149 to 6151. That rise rests on ruling A on Adding a top-level key or a bound enum member reds two-way skill gates in both card orders under the skills split #32584 (record 6819475461), made standing by [Decision] Under ruling A (#32584), may the PR that adds a key raise the token ceiling of the published skill file its enumeration row lands in? #32673 letter A (record 6840575378, 「32843 32673 同意」).

Accepted deviations (review nits)

  • N1 (form-consumer-less is silent for every overrides item). Kept. Lint judges the authoring stack, and the base form's consumers live in the installed base, which is not in that stack. The rule cannot tell an override that keeps a consumed address closed from one that steers nothing. A warning there would invite the removal of the override that keeps the address closed (validate-form-items.ts header).
  • N2 (readEffectiveFormItem scoped to a package where the name is listed only at another). Kept. That branch is the pair's address answered by its base, the same layered by-name answer every type gives. The address is closed on both doors, so nothing is exposed.

The other three nits are done:

  • N3: form.json sharing cites findPublicForm, openFormAt and the slug rule.
  • N4: the registry-row comment says what overlays a form.
  • N5: scripts/adr-anchors/packages__metadata-protocol__src__protocol-form-reads.ts.json anchors the cross-type resolution.

Verification

The head is 20a80b19d. This round brings current main (c2bfa3ef7) in once more, through PR A: main is merged into PR A's branch (f4ce75659, no conflict, nothing left to regenerate there), and that branch into this one (2321811241, no conflict), then the regeneration 20a80b19d (content/docs/references/api/protocol.mdx and content/docs/references/system/translation.mdx). On PR A, main changed agent.form.ts, which PR A renames: the change landed in agent.metadata-form.ts, which still calls defineMetadataForm, and main adds no *.form.ts module and no defineForm call. The merge changed files this PR also changes (lint's i18n-walk.ts, index.ts and rule-explanations.ts; spec's translation.zod.ts and i18n-resolver.ts; the eleven *.metadata-forms.generated.ts bundles), so the battery ran again on this head.

  • Local, this round, on 20a80b19d: check:generated (14 of 14 current after the regeneration), check:facade-delegation-only (protocol.ts within its ceiling), check:test-source-alias, check:adr-symbol-anchors, check:nul-bytes: exit 0 each. On PR A f4ce75659: check:generated 14 of 14 current.
  • Dogfood battery at 20a80b19d (pnpm --filter '@objectstack/dogfood^...' build && pnpm --filter @objectstack/dogfood test, under the verify lock): VERDICT command-exit 0; 489 files passed, 3 skipped (492); 4140 tests passed, 68 skipped (4208); no failure.
  • The previous round (921f5d060, after merging main 9a65a48f8): conflicts reconciled by summing both sides' deltas (the translated-leaf census 841; dropped-refinements.baseline.json 279 / 1223; the protocol-diff-delete-load.ts imports), protocol.ts brought back to its ceiling with no behaviour change (921f5d060), the failed[] wording of a held-back form item (d5c5b92d5); metadata-protocol full (371 files, 23472 tests), rest local (431 files, 8931 tests), lint full (240 files, 9739 tests), platform-objects full (129 files, 2202 tests), their typecheck and the gates listed then, all green; battery 489 files, 4138 tests.
  • Earlier rounds (their trees; this round changes none of their code but the two commits above): the previous round ran the spec test files that name metadata forms (95 files, 6006 tests) and the gates listed then; rework 5 ran the rest door harness (63 of 63) and the rest and metadata-protocol typecheck; rework 4 ran objectql environment-overlay-five-types.test.ts (36 of 36); @objectstack/cli unit ran 445 files, 6361 tests. Their gate lists stand as reported then.
  • Declared narrowing: this round ran the families that read the files the merge changed or reconciled, listed above. The derivation covers the whole stacked diff against main.

Edits needed outside this PR's surface (named, not made):

  • .claude/skills/spec-property-retirement: the lines that name defineForm as the Studio helper.
  • ui/docs/adr/0056: the same naming.
  • ADR-0159:109: the anchor resolves again with this PR, onto a symbol whose meaning is the opposite of the sentence. The ADR's text is the seat's to order.

Named for the seat (from the arm inventory; measured nowhere yet, so no card is asked):

  • Does the destructive-change "still shown by" read need form items, whose sections name fields?
  • Does an unmanaged copy of a package that authors forms: keep each form name's prefix equal to its renamed object?

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic.
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; pnpm lint is CI's.
  • 4. One issue, one branch, one pull request (the card's cut: PR A refactor(spec)!: rename the Studio helper defineForm to defineMetadataForm and its modules to *.metadata-form.ts #37366 + this PR B, stacked).
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec touched: its generated artifacts are regenerated and committed.
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English.
  • The Before Submitting list in CONTRIBUTING.md is done.

🤖 Generated with Claude Code

https://claude.ai/code/session_011y7As9cjn4Y9vAUQbVH4fq

…ead a form over both types

ADR-0159 card ②, everything past the rename (PR B of the card's cut):
FormSchema derived from FormViewSchema by reference with defineForm and
*.form.ts; the registry row, the stack's forms collection and the forms
translation family; one projection of the three old view shapes; the
effective form read resolved over both types; the form write's removal of
the old-shape row; the address clash refusal (FORM_ADDRESS_TAKEN); the
package-less list-at-a-form's-name refusal on save, publish and restore;
the anonymous doors' two-type withdrawal layer with rule 7's closed links;
the lint rules, the liveness ledger and the showcase form.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011y7As9cjn4Y9vAUQbVH4fq
…gation, cli i18n bucket, provenance row, checklist waiver, transcript counts

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011y7As9cjn4Y9vAUQbVH4fq
…les, showcase feedback form zh-CN, walk-parity fixture member; typed form-body refinement params

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011y7As9cjn4Y9vAUQbVH4fq
…ocol serving no form item, one registry heal for old-shape removals, the by-name form read keeps the generic answer unless resolved across types, census and enumeration pins

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011y7As9cjn4Y9vAUQbVH4fq
The owner-stamp fixture tables, the meta list/item census, the CLI
schema-gate classification and the metadata-form catalog ratchets each
gain the form type (ADR-0159 card ②, #37086).

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011y7As9cjn4Y9vAUQbVH4fq
@github-actions github-actions Bot added documentation Improvements or additions to documentation protocol:system protocol:ui tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 26, 2026
@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 10 package(s): @objectstack/cli, @objectstack/lint, @objectstack/metadata-core, @objectstack/metadata-protocol, @objectstack/metadata, @objectstack/objectql, @objectstack/platform-objects, @objectstack/rest, @objectstack/runtime, @objectstack/spec, touching 309 documentable anchor(s). ⚠️ 24 changed file(s) yielded no anchor (packages/lint/src/index.ts, packages/rest/src/form-old-shape-before.json, packages/rest/vitest.repo-tests.json, …), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

82 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: node scripts/docs-audit/affected-docs.mjs --json f4ce756599358ed4ab3bd9944a9425ad3e3fd445.

⛔ 23 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails.

What this run could not see
  • 24 changed file(s) yielded no anchor (packages/lint/src/index.ts, packages/rest/src/form-old-shape-before.json, packages/rest/vitest.repo-tests.json, …) — pages documenting those are invisible to this run
  • 2 anchor(s) matched too much of the corpus to be a work list: VALIDATION_ERROR (literal, 39 pages), objectName (literal, 60 pages)
  • 30 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 69 of 252 client-bound route-ledger rows — the other 183 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 183: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 124 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 192 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json f4ce756599358ed4ab3bd9944a9425ad3e3fd445 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 580a72070c44ad1c5c5cd6171f1cab72442aeaee — the merge of head 20a80b19d16058700b6a44ea91b38be9da771e45 into base f4ce756599358ed4ab3bd9944a9425ad3e3fd445, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older claude/project-thread-pu5dnt holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 580a72070c44ad1c5c5cd6171f1cab72442aeaee && git checkout 580a72070c44ad1c5c5cd6171f1cab72442aeaee
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin f4ce756599358ed4ab3bd9944a9425ad3e3fd445 20a80b19d16058700b6a44ea91b38be9da771e45 && git checkout -B drift-repro f4ce756599358ed4ab3bd9944a9425ad3e3fd445 && git merge --no-ff 20a80b19d16058700b6a44ea91b38be9da771e45

node scripts/docs-audit/affected-docs.mjs --json f4ce756599358ed4ab3bd9944a9425ad3e3fd445

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs f4ce756599358ed4ab3bd9944a9425ad3e3fd445 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

…object

translateForm reads a form item's section headings at
objects.<object>._sections.<name>, so translation-target-unknown must
accept those keys. The showcase feedback form's zh-CN section heading
tripped it in the dogfood build.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011y7As9cjn4Y9vAUQbVH4fq
…ectstack-ai/objectstack into claude/project-thread-pu5dnt-b

# Conflicts:
#	packages/spec/dropped-refinements.baseline.json
- TranslationPreview draws the forms group, with its strings and fixtures.
- Pending changes count a drafted form in every pack.
- The console loader namespaces a served forms group.
- Studio's directory and menu leave form out until card ③ brings its
  designer, placement and ADR-0084 row.
- The types censuses: spec FormSchema is a name collision with the
  form node, and checkFormItemNamePrefix judges a schema objectui does
  not mirror.
- rest: the unused withdrawal import goes, and the intake test pays the
  objectql load at collection.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011y7As9cjn4Y9vAUQbVH4fq
…ectstack-ai/objectstack into claude/project-thread-pu5dnt-b

# Conflicts:
#	content/docs/deployment/cli.mdx
#	content/docs/deployment/validating-metadata.mdx
#	content/docs/getting-started/build-with-claude-code.mdx
#	content/docs/ui/react-pages.mdx
…vel keys

The enumeration row only (check:skill-top-level-keys); the prose,
examples and evals are #37105's. The token ceiling moves by the row's
measured +2 (6149 -> 6151), the standing enumeration-row case: ruling A
on #32584 (record 6819475461), made standing by #32673 letter A
(record 6840575378).

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011y7As9cjn4Y9vAUQbVH4fq
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-alice · session_011y7As8wf3DSPRevwNnYLcM

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 97341d57da84d7143c7990ef72a82fff0e8b77ef
Local-runs: none
Scope: packages/spec/src/api/error-code-ledger.zod.ts, packages/spec/src/index.ts, packages/spec/src/kernel/collection-item-owner-stamp.ts, packages/spec/src/kernel/customization-package.ts, packages/spec/src/kernel/metadata-plugin.zod.ts, packages/spec/src/kernel/metadata-type-schemas.ts, packages/spec/src/meta-spelling/manifest-collection-spelling.ts, packages/spec/src/meta-spelling/meta-url-data.generated.ts, packages/spec/src/migrations/entries/semantic/18.form-type-define-form-and-packageless-list-at-form-name.ts, packages/spec/src/stack.zod.ts, packages/spec/src/system/i18n-resolver.ts, packages/spec/src/system/translation.zod.ts, packages/spec/src/ui/anonymous-form-intake.ts, packages/spec/src/ui/form-intake-layer.ts, packages/spec/src/ui/index.ts, packages/spec/src/ui/old-shape-form-withdrawals.ts, packages/spec/src/ui/view.zod.ts, skills/objectstack-platform/SKILL.md + packages/rest/src/form-routes.ts, packages/rest/src/meta-item-read-gate.ts, packages/rest/src/public-form-two-type-withdrawal.test.ts, packages/metadata-protocol/src/protocol-form-reads.ts, packages/metadata-protocol/src/protocol-form-writes.ts, packages/metadata-protocol/src/protocol-save.ts, packages/metadata-protocol/src/protocol-history-and-publish.ts, packages/metadata-protocol/src/protocol-diff-delete-load.ts, packages/metadata-protocol/src/protocol-meta-item-reads.ts, packages/metadata-protocol/src/protocol-meta-list-reads.ts, packages/metadata-protocol/src/protocol-packaged-base-refusal.ts, packages/metadata-protocol/src/protocol-authoring-gate.ts, packages/metadata-protocol/src/runtime-authoring-gate.ts, packages/metadata-protocol/src/protocol.ts, packages/lint/src/validate-form-items.ts, packages/lint/src/authoring-rules.ts, packages/lint/src/i18n-walk.ts, packages/lint/src/validate-translation-references.ts, packages/spec/liveness/form.json, packages/spec/src/kernel/metadata-credential-fields.test.ts, scripts/adr-anchors/packages__rest__src__form-routes.ts.json, scripts/adr-anchors/packages__spec__src__ui__old-shape-form-withdrawals.ts.json, scripts/check-skills-token-ratchet.mjs, scripts/check-stack-collection-maps.mjs, ui/scripts/check-spec-symbol-derivation.mjs, docs/qa/platform-checklist/coverage.json, examples/app-showcase/src/ui/forms/feedback.form.ts, .changeset/37086-form-metadata-type.md, .changeset/37086-form-type-console-strings.md
Security-touching: yes
Rule-change-verified: none

PR #37422 (PR B of card #37086's fixed cut), base = PR A's branch claude/project-thread-pu5dnt, 153 files, +4117 / -306, 14 commits. Read: the card body and its six comments, the PR body, the file list, the net diff against PR A's head, the check-runs on this head, ADR-0159 on main, and the cited code at this head. Nothing was built, run or ablated. The narrowing face holds, so every path of the diff is in the floor; + names the files the published hunks make a claim about.

The security question of the brief, answered first. No path that re-opens a withdrawn public form was found by reading. Traced: a view override's withdrawal against an authored form; a form override against an old-shape base; a base-withdrawn form item under a package-less or override old-shape row; rule 11 for the pair row and the package-less row; served rows only; the package-less list refusal at save, publish and restore; the door's own fallback read (S1). What follows is that the design reads closed, and that the card's proof of it is not in the PR: see M2.

① Derived judgments

Each accept-set and public-surface change, named right or wrong.

  • FormSchema (packages/spec/src/ui/view.zod.ts): a strict object of name, object, label, the body keys of FormViewSchema taken by reference less data, the protection and override-declaration fields; data, viewKind, config, isDefault, order, scope refused with guidance; the form-body refinement shared with the view (checkFormViewBody), the name-prefix check, the groups-into-sections fold. Right (D2, D3, ruled question 2 = A).
  • defineForm declared again as the form type's factory. Right (ruled question 1 = A); it is absent on PR A's head and has one meaning here.
  • form as a metadata type: enum member, registry row with page's flags and **/*.form.ts|yml|json, type-to-schema map, forms stack collection, plural fold, owner stamp, form: listed in the customization package. Right (D1).
  • forms offers the array form only (waivers in scripts/check-stack-collection-maps.mjs). A dev-derived decision the card does not rule. Right: the name is OBJECT.KEY and is checked against object, so a map key would be a second spelling of the same identity.
  • projectViewForms / projectedFormsOf, the _formDefinedIn marker: one projection of the three old shapes; the marker is stripped before the anonymous door answers (formBodyOf). Right (D5).
  • formIntakeLayer / openFormAt: withdrawal by whole-item name over both types, closed links from unreadable bodies. Right (D6 rules 4 to 7).
  • oldShapeFormWithdrawals: the exempt reader, with the required words in its docblock and its own anchor file; not registered as an ADR-0087 conversion. Right (item 6).
  • FORM_ADDRESS_TAKEN in the error-code ledger. The code is right; the ledger comment that publishes where it is refused is wrong (M1).
  • The package-less list refusal, 400 VALIDATION_ERROR, at save, draft promotion and restore. Right (item 5), and it is the declared narrowing.
  • The override gate's "ships" read over both types (overrideWriteVerdict). Right (item 5).
  • /meta/form read gate arms (meta-item-read-gate.ts): requiredPermissions judged as for view. Right; the route pin the card asks for is missing (M2).
  • The forms translation family: label, description, title, submitBehavior in a strict object. Wrong against D8, which lists a sections branch as part of the family (S3).
  • The door's second candidate source (servedForms.length test in form-routes.ts). Wrong (S1).
  • form hidden from Studio's directory (HIDDEN_DIRECTORY_TYPES). Right: ruled A in 7183329743.

② Semver level

  • .changeset/37086-form-metadata-type.md: minor on spec, metadata-protocol, rest, lint, metadata, metadata-core, objectql, runtime, cli, platform-objects; Clause-②: yes (narrowing); Metadata-protocol: narrowed. Consistent with AGENTS.md (a protocol kind takes at least minor on a package the diff moves) and with the card's Done-when. The BREAKING banner names the export's new meaning and the refusal, the saves refused that are admitted today, and the one-line fix.
  • One ADR-0087 marker: registered form-type-define-form-and-packageless-list-at-form-name, with its entry in hits. It covers the export and the refusal together, as the card asks. PR A's changeset carries its own single marker for the rename; see that record.
  • .changeset/37086-form-type-console-strings.md: patch on @object-ui/app-shell and @object-ui/i18n, Clause-②: no, Metadata-protocol: none. Check Changeset accepts it. Against the card's "minor on every package the diff moves" it is a deviation the seat should rule: S8.
  • @object-ui/types: test files only, no changeset line. Right; the dev says so in the report.

③ Boundary flags

  • Open question 1 (who adds the forms row to skills/objectstack-platform/SKILL.md): answered A in 7183329743. Verified: the skill's hunk is one line, the top-level key enumeration gains `forms`, and nothing else; no teaching text, example or eval. scripts/check-skills-token-ratchet.mjs raises the ceiling 6149 to 6151 and the arithmetic holds (24594 to 24603 priced bytes, a quarter rounded up is 6151): exactly the row's measured delta. The two rulings are cited in the script comment only, not in the PR body as the amendment asks: S9. The two cited records were not opened; they are outside this review's inputs, and the seat checks the citation.
  • Open question 2 (keep form hidden in Studio until card ③): answered A. Verified in directoryScope.ts.
  • .claude/**: no path in the diff. Three gate-data edits are in it and are named for the seat, since each lets something through a check: the ratchet ceiling above; the forms waivers in scripts/check-stack-collection-maps.mjs; and an allow-list entry @object-ui/types:FormSchema in ui/scripts/check-spec-symbol-derivation.mjs for a name collision with the spec's new FormSchema. Each carries its reason, none changes what an agent may do without the maintainer, so the header reads none.
  • The dev's out-of-scope finding on sharing credential marking (class c): escalated by the seat. A security item is with the owner seat; no detail here.
  • The dev's security_findings: withheld: not answered on the card. The seat collects it through the private channel; this review did not see it and cannot say it is covered by the findings below.
  • Other dev decisions surfaced for the seat: KNOWN_UNSEEDED gains form in metadata-create-seeds.test.ts; docs/qa/platform-checklist/coverage.json waives form (S7); the liveness ledger form.json inherits view's verdicts (N3).
  • Named, not made: .claude/skills/spec-property-retirement and ui/docs/adr/0056 still name defineForm as the Studio helper; after this PR that is false twice over. ADR-0159:109 resolves again, onto a symbol with the opposite meaning of its sentence. All three are the seat's to order.
  • SQL push-down (Prime Directive 5): a finding. S5.
  • Check-runs on this head: 67 runs, 60 success, 7 skipped, none red, none running. Test Core was still running when the review began and finished green. Lint · docs & code guards is green here, which is what restores PR A's red lane.

④ Design judgment

Against ADR-0159 D1 to D8, the ruled questions, and the card's Done-when. The tree was read, not the PR body's account.

M1 (must-fix) — The address-clash refusal is judged at one door, and the published ledger says three. formAddressClashRefusal has one call site, the save door (protocol-save.ts). Draft promotion and the restore writer ask the package-less list refusal and do not ask this one, and the holder read is of published forms. So a draft is not judged against another draft, a draft saved before a holder took the address is not judged again at publish, and a restore is not judged at all: each leaves two open forms on one address, which is the arrangement ruled question 3 = A refuses. Card item 7 names publish ("The form write door, os validate and publish each refuse") and Done-when asks a pin for each of the three refusals; there is no publish pin. The second comment on FORM_ADDRESS_TAKEN in packages/spec/src/api/error-code-ledger.zod.ts says "the form save, draft promotion and restore doors refuse": declared, not enforced, in a hits file. Fix: ask the refusal in promoteDraftForPublish and the restore writer beside the list refusal, pin each, or correct the ledger and take the gap to the seat.

M2 (must-fix) — Done-when's pins are not all there, and two of the eight D6 pins do not hold the read they name. The card makes the pins the proof that no withdrawn form re-opens; a design that reads closed is not that proof.

  • By the PR's own table, ablation A2 (the form half of the layer) and A5f (the per-package form layer) turn nothing red, and pin 1 stays green under A1. The form half of the two-type layer is therefore unpinned: it can be deleted with the suite green. The card's fixture for pin 2 cannot show it, because the withdrawing override is itself the served candidate. A fixture that does: the base authors the form with its link kept and switched off, and an old-shape row of that name stands open on the same link; both doors must answer 404. If the dev finds no fixture where that half is the only thing keeping an address closed, that is a finding for the seat (the half is dead), not a reason to leave it unpinned.
  • Absent: the served-rows-only pin, both fixtures. The closed-reading pin (a seeded package-less list, and a stored package-less container, over an authored form). In the bound pin: "where the base's pair cannot be ensured", "into the pair as its own item", and "after all of them the doors serve the package's form". The rule 9 pin (and see S6). The declared_package_ships_no_such_item pin for a form override of a name shipped in neither type. The route pin that a caller refused /api/v1/meta/view/NAME is refused /api/v1/meta/form/NAME. The reset and delete pins; the container re-saved without the member; the failed write that leaves both rows. Byte-equality of the list row (the one test asserts viewKind, on save only). The data.object door pin. The GET /api/v1/meta/view fixture pin. The examples/app-crm byte-equal pin. The pin that an old-shape view write on a taken slug still saves. The publish clash pin (M1).
  • Not in the PR: the per-type arm inventory of item 2; the ablation records for the D5 pins; the rebuild, on-disk mutation and empty-git diff HEAD proof Done-when asks of each ablation run.

S1 (should-fix) — packages/rest/src/form-routes.ts: servedForms.length being zero switches the door to projectedFormsOf(views). That is a second candidate source inside the door, keyed on emptiness, where D6 rules 1 and 3 give the door one read, and it is a consumer-side fallback (Prime Directive 12). It was added for test doubles that answer an empty list. No divergence from the protocol's read was constructed, so it is not graded must-fix; key it on the protocol's capability or remove it and fix the doubles.

S2 (should-fix) — packages/metadata-protocol/src/protocol-form-reads.ts: the cross-type served-row resolution runs only at addresses where the package authors a form item. Over a base that ships the form as an old shape, a package-less stored form row of the same name (a write the doors admit) is listed beside the base's projected form: two definitions at one address, against D5's "one address holds one definition" and its one served-row order. The answer also changes when the base later moves to forms:. It fails closed, so it is not a re-opening; it is an upgrade-time surprise. Scenario detail is in the summary to the seat.

S3 (should-fix) — packages/spec/src/system/translation.zod.ts, system/i18n-resolver.ts: D8 lists forms.NAME.sections.SECTION.label, .description and .fields.FIELD.* as part of the family, with _sections as the default when the family has no key. The family schema is strict and refuses sections; translateForm reads section copy from _sections only. Add the branch, or have the seat name the card that owns it.

S4 (should-fix) — packages/rest/src/meta-item-read-gate.ts and the protocol: form is overridable, and translateForm promises the ADR-0029 D9.2a rule that an override's own changed text outranks the base's catalog. There is no packaged-base accessor for form (no row in PACKAGED_BASE_ACCESSORS), so the comparison has no base and an override's changed title is replaced by the base's translation, on /meta/form and on the public door.

S5 (should-fix, SQL first) — readEffectiveForms drops names and packageId from the request and filters in memory after full reads of both types and of every stored row of both. readEffectiveFormItem calls it up to three times for one by-name read, and each anonymous door request repeats the view-list and stored-row reads for the form read, the two per-package layers and the unreadable bodies. No reason is given in the code. Push the name and package predicates down, or state why the two-type resolution cannot.

S6 (should-fix) — Rule 9: Done-when asks a pin that an organization-scoped form save leaving a withdrawn form open is refused "as the same view save is today". On this tree no write-time withdrawal judgement exists in metadata-protocol (anonymousFormIntakeWithdrawnIn has no caller there; refuseOrganizationScopedWrite refuses every organization-scoped write first). The PR neither pins the form case nor reports that the item's premise is stale. Report it to the seat with the reading.

S7 (should-fix) — docs/qa/platform-checklist/coverage.json: the waiver says no app the checklist drives authors forms:, and this diff adds forms: [FeedbackForm] to the showcase. It also names card ③ as the mover of contact-us where the card says ④.

S8 (should-fix) — the second changeset declares Clause-②: no / Metadata-protocol: none at patch for two packages in a PR whose kind is narrowed. The gate is green; the card's sentence is not met to the letter. The seat rules whether the @object-ui train is exempt.

S9 (should-fix) — the PR body still lists the SKILL.md row under "named, not made" and does not cite the two rulings for the ceiling raise, which amendment 7183329743 asks for in the body. A body edit; it moves no head.

N1 (nit) — packages/lint/src/validate-form-items.ts: the consumer-less advisory is silent for every item that declares overrides, where D1 and item 9 ask it silent only when the base's form has a consumer.
N2 (nit) — protocol-meta-item-reads.ts: readEffectiveFormItem answers the generic item when the name is listed only at another package; closed at this address, so no exposure.
N3 (nit) — packages/spec/liveness/form.json (sharing): the evidence quotes lines findPublicForm no longer has and names the view path for a form item.
N4 (nit) — packages/spec/src/kernel/metadata-plugin.zod.ts: the registry-row comment says "overlayable per org" and names a scope set of global, org and user, while organization-scoped writes are refused on this tree (ADR-0131 D6); the comment describes a layer no door writes.
N5 (nit) — the cross-type resolution in protocol-form-reads.ts has no anchor file of its own; the doors' ADR-0159 anchor is an edit of the existing form-routes.ts file.

Files that hold. packages/spec/src/ui/view.zod.ts, ui/form-intake-layer.ts, ui/anonymous-form-intake.ts, ui/old-shape-form-withdrawals.ts, ui/index.ts, src/index.ts, stack.zod.ts, kernel/metadata-type-schemas.ts, kernel/customization-package.ts, kernel/collection-item-owner-stamp.ts, meta-spelling/manifest-collection-spelling.ts, meta-spelling/meta-url-data.generated.ts, the migration entry, skills/objectstack-platform/SKILL.md: each agrees with the decision it implements. protocol-form-writes.ts (the list refusal and the same-transaction row removal), protocol-packaged-base-refusal.ts, runtime-authoring-gate.ts, the two anchor files, feedback.form.ts: hold as read. Their findings are the ones graded above.

Two must-fix. The verdict is on M1 and M2; the nine should-fix items do not carry it.

Implemented-by: claude/project-thread-pu5dnt-b
Reviewed-by: l2-37086 subagent of session_011y7As8wf3DSPRevwNnYLcM

VERDICT: FAIL

…ectstack-ai/objectstack into claude/project-thread-pu5dnt-b

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011y7As9cjn4Y9vAUQbVH4fq
…estore; one candidate read at the form doors

formTypeWriteRefusal asks the package-less list refusal and the public
address clash together, at draft promotion and in the restore writer,
so the three doors the ledger names all refuse FORM_ADDRESS_TAKEN.

The form doors read their candidates from the effective form read alone;
the test doubles serve that read as the protocol does for an old-shape
fixture, through projectedFormsOf.

The effective form read pushes names down, resolves a package-less stored
form row at an old-shape address in the served-row order (one definition
per address), and the by-name read resolves the name once.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011y7As9cjn4Y9vAUQbVH4fq
…eading, the bound and the form write doors

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011y7As9cjn4Y9vAUQbVH4fq
…ead, and a form override's own text over its base's catalog

The cached plain read of GET /meta/:type/:name judges a form through the
per-caller read gate, as it judges a view, so a caller refused a form's
document at /meta/view/NAME is refused it at /meta/form/NAME.

A form gets a packaged-base accessor (getPackagedFormBase: the base's
authored form, else the form its old shape carries through the
projection), so an override's changed text outranks the base's catalog
on /meta/form and on the public door (ADR-0029 D9.2a).

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011y7As9cjn4Y9vAUQbVH4fq
… ceiling after the merge

Main's eight new lines in the facade met this branch's additions above the
ceiling. The form-body read's docblock points at its facet's contract, and
the two spec/ui type imports join the pinned one; nothing else changes.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011y7As9cjn4Y9vAUQbVH4fq
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-alice · session_011y7As8wf3DSPRevwNnYLcM

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 921f5d06052d8e66c7580b96d5c2b268095b9f76
Local-runs: none
Scope: packages/spec/src/api/error-code-ledger.zod.ts, packages/spec/src/index.ts, packages/spec/src/kernel/collection-item-owner-stamp.ts, packages/spec/src/kernel/customization-package.ts, packages/spec/src/kernel/metadata-plugin.zod.ts, packages/spec/src/kernel/metadata-type-schemas.ts, packages/spec/src/meta-spelling/manifest-collection-spelling.ts, packages/spec/src/meta-spelling/meta-url-data.generated.ts, packages/spec/src/migrations/entries/semantic/18.form-type-define-form-and-packageless-list-at-form-name.ts, packages/spec/src/stack.zod.ts, packages/spec/src/system/i18n-resolver.ts, packages/spec/src/system/translation.zod.ts, packages/spec/src/ui/anonymous-form-intake.ts, packages/spec/src/ui/form-intake-layer.ts, packages/spec/src/ui/index.ts, packages/spec/src/ui/old-shape-form-withdrawals.ts, packages/spec/src/ui/view.zod.ts, skills/objectstack-platform/SKILL.md + packages/rest/src/form-routes.ts, packages/rest/src/meta-item-read-gate.ts, packages/rest/src/public-form-two-type-withdrawal.test.ts, packages/metadata-protocol/src/protocol-form-reads.ts, packages/metadata-protocol/src/protocol-form-writes.ts, packages/metadata-protocol/src/protocol-save.ts, packages/metadata-protocol/src/protocol-history-and-publish.ts, packages/metadata-protocol/src/protocol-diff-delete-load.ts, packages/metadata-protocol/src/protocol-meta-item-reads.ts, packages/metadata-protocol/src/protocol-meta-list-reads.ts, packages/metadata-protocol/src/protocol-packaged-base-refusal.ts, packages/metadata-protocol/src/protocol-authoring-gate.ts, packages/metadata-protocol/src/runtime-authoring-gate.ts, packages/metadata-protocol/src/protocol.ts, packages/lint/src/validate-form-items.ts, packages/lint/src/authoring-rules.ts, packages/lint/src/i18n-walk.ts, packages/lint/src/validate-translation-references.ts, packages/spec/liveness/form.json, packages/spec/src/kernel/metadata-credential-fields.test.ts, scripts/adr-anchors/packages__rest__src__form-routes.ts.json, scripts/adr-anchors/packages__spec__src__ui__old-shape-form-withdrawals.ts.json, scripts/check-skills-token-ratchet.mjs, scripts/check-stack-collection-maps.mjs, ui/scripts/check-spec-symbol-derivation.mjs, docs/qa/platform-checklist/coverage.json, examples/app-showcase/src/ui/forms/feedback.form.ts, .changeset/37086-form-metadata-type.md, .changeset/37086-form-type-console-strings.md, content/docs/references/api/protocol.mdx, content/docs/references/system/translation.mdx, packages/metadata-protocol/src/protocol-discovery-and-bases.ts, packages/rest/src/data-write-summary-recompute-other-doors.test.ts, packages/rest/src/form-old-shape-before.json, packages/rest/src/meta-dashboard-view-i18n-explicit-override.test.ts, packages/rest/src/meta-item-read-routes.ts, packages/rest/src/public-form-app-crm-byte-equal.test.ts, packages/rest/src/public-form-file-field.test.ts, packages/rest/src/public-form-intake-availability.test.ts, packages/rest/src/public-form-option-subset.test.ts, packages/rest/src/public-form-required.test.ts, packages/rest/src/public-form-routes.stored-row.test.ts, packages/rest/src/public-form-routes.test.ts, packages/rest/src/public-form-section-i18n.test.ts, packages/rest/src/public-form-submit-answer.test.ts, packages/rest/src/public-form-title-i18n.test.ts, packages/rest/src/public-form-withdrawal.test.ts, packages/rest/src/rest-write-route-hook-refusal-sentence.ledger.test.ts, packages/rest/vitest.repo-tests.json, packages/spec/liveness/state-counts/translation.md, packages/spec/liveness/translation.json, packages/spec/src/system/i18n-resolver.form-item.test.ts, scripts/adr-anchors/packages__metadata-protocol__src__protocol-form-reads.ts.json, scripts/check-examples-live-imports.mjs, scripts/cross-package-test-inputs.mjs, turbo.json, packages/cli/src/utils/i18n-bundle-extract.ts, packages/cli/src/utils/i18n-coverage.ts, packages/cli/test/i18n-form-section-entry-coverage.test.ts, packages/lint/src/validate-translation-references.test.ts, packages/metadata-protocol/src/meta-overlay-cache.test.ts, packages/metadata-protocol/src/meta-overlay-cache.ts, packages/metadata-protocol/src/protocol-batch-data.ts, packages/metadata-protocol/src/protocol.view-expansion-reconcile-call-sites.test.ts, packages/metadata-protocol/src/sys-metadata-repository.ts, packages/metadata-protocol/src/protocol-package-commits.ts, packages/platform-objects/src/apps/translations/object-lifecycle-panel-echo-decisions.test.ts, content/docs/deployment/cli.mdx, content/docs/deployment/validating-metadata.mdx, content/docs/getting-started/build-with-claude-code.mdx, content/docs/ui/react-pages.mdx, docs/audits/2026-07-unknown-key-strictness-ledger.counts/system.md, packages/spec/dropped-refinements.baseline.json, content/docs/references/api/automation-api.mdx
Security-touching: yes
Rule-change-verified: none

Delta round on PR #37422 (PR B of card #37086's fixed cut), base = PR A's branch claude/project-thread-pu5dnt (head c41ed09c92, PASS on its own record of this round), 176 files, +6264 / -368. The previous record is 7201455403 on 62923e91e3 (PASS; N9 narrowed and open, N11 and N12 nits). Read for this round: that record, the delta 62923e91e3..921f5d0605 (the merge 6f5d2cca34 of PR A, the regeneration commit d1caba7745, and the two authored commits d5c5b92d5c and 921f5d0605), the merge compared with a recomputed merge of its two parents, the net diff against PR A compared path by path with the reviewed one, the cited code at this head, and the 71 check-runs on this head. Nothing was built, run or re-run. The narrowing face holds; the Scope: line is the previous one widened by the two files the merge and its regeneration reconciled.

What moved. The net diff against PR A has the same 176 paths with the same statuses. Added and removed lines are identical on every path but five: the two files the authored commits touch, and three counters. Each is judged below.

① Derived judgments

Nothing in the delta changes an accept set, an answer's shape or the public surface of this PR.

  • The sentence a held form item carries in failed[] (protocol-package-commits.ts, d5c5b92d5c): the string changes, the rule does not. It now states what happened (nothing written, the form stays as published) and points at the entry of each view row for the cause; it no longer prescribes a second revert. Same condition, same failed[] entry, same code path; one string literal and one comment are the whole commit. No test pins the old wording. Right.
  • protocol.ts (921f5d0605): one docblock becomes a one-line pointer to the function that carries the full contract (readUnreadableFormBodies, whose own docblock states it), and two type-only imports from @objectstack/spec/ui fold into the type-only import already there. Both names are still used once each in the file. No runtime statement changes. Right.
  • Every judgment of the previous records not named here stands as judged there.

② Semver level

Unchanged: both changesets are untouched by the delta, and nothing in it removes or retypes an export. Both Check Changeset runs are green on this head.

③ Boundary flags

  • The merge 6f5d2cca34. Compared with a recomputed merge of its parents, three paths were resolved by hand; every other path equals the recomputed merge.
    • protocol-diff-delete-load.ts, imports only. main moved the platform-record predicate into @objectstack/metadata and imports isPlatformRecordRow from there; the import of isPlatformOrigin, which only the moved predicate used, goes with it. This PR's own import of retireOverlayCacheOnRollback is kept. At this head each imported name has exactly one use, no use is left without an import, and this PR's net change to the file is line for line the reviewed one. Behaviour unchanged.
    • the translated-leaf census in object-lifecycle-panel-echo-decisions.test.ts: base 839, main +1 (the skill form's context row), this PR +1 (the form type's label), committed 841, both comments kept in order.
    • packages/spec/dropped-refinements.baseline.json: base 278 schemas / 1210 sites, main +0 / +5, this PR +1 / +8, committed 279 / 1223. Counted in the tree: the ledger's entries at this head are 279 schemas and 1223 sites, equal to its header.
  • The regeneration d1caba7745 touches two generated files only: one row in automation-api.mdx that main added, and the system/ strictness count (base 410, main +1, this PR +1, committed 412).
  • The facade ceiling. protocol.ts was at its ceiling of 11705 lines; main added 8 to it, so the merge stood at 11713. 921f5d0605 takes 8 lines out of this PR's own additions and the file is 11705 again. The ceiling entry in scripts/facade-delegation-registry.json is not in this diff: the gate was met, not moved.
  • main's restore-limb comment now names the exception this PR makes (a commit's form items wait for its view rows), so the comment and the walk agree.
  • ADR-0160 line 425 cites a path PR A renames. No gate is red for it on this head (all lanes green; the ADR corpus judges symbol anchors, not bare paths). A row for the ADR upkeep card, escalated on PR A's record; docs/adr/** is not in this diff.
  • Escalated to the seat, unchanged: ADR-0067 D3 describes a revert as running per item; an add-only note is the seat's to order.
  • Escalated to the seat, new: main has moved 7 commits past the commit merged into PR A, and PR A reads not mergeable against it. A recomputed merge of this head with that main leaves two generated references to regenerate (content/docs/references/system/translation.mdx, content/docs/references/api/protocol.mdx). A further merge makes a further head, which this record does not name.
  • .claude/**: no path in the delta or in this PR's net diff. The header reads none.
  • Gate and census edits in the delta: the three counters above, each the sum of both sides; no ceiling raised.
  • Check-runs on this head: 71 runs, 62 success, 9 skipped, none red, none running. mergeable_state is clean against PR A's branch.
  • SQL push-down (Prime Directive 5): the delta adds no read or write. No finding.

④ Design judgment

Against ADR-0159 D3 and D5, ADR-0067 D2 and D3, and the card's Done-when. The tree was read, not the PR body's account.

Earlier findings, by id.

  • N11: closed. The held item's sentence no longer promises that a second revert succeeds, and the restore-limb comment states the form exception.
  • N12: still open (nit). The revertCommit docblock in protocol.ts still carries neither the walk order nor the hold; the file is at its ceiling, so this stays a follow-up.
  • N9: still open (nit), narrowed as recorded. The delta does not touch it.
  • N10: still open (nit); a follow-up card outside this PR, as ruled.
  • S5: still open (should-fix), residual as recorded; taken by the seat as a follow-up.
  • S8, S12: closed, as recorded.
  • N1, N2, N6, N7, N8: still open (nit), kept or accepted as recorded. The delta makes none worse.

Files that hold. packages/metadata-protocol/src/protocol-package-commits.ts, protocol.ts, protocol-diff-delete-load.ts, the reconciled counters and the two regenerated files: each agrees with the decision or the finding it answers.

No must-fix. No new should-fix; one carried (S5), not carrying the verdict.

Implemented-by: claude/project-thread-pu5dnt-b
Reviewed-by: l2d-37086 subagent of session_011y7As8wf3DSPRevwNnYLcM

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-alice · session_011y7As8wf3DSPRevwNnYLcM

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 20a80b19d16058700b6a44ea91b38be9da771e45
Local-runs: none
Scope: packages/spec/src/api/error-code-ledger.zod.ts, packages/spec/src/index.ts, packages/spec/src/kernel/collection-item-owner-stamp.ts, packages/spec/src/kernel/customization-package.ts, packages/spec/src/kernel/metadata-plugin.zod.ts, packages/spec/src/kernel/metadata-type-schemas.ts, packages/spec/src/meta-spelling/manifest-collection-spelling.ts, packages/spec/src/meta-spelling/meta-url-data.generated.ts, packages/spec/src/migrations/entries/semantic/18.form-type-define-form-and-packageless-list-at-form-name.ts, packages/spec/src/stack.zod.ts, packages/spec/src/system/i18n-resolver.ts, packages/spec/src/system/translation.zod.ts, packages/spec/src/ui/anonymous-form-intake.ts, packages/spec/src/ui/form-intake-layer.ts, packages/spec/src/ui/index.ts, packages/spec/src/ui/old-shape-form-withdrawals.ts, packages/spec/src/ui/view.zod.ts, skills/objectstack-platform/SKILL.md + packages/rest/src/form-routes.ts, packages/rest/src/meta-item-read-gate.ts, packages/rest/src/public-form-two-type-withdrawal.test.ts, packages/metadata-protocol/src/protocol-form-reads.ts, packages/metadata-protocol/src/protocol-form-writes.ts, packages/metadata-protocol/src/protocol-save.ts, packages/metadata-protocol/src/protocol-history-and-publish.ts, packages/metadata-protocol/src/protocol-diff-delete-load.ts, packages/metadata-protocol/src/protocol-meta-item-reads.ts, packages/metadata-protocol/src/protocol-meta-list-reads.ts, packages/metadata-protocol/src/protocol-packaged-base-refusal.ts, packages/metadata-protocol/src/protocol-authoring-gate.ts, packages/metadata-protocol/src/runtime-authoring-gate.ts, packages/metadata-protocol/src/protocol.ts, packages/lint/src/validate-form-items.ts, packages/lint/src/authoring-rules.ts, packages/lint/src/i18n-walk.ts, packages/lint/src/validate-translation-references.ts, packages/spec/liveness/form.json, packages/spec/src/kernel/metadata-credential-fields.test.ts, scripts/adr-anchors/packages__rest__src__form-routes.ts.json, scripts/adr-anchors/packages__spec__src__ui__old-shape-form-withdrawals.ts.json, scripts/check-skills-token-ratchet.mjs, scripts/check-stack-collection-maps.mjs, ui/scripts/check-spec-symbol-derivation.mjs, docs/qa/platform-checklist/coverage.json, examples/app-showcase/src/ui/forms/feedback.form.ts, .changeset/37086-form-metadata-type.md, .changeset/37086-form-type-console-strings.md, content/docs/references/api/protocol.mdx, content/docs/references/system/translation.mdx, packages/metadata-protocol/src/protocol-discovery-and-bases.ts, packages/rest/src/data-write-summary-recompute-other-doors.test.ts, packages/rest/src/form-old-shape-before.json, packages/rest/src/meta-dashboard-view-i18n-explicit-override.test.ts, packages/rest/src/meta-item-read-routes.ts, packages/rest/src/public-form-app-crm-byte-equal.test.ts, packages/rest/src/public-form-file-field.test.ts, packages/rest/src/public-form-intake-availability.test.ts, packages/rest/src/public-form-option-subset.test.ts, packages/rest/src/public-form-required.test.ts, packages/rest/src/public-form-routes.stored-row.test.ts, packages/rest/src/public-form-routes.test.ts, packages/rest/src/public-form-section-i18n.test.ts, packages/rest/src/public-form-submit-answer.test.ts, packages/rest/src/public-form-title-i18n.test.ts, packages/rest/src/public-form-withdrawal.test.ts, packages/rest/src/rest-write-route-hook-refusal-sentence.ledger.test.ts, packages/rest/vitest.repo-tests.json, packages/spec/liveness/state-counts/translation.md, packages/spec/liveness/translation.json, packages/spec/src/system/i18n-resolver.form-item.test.ts, scripts/adr-anchors/packages__metadata-protocol__src__protocol-form-reads.ts.json, scripts/check-examples-live-imports.mjs, scripts/cross-package-test-inputs.mjs, turbo.json, packages/cli/src/utils/i18n-bundle-extract.ts, packages/cli/src/utils/i18n-coverage.ts, packages/cli/test/i18n-form-section-entry-coverage.test.ts, packages/lint/src/validate-translation-references.test.ts, packages/metadata-protocol/src/meta-overlay-cache.test.ts, packages/metadata-protocol/src/meta-overlay-cache.ts, packages/metadata-protocol/src/protocol-batch-data.ts, packages/metadata-protocol/src/protocol.view-expansion-reconcile-call-sites.test.ts, packages/metadata-protocol/src/sys-metadata-repository.ts, packages/metadata-protocol/src/protocol-package-commits.ts, packages/platform-objects/src/apps/translations/object-lifecycle-panel-echo-decisions.test.ts, content/docs/deployment/cli.mdx, content/docs/deployment/validating-metadata.mdx, content/docs/getting-started/build-with-claude-code.mdx, content/docs/ui/react-pages.mdx, docs/audits/2026-07-unknown-key-strictness-ledger.counts/system.md, packages/spec/dropped-refinements.baseline.json, content/docs/references/api/automation-api.mdx
Security-touching: yes
Rule-change-verified: none

Delta round on PR #37422 (PR B of card #37086's fixed cut), base = PR A's branch claude/project-thread-pu5dnt (head f4ce756599, PASS on its own record of this round), 176 files, +6264 / -368. The previous record is 7203227609 on 921f5d0605 (PASS; S5 carried; N12, N9, N10 and five accepted nits open). Read for this round: that record, the delta 921f5d0605..20a80b19d1 (the merge 2321811241 of PR A, and the regeneration commit 20a80b19d1), the merge compared with a recomputed merge of its two parents, the net diff against PR A compared path by path with the reviewed one, what main changed in the files this PR's code reads, and the check-runs on this head. Nothing was built, run or re-run. The narrowing face holds; the Scope: line is the previous one unchanged (both regenerated files were already on it).

What moved. No authored line of this PR. The net diff against PR A has the same 176 paths with the same statuses, and the added and removed lines are identical on every path, the two regenerated files included: their new rows are main's, present on both sides of the diff.

① Derived judgments

Nothing in the delta changes an accept set, an answer's shape or the public surface of this PR. Every judgment of the previous records stands as judged there. What main brought into the files this PR's forms.NAME.sections handling reads was judged for interaction:

  • translation.zod.ts. No interaction. Right. main adds one key, options (value to label), on a field of metadataForms.TYPE.fields, with two aliases. This PR's forms.NAME.sections.SECTION and the object-level _sections.SECTION are built by one factory of their own, which main did not touch: a section entry still accepts label, placeholder and helpText and nothing else, on both faces. The two groups are siblings; neither schema is nested in the other. A section entry names an object's field, whose choices are translated at the object's own field node, so the entry needs no options key.
  • i18n-resolver.ts. No interaction. Right. main's option overlay lives in the metadata-form translator (translateFormField and a lookup of its own under metadataForms). This PR's form translator reads forms.NAME and falls back to objects.OBJECT._sections key by key; it neither calls nor is called by the metadata-form walker.
  • i18n-walk.ts. No interaction. Right. main's lines emit metadataForms.TYPE.fields.PATH.options.VALUE from a metadata form's declared options. This PR's walkForms emits forms.NAME… from the stack's forms collection, a different input and a different address. The form type declares no metadata-form module of its own (19 modules on both sides of this diff), so main's walk expects no new entry because of this PR.
  • The generated metadata-form bundles. main regenerated all eleven with the option entries. This PR's net change to each is still the one node it had (the form type's label, three lines), at the same place.
  • packages/lint index.ts and rule-explanations.ts. main retires one security rule's export and explanation and rewrites two others. This PR's additions to both files are form rules; none reads the retired symbol, and no line of this PR names a record-bypass bit.
  • The form type itself (view.zod.ts, the form schema and its intake layer): not touched by main in this merge.

② Semver level

Unchanged: both changesets are untouched by the delta, and nothing in it removes or retypes an export. Check Changeset is green on this head.

③ Boundary flags

  • The merge 2321811241 equals the recomputed merge of its two parents on every path; no path was resolved by hand. The merge driver set two generated references aside, the two the previous record named.
  • The regeneration 20a80b19d1 touches exactly those two files. content/docs/references/system/translation.mdx: three rows, each the fields type of a metadataForms node gaining options. content/docs/references/api/protocol.mdx: five rows of the permission-set shape, carrying main's new wording for the record-bypass bits (feat(security)!: View All and Modify All stop opening fields; viewAllFields is the one every-field bit #37371). Both are main's schema text rendered; neither row describes anything this PR declares, and at this head each file equals PR A's plus this PR's reviewed rows.
  • Counters. main moved none of the three the previous merge reconciled (the translated-leaf census reads 841 at this head, as reviewed); no ceiling is raised in the delta.
  • Check-runs on this head when last read: 65 runs, 40 success, 7 skipped, none red, 18 still running (Test Core 1, 2, 3, 5 and 6 of 10; Test UI 1, 3, 4, 6, 7, 8, 9, 12, 13, 14, 15 and 16 of 16; Type Check UI). Every lint lane, Type Check · workspace, the consumer and source gates, both builds and Check Changeset concluded green, the Lint · docs & code guards lane that is red on PR A among them. This record does not cover the 18 runs that had not concluded.
  • mergeable_state is unstable, mergeable true against PR A's branch: no conflict, checks still running.
  • Escalated to the seat, new: main has moved 5 commits past the commit merged into PR A (to 9476092c7e). A recomputed merge of this head with it has no conflict and sets no generated file aside. Two of those commits change how the console lays out a named or public form, and one of them edits packages/spec/liveness/view.json, a file this PR also edits (it merges as text, without conflict); they were not judged here. A further merge makes a further head, which this record does not name.
  • Escalated to the seat, unchanged: ADR-0067 D3 describes a revert as running per item (an add-only note is the seat's to order); ADR-0160 line 425 cites a path PR A renames (a row for the ADR upkeep card).
  • .claude/**: no path in the delta or in this PR's net diff. The header reads none.
  • Security: the header reads yes, as before: this PR's read gate and anonymous intake are security behaviour. The delta adds no line to them. main's permission change (feat(security)!: View All and Modify All stop opening fields; viewAllFields is the one every-field bit #37371) redefines what the record-bypass bits vote on a field; no line of this PR reads those bits.
  • SQL push-down (Prime Directive 5): the delta adds no read or write. No finding.

④ Design judgment

Against ADR-0159 D3, D5 and D8, ADR-0067 D2 and D3, and the card's Done-when. The tree was read, not the PR body's account.

Earlier findings, by id.

  • N11: closed, as recorded.
  • N12: still open (nit). The delta does not touch it.
  • N9: still open (nit), narrowed as recorded.
  • N10: still open (nit); a follow-up card outside this PR, as ruled.
  • S5: still open (should-fix), residual as recorded; taken by the seat as a follow-up.
  • S8, S12: closed, as recorded.
  • N1, N2, N6, N7, N8: still open (nit), kept or accepted as recorded. The delta makes none worse.

Files that hold. The two regenerated references, and every file of the previous record: each carries the same net change against PR A as at 921f5d0605.

No must-fix. No new should-fix; one carried (S5), not carrying the verdict.

Implemented-by: claude/project-thread-pu5dnt-b
Reviewed-by: l2d-37086 subagent of session_011y7As8wf3DSPRevwNnYLcM

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-alice · session_011y7As8wf3DSPRevwNnYLcM

席位意见:ACCEPT,交 os-zhuang 和维护者合并。

席位核对 — ACCEPT · head 20a80b1 (2026-11-26T21:54Z)

  1. Shape: 176 files, +6264/-368, stacked on refactor(spec)!: rename the Studio helper defineForm to defineMetadataForm and its modules to *.metadata-form.ts #37366 (base claude/project-thread-pu5dnt, retargets to main when A lands). Fixes #37086. Governed (skills/objectstack-platform/SKILL.md, the one forms enumeration row ruled in 7183329743 Q1=A; token ceiling via rulings 6819475461 + 6840575378) and Clause-②: yes (narrowing) → hand-off with pm:awaiting-merge.
  2. Premise measured: D7-b answered by measurement (an override at a form's name over an old-shape base is admitted and closes the address; over a base authoring a form item it is 403). Every rework's pins carry CONTROLs and ablations recorded in the body (R1–R14, T1–T13, U1, W1, W2).
  3. Review: contract review FAIL 7184811209 → delta FAIL 7188030110 → delta PASS 7197310261 → 7201455403 → 7203227609 → merge delta 7203725192 at this head. Closed: M1, M2, M3, S1–S4, S6, S7, S9–S12, rework-4 item; S8 closed by ruling. Carried: S5 (should-fix, seat follow-up card), nits N1, N2, N6–N10, N12 accepted or carded.
  4. Gates: at this head 60 success, 9 expected skip, 0 failed; two body-guard runs re-running after this body write. dogfood_battery: 20a80b1 · exit 0 · 489 files passed · 4140 tests passed · no failure. l1-face flags: shape (stacked base, by the card's approved cut), changeset for @object-ui/types (both files under __tests__; files[] publishes dist only, so no changeset is owed), dogfood (answered above).
  5. Out of scope / follow-ups: as listed above; filed by the seat after both PRs merge, worded as rules.
  6. Accepted deviations: 试行偏离 (fresh agent per rework; no in-agent CI wait; local runs limited to affected tests and ratchets, rest from CI; dev ran l1-face). protocol.ts held at its 11705-line facade ceiling by trimming this PR's own docblock (behaviour-neutral, merge delta 7203227609).

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-alice · session_011y7As8wf3DSPRevwNnYLcM

Maintainer ruling — S5 is an accepted deviation · 2026-11-26T23:45Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-alice · session_011y7As8wf3DSPRevwNnYLcM

维护者速读

Review request, by the maintainer's order 2026-11-27T03:22Z (「这些应该你处理啊」) after her ruling on S5: seat ACCEPT 7204181264 and merge-delta PASS 7203725192 on head 20a80b19d16058700b6a44ea91b38be9da771e45 (2026-11-27T03:23Z). The seat's --handoff stroke refuses this head because S5 is open on its record; the label and the request are written by hand under the maintainer's ruling, not by the guarded stroke.

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 27, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-alice · session_011y7As8wf3DSPRevwNnYLcM

Landing · 2026-11-27T03:26Z

Maintainer approval: Alice (os-alice), 「37422 我批准了,你可以直接落地」, seat 7's project chat, 2026-11-27T03:24Z; os-zhuang APPROVED at 20a80b19d16058700b6a44ea91b38be9da771e45. Seat ACCEPT 7204181264, merge-delta PASS 7203725192, dev report with this head's dogfood battery 7208979723. This PR merges into #37366's branch; #37366 then lands on main (approved in the same exchange, 2026-11-27T03:24Z).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue protocol:system protocol:ui size/xl tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants