Skip to content

fix(lint)!: four publish-time checks for data-model metadata that saves and does not work - #37513

Merged
os-zhuang merged 6 commits into
mainfrom
claude/issue-35143-data-model-checks
Nov 26, 2026
Merged

os-zhuang merged 6 commits into
mainfrom
claude/issue-35143-data-model-checks

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Part of #35143

Clause-②: no (narrowing)
Metadata-protocol: narrowed
Skills-docs: follow-up #37529

维护者速读

  • 搭应用的人在发布对象和本地校验时,会被拦下两类“保存成功却不工作”的字段(汇总字段的子对象没有指回父对象、给不能关联记录的字段填了关联目标),另有两类只提醒不拦截。
  • 属于“发布期作者规则第二批”中的数据模型一族,替搭应用的人在保存时就发现汇总永远是 0、记录选择器把编号写进文本字段这类问题。
  • 已经存好的对象不会被改写也不会在启动时被拒,只是下次发布被拦并给出改法;误拦时撤回这次合并即可恢复。
  • 无

What changes

The Data model family of the card's second batch of publish-time checks, five lines, each verified on origin/main first.

Line Verdict on main This PR
D1 lookup named like a count or total holds, no rule new warning field/count-named-lookup
D2 formula reading an unconfigured summary already covered — field/summary-without-operations refuses the summary itself no rule; a coverage pin at the runtime gate
D3 summary whose child has no reference back holds, no rule new error rollup/child-without-parent-reference, added to the existing lintSummaryRollups
D4 reference on a type that reads none holds, no rule new error field/reference-on-non-reference-type
D5 approval detail editable while pending holds, no rule new warning approval-detail-editable-while-pending, added to the existing validateApprovalApprovers
  • D3 follows the engine's summary index (buildSummaryIndex). It reads summaryOperations.relationshipField when that is set. Otherwise it looks for the first master_detail / lookup on the child that references the parent. When the index finds no foreign key, the summary is skipped with nothing logged, so the field reads 0 or empty while every child write reports success.
    • The check counts the child's fields as served, including fields added by an object extension. It also counts the injected columns (owner_id, created_by and updated_by back to sys_user, plus the tenancy lookups).
    • A child the stack does not hold is not judged.
    • The finding is reported beside the existing aggregand arms, not instead of them.
  • D4 fires when a non-blank reference sits on any type outside REFERENCE_VALUE_TYPES plus summary. summary is exempt because the hosted blueprint reads summary + reference.
    • It runs on objects and on object extensions.
    • The record page's inline editor sends any field with a reference to the record picker, except the textual fallback types. For text, number and date fields the message therefore names the record-id write; a select and the other types the inline editor routes first are told only that the key links nothing.
  • D1 and D4 sit in one new gating entry, lintFieldReferenceShapes, which runs on both the object and the object_extension door. D1 is a warning, so it comes back as a 2xx advisory.
  • D5: an approval node with lockRecord not set to false makes the rule look at the flow's start object. If that object has a non-multiple lookup child drawn as a body table (relatedList: 'primary', read through isBodyTableRelationship), the rule warns once per flow. The approval lock covers master_detail children only.
  • Export surface: no new exports and no new catalogs. The new rule ids are module-local, which matches the Flows precedent's r2 PASS. The authoring-rule count in four docs pages moves from 80 to 81.
  • Upgrade guide: new ADR-0087 semantic entry publish-refuses-data-model-fields-that-save-and-do-not-work in @objectstack/spec. It is a notice only, because each fix is a choice only the author can make.

Tests

  • data-model-rules.field-reference-shapes.test.ts (new) covers D4 and D1:
    • both fire, and stay silent on legal shapes;
    • the object-extension location is reported;
    • the runtime gate refuses D4 on object and on object_extension, and returns D1 as an advisory.
  • data-model-rules.summary-rollup.test.ts covers D3:
    • fires on a child with no foreign key, and on a relationshipField that names no field of the child;
    • silent with master_detail, with lookup, with a relationshipField that names a real child field, when the child is absent, for sys_user via the injected column, and for a foreign key added by an extension on the CLI;
    • the runtime gate refuses, and passes once fixed.
  • validate-functional-completeness.test.ts covers D2: a bare summary that a formula reads is refused at the gate as field/summary-without-operations.
  • validate-approval-approvers.test.ts covers D5:
    • warns on a primary lookup child;
    • silent for a master_detail child, a non-body lookup and lockRecord: false;
    • rides the flow door as an advisory.
  • Door roster pins: lintFieldReferenceShapes is added to the exact rulesRun lists in three runtime-gate test files.

Acceptance notes

  • The Clause-② line differs from the dispatch order's literal spelling. The order asks for Clause-②: no together with Metadata-protocol: narrowed. The changeset gate refuses narrowed without the (narrowing) arm. Two of the checks refuse a publish that used to be accepted, so the change narrows. This PR therefore carries Clause-②: no (narrowing) and a ! title, the same as the Flows precedent.
  • D2 has no new rule. On main, a summary with no summaryOperations is already refused as itself, so the formula that reads it cannot publish either. That is recorded and pinned.
  • D4 exempts summary, because the hosted blueprint reads summary + reference. formula and autonumber still fire, but their message drops the record-picker clause because they have no editor.
  • D1 and D5 are warnings. They refuse nothing and make os validate --strict exit 1, as any warning does. D1 rides the object door as a gating-rule warning, so it comes back as an advisory, not a refusal.
  • Reading outside this card (R8 in lintDataModel). R8 counts refOf(def), and the keys optionsFrom / dataSource, as select option sources. Neither key exists in the spec. This is a carrier note and is not filed.
  • Collision with feat(spec)!: form is a metadata type of its own, and the form doors read a form over both types #37422. That PR also bumps the authoring-rule count in the same four docs pages, so they conflict textually. Whichever lands second takes the higher count. authoring-rules.ts merges cleanly.
  • Skills-docs follow-up is owed, as declared above.

Verification

Two-minute check: pnpm --filter @objectstack/lint exec vitest run --maxWorkers=2 src/data-model-rules.field-reference-shapes.test.ts src/data-model-rules.summary-rollup.test.ts. Expect every case to pass.

Read first, by risk:

  1. packages/lint/src/data-model-rules.ts, the D3 relation arm in summaryRollupFindings. It must agree with the engine's foreign-key choice, or it refuses roll-ups that compute.
  2. packages/lint/src/authoring-rules.ts: the new entry's doors (object, object_extension) and the served-fields map passed to the roll-up check.
  3. packages/lint/src/validate-approval-approvers.ts: the body-table reading for D5.

Readings at final head ad43f0b: lint 237/237 files, 9682 tests (at 2740a17); app-shell narrowed set 221/221 files, 2429 tests (at 48d632c) plus the retype pin file at ad43f0b; dogfood battery 487 passed, 3 skipped files, 4129 passed, 68 skipped tests; CI 63 success, 11 skipped, 0 failed (after the body edit re-ran four jobs).

Follow-ups from the contract review nits: #37577.

Also in this PR: 77ac3ce gives the objectql duplicatePackage roll-up fixture's child a foreign key back to its parent (the new rollup/child-without-parent-reference refusal turned that stale fixture red); 48d632c and ad43f0b make the console field designer drop reference on a retype to a type that reads none and strip a stored one at its read door (contract review M1, under the seat's scope line 7190889569), with its own @object-ui/app-shell patch changeset.

Earlier local readings (head b26f2c1, tree identical to the readings' tree 4e2ea58)
  • @objectstack/lint full suite, under the lock: Test Files 237 passed (237), Tests 9680 passed (9680), VERDICT command-exit 0.
  • metadata-protocol battery, under the lock: Test Files 370 passed, 9 skipped (379); Tests 23440 passed, 45 skipped; VERDICT command-exit 0.
  • New and changed lint test files: Test Files 7 passed (7), Tests 185 passed (185), VERDICT command-exit 0.
  • os validate on app-crm, app-multi-package, app-showcase, app-starter and app-todo: each "Validation passed", with zero findings from the four new checks.
  • The derived gate families (dispatch-gates.mjs --commands), the full dogfood battery and the CI check-runs are read in the os-dev-report comment on the card.

Generated by Claude Code

…es and does not work

Two errors refuse the publish and fail os validate: a summary whose child
has no field pointing back to the parent (rollup/child-without-parent-reference),
and a reference on a field type that reads none
(field/reference-on-non-reference-type). Two warnings refuse nothing: a
lookup named like a count or total (field/count-named-lookup), and a lookup
child drawn as a body table on a record a locking approval holds
(approval-detail-editable-while-pending). A formula reading an unconfigured
summary stays covered by field/summary-without-operations, pinned here.

Claude-Session: https://claude.ai/code/session_01Q4EjjQkY5yXZrN9BEA3rEK
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/l documentation Improvements or additions to documentation 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 2 package(s): @objectstack/lint, @objectstack/spec, touching 21 documentable anchor(s).

6 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/api/metadata-api.mdx (via object_extension (literal, a string literal in runtimeTypes))
  • content/docs/data-modeling/object-extensions.mdx (via object_extension (literal, a string literal in runtimeTypes))
  • content/docs/deployment/cli.mdx (via object_extension (literal, a string literal in runtimeTypes))
  • content/docs/deployment/validating-metadata.mdx (via AUTHORING_RULES (symbol, a top-level const object), runtimeTypes (symbol, a field of const object AUTHORING_RULES), object_extension (literal, a string literal in runtimeTypes))
  • content/docs/kernel/cluster.mdx (via object_extension (literal, a string literal in runtimeTypes))
  • content/docs/ui/actions.mdx (via object_extension (literal, a string literal in runtimeTypes))

⛔ 5 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/v18/18-3.mdx (via object_extension (literal, a string literal in runtimeTypes))
  • content/docs/releases/v18/18-4.mdx (via object_extension (literal, a string literal in runtimeTypes))
  • content/docs/releases/v18/18-5.mdx (via object_extension (literal, a string literal in runtimeTypes))
  • content/docs/releases/v18/18-6.mdx (via object_extension (literal, a string literal in runtimeTypes))
  • content/docs/releases/v19/index.mdx (via object_extension (literal, a string literal in runtimeTypes))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • 1 anchor(s) matched too much of the corpus to be a work list: master_detail (literal, 49 pages)
  • 6 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 — 177 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 1af67b26cdf5c6850a4cff8b44a94cf46b7a2502 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from c17d8f09197884df29c31bca9bec6f2cecc7db9b — the merge of head ad43f0b457457c90866eb2d7418d373ffb9fdfe3 into base 1af67b26cdf5c6850a4cff8b44a94cf46b7a2502, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main 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 c17d8f09197884df29c31bca9bec6f2cecc7db9b && git checkout c17d8f09197884df29c31bca9bec6f2cecc7db9b
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 1af67b26cdf5c6850a4cff8b44a94cf46b7a2502 ad43f0b457457c90866eb2d7418d373ffb9fdfe3 && git checkout -B drift-repro 1af67b26cdf5c6850a4cff8b44a94cf46b7a2502 && git merge --no-ff ad43f0b457457c90866eb2d7418d373ffb9fdfe3

node scripts/docs-audit/affected-docs.mjs --json 1af67b26cdf5c6850a4cff8b44a94cf46b7a2502

⚠️ 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 1af67b26cdf5c6850a4cff8b44a94cf46b7a2502 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

…ack to its parent

The own-currency roll-up is meant to be refused by the mixed-currency door
alone. Its child carried no field referencing the roll-up's object, so the
new rollup/child-without-parent-reference check refused the source save first.

Claude-Session: https://claude.ai/code/session_01Q4EjjQkY5yXZrN9BEA3rEK
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK

Contract-review-claim: session_01Q4EjjQkY5yXZrN9BEA3rEK · head 77ac3ce · 2026-11-26T11:03Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 77ac3ce25cacab9e2654fed7a77c00ec614658d5
Local-runs: none
Scope: packages/spec/src/migrations/entries/semantic/18.publish-refuses-data-model-fields-that-save-and-do-not-work.ts, packages/lint/src/authoring-rules.ts, packages/lint/src/data-model-rules.ts, packages/lint/src/validate-approval-approvers.ts, packages/lint/src/data-model-rules.field-reference-shapes.test.ts, packages/lint/src/data-model-rules.summary-rollup.test.ts, packages/lint/src/validate-approval-approvers.test.ts, packages/lint/src/validate-functional-completeness.test.ts, packages/lint/src/runtime-gate.object-writes.test.ts, packages/lint/src/runtime-gate.object-formula-writes.test.ts, packages/lint/src/validate-security-posture.runtime-surface.test.ts, packages/objectql/src/protocol-batch-object-registration.test.ts + read, not reviewed: packages/objectql/src/engine-summaries-and-expansion.ts, packages/spec/src/data/field-value.zod.ts, packages/spec/src/data/field.zod.ts, packages/spec/src/data/related-list-body-table.ts, packages/spec/src/data/injected-system-column-provenance.ts, packages/spec/src/kernel/unmanaged-install.ts, packages/spec/src/migrations/entries/README.md, packages/plugins/plugin-approvals/src/lifecycle-hooks.ts, packages/lint/src/runtime-gate.ts, packages/lint/src/object-graph.ts, packages/lint/src/system-fields.ts, packages/lint/src/index.ts, packages/lint/src/runtime.ts, packages/lint/src/rule-explanations.ts, packages/metadata-protocol/src/protocol-authoring-gate.ts, packages/metadata-protocol/src/runtime-authoring-gate.ts, packages/metadata-protocol/src/seed-loader.ts, packages/core/src/utils/import-field-meta.ts, ui/packages/plugin-detail/src/InlineFieldInput.tsx, ui/packages/plugin-detail/src/fieldEnrichment.ts, ui/packages/app-shell/src/views/metadata-admin/inspectors/ObjectFieldInspector.tsx, ui/packages/app-shell/src/views/metadata-admin/previews/object-fields-io.ts, content/docs/deployment/validating-metadata.mdx, the object definitions under examples/, and the hotcrm checkout
Security-touching: no
Rule-change-verified: none

Face: the file list holds one published-schema path (the ADR-0087 entry, the first path on the Scope line), and the PR body and the changeset declare Clause-②: no (narrowing). The floor is every path of the diff outside the prose faces, twelve files. Inputs: card #35143 with all eleven comments (premise table 7098105309, claim 7186969898, report 7190134451), the PR body, the net diff against merge base df0894a664d0ca598bf84a9061fab6e183cebda3, and the check-runs on this head (62 success, 12 skipped, none failed or pending). The records 7100465508 and 7100699767 on PR #36691 were read as the precedent for this class.

① Derived judgments

Each check was read against the code it cites at this head. Both refusals are true of the engine. One of them ships ahead of the platform's own designer (M1) and states a consequence that is wrong for part of its set (S1).

  • rollup/child-without-parent-reference (error; CLI and the object door): RIGHT, both arms.
    • No relationshipField: the engine takes the first lookup / master_detail field of the child whose reference is the parent's name (engine-summaries-and-expansion.ts:272-314) and, with none, skips the summary without a log line (:357). pointsBackTo (data-model-rules.ts:946-948) uses the same two types and the same comparison.
    • A written relationshipField: the engine takes it as written (:272). When it names no column of the child, a child row yields no parent id (:650-652), so nothing is recomputed. The lint refuses only that case and does not second-guess a field that exists, which is what the engine does.
    • A child the walk does not hold stays silent, so the objectql: a published roll-up summary that sums a text field makes every create, update and delete of its child answer 500, though each write lands — the authoring door does not check the summed field's type #28661 order (parent saved before its child) still publishes.
    • The child's fields are read as served. On the CLI objectsAsServed folds the stack's own extensions. At the door context.objects is the registry's served list, with the batch's pending object_extension drafts folded in (runtime-authoring-gate.ts:882-912, :1471-1472). An unmanaged install cannot carry objectExtensions (unmanaged-install.ts:99), so no install order puts a parent ahead of an extension-added foreign key.
    • The injected columns come from the spec's own tables (injectedSystemColumnDefs), the ones the registry spreads.
    • Differential: the baseline never holds the written item, so a stored object with the defect is refused at its next publish, as the changeset says. A child write that removes the foreign key is charged; an unrelated edit of a child under a roll-up that was already broken is not (the stored-universe pass).
  • field/reference-on-non-reference-type (error; CLI, the object and object_extension doors): the refusal is RIGHT. Every engine reader of reference asks the type first: referenceTargetOf (field-value.zod.ts:215-227), $expand (engine-summaries-and-expansion.ts:910), the seed loader (seed-loader.ts:1623), import (import-field-meta.ts:103). So the key links nothing on any other type. The summary exemption matches the console's own set (fieldEnrichment.ts:41-47). Wrong in two places: see M1 and S1.
  • field/count-named-lookup (warning): no accept-set change. Right as an advisory; see N1.
  • approval-detail-editable-while-pending (warning): RIGHT. A node locks unless lockRecord is false (lifecycle-hooks.ts:483), the detail-row lock reads master_detail fields only (:873-886), and a lookup child is a body table only by relatedList: 'primary' (related-list-body-table.ts:93-99). The rule reads the same predicate.
  • D2, no new rule: RIGHT. A bare summary is refused as itself at the object door, and the new pin asserts it there.
  • Public surface: no new export. index.ts, runtime.ts and rule-explanations.ts are not in the diff and each names its exports one by one, so summaryRollupFindings, lintFieldReferenceShapes and FieldShapeExtension stay off all three entries. AUTHORING_RULES gains its 81st entry, which is data. The published lintSummaryRollups now also returns the relation finding; called directly it reads the declared child fields, not the served ones. Only the registry entry passes the served fold.
  • Clause-②: no (narrowing): RIGHT. Two publishes that were accepted are refused, and nothing is widened. The PR fix(lint)!: ten publish-time checks for flows that save and do not run #36691 record asked for yes only because that PR added eleven exports; this one adds none.
  • Metadata-protocol: narrowed: RIGHT, a value refused and a requirement tightened.

② Semver level

  • @objectstack/lint minor and @objectstack/spec patch. One moved package at minor discharges narrowed, as in PR fix(lint)!: ten publish-time checks for flows that save and do not run #36691. No major. Check Changeset is green on this head.
  • The changeset carries the BREAKING banner, a FROM and TO section with three pairs, and the marker adr-0087: registered publish-refuses-data-model-fields-that-save-and-do-not-work, which is the entry's id.
  • The entry is well formed: id, surface, replacement, reason, acceptanceCriteria, typed SemanticMigration. The file name is the protocol major 18. plus the id, as entries/README.md requires, and no other file is touched for it. Notice only, with no D2 conversion, is right: which child field points back, and which type a field should be, are the author's choices.
  • packages/objectql is touched by one test file. The package ships dist only, so nothing publishes from it and no entry is owed.

③ Boundary flags

  • Open question in the report (keep no (narrowing) against the claim's literal no): answered A, keep it. narrowed needs the arm, and the two errors are a narrowing. The claim line is the seat's to amend.
  • Deviation in the report (four WIP commits squashed and force-pushed with lease before the PR existed): no effect on the contract; it is an L1 item.
  • Out of scope, R8: the report notes that lintDataModel counts optionsFrom, dataSource and refOf(def) as option sources on a select (data-model-rules.ts:1316) and files nothing. After this PR the third of those is the same file contradicting itself: R8 reads a reference on a select as a reason to stay silent, and the new rule refuses that field. No author is refused wrongly by it, so it is a follow-up card for the seat (N4).
  • Skills-docs: follow-up #37529: the card is open and names the three skill files. The changeset line still reads follow-up owed; that is an L1 item on a prose face.
  • feat(spec)!: form is a metadata type of its own, and the form doors read a form over both types #37422 collision: the head merges cleanly with main at 54ea3c8c383c0fb83f8af7efb32a677c5bb46db0 today. Main counts 80 authoring rules and this head 81.
  • Stored objects: not rewritten and not refused at boot. A stored object that carries either error is refused at its next publish. The changeset and the entry both say so.
  • Shipped metadata, by reading and not by a run: the ten roll-ups under examples/ each have a child that points back or a real relationshipField, and no object field there carries reference on a type that reads none. In hotcrm all 24 roll-ups name relationshipField. One of them names a child field that a second module adds through objectExtensions, which is the case the served fold exists for, and it resolves on the CLI and at the door.
  • SQL push-down: the diff reads no data and adds no query. Nothing to report.
  • No test was weakened. Three door-roster pins gained the new entry name, and the objectql fixture gained a foreign key so that its roll-up is refused by the currency door alone. Test Core 4/10 was red at the parent commit b26f2c16 (check-run read; the report and the fix commit put it on this fixture and the new rule id), and is green here.

④ Design judgment

Against card #35143, Data model family only.

M1 (must-fix) — the console's own field designer writes the shape field/reference-on-non-reference-type refuses, and offers no control to repair it.

S1 (should-fix) — the record-picker sentence is wrong for select and for every type the inline editor answers before it looks at reference.

  • InlineFieldInput.tsx routes by type first: select and multiselect with options (:355-376), boolean (:379), image, avatar, signature, file, video and audio (:394-405), markdown and textarea (:417). Only then does a reference send the field to the record picker (:436-441). text, number, currency, percent and the date types fall through to it, so the sentence is true for those.
  • A select only parses with options or a picklist, and a picklist's options are served onto the field. So a select carrying reference is edited with the select widget, and no record id is written into it.
  • The sentence is published with select named in the entry's reason (line 26 of the Scope line's first path) and in the changeset. The rule's message adds it for every type but formula and autonumber (data-model-rules.ts:1153-1155), the docblock names select (:1130), and the first pin of data-model-rules.field-reference-shapes.test.ts asserts record picker on a select with options.
  • The refusal stands on "links nothing" alone. Fix: add the editor clause only for the types that reach :440, and say "text, number or date" in the entry, the changeset and the docblock. Same grade as S1 of record 7100465508: the refusal is right, the sentence is not.

S2 (should-fix) — the relation arm throws where the engine's scan catches, and the throw takes the aggregand refusals with it.

  • pointsBackTo reads the carrier through refOf, which throws on a reference that is not a string. The engine's scan catches exactly that and goes on to the next field (engine-summaries-and-expansion.ts:303-309), because one unreadable sibling must not hide a readable foreign key.
  • At the door the child is the registry's served object, which can hold such a carrier (a raw registration, or a row stored before the parse tightened; the engine comment names both). The throw leaves summaryRollupFindings whole, runRules turns it into an authoring-rule-threw warning (runtime-gate.ts:1272-1285), and the rollup/non-numeric-aggregand errors of the same write are lost. Before this PR the entry read no carrier, so that refusal held.
  • A parsed stack cannot reach it, so the CLI is unaffected. Fix: catch in pointsBackTo and treat the field as not pointing back, as the engine does, with one pin.

Nits, none with an effect on correctness or the contract:

  • N1 — field/count-named-lookup fires on a lookup named after its target object. The fixture this PR adds does it: own_total, a lookup to the own_total object. cycle_count to a cycle-count object is the same case. Staying silent when the target's name carries the token would cut the noise. Advisory only.
  • N2 — The entry comment at authoring-rules.ts:2602-2606 says the host's stored extensions are folded in at the door. storedObjectExtensions is stated on object_extension writes only (runtime-gate.ts:1522) and this entry's door is object, so that read is always empty. The served fields arrive through context.objects. The result is right; the comment is not.
  • N3 — The entry's reason, the changeset and the docblock say the summary is "never indexed". That holds for the first arm. With a relationshipField that names no child field the summary is indexed and never recomputed. Same outcome for the author. It can ride the S1 edit.
  • N4 — R8's refOf(def) arm (data-model-rules.ts:1316) and its two undeclared keys, from section ③. A follow-up card.
  • N5 — The four new rule ids are module-local, while the file's other ids are exported constants ([maintainer] validate: the field-no-consumers warning is one 856-character line, printed by validate, build and dev alike — one-line verdict + rule: id + a pointer to the full reasoning (os explain, which today takes only schema names) #22161), and none has an os explain entry. The tests retype the slugs. Accepted as the price of Clause-②: no; export them when a consumer needs to compare ids.

Card lines, not PR defects, for the seat to record on #35143: D2 is covered by field/summary-without-operations; D5 reports lookup body tables only, once per flow, and stays silent under lockRecord: false; D1 is advisory.

Open: must-fix M1, should-fix S1, should-fix S2.

Implemented-by: claude/issue-35143-data-model-checks
Reviewed-by: session_01Q4EjjQkY5yXZrN9BEA3rEK

VERDICT: FAIL

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK

L1 review — PR #37513 at 77ac3ce25cacab9e2654fed7a77c00ec614658d5 · card #35143 (Data model family, Part of) · claim 7186969898 · report 7190134451

VERDICT: REVISE

Read by an agent that did not write the code. Mechanical face: l1-face.mjs --pr 37513, read 2026-11-26T11:06Z on this head, exit 5 (two flags: changeset, dogfood). Check-runs on the head were read directly: 62 success, 12 skipped, 0 failed, 0 pending.

Rework, in order

  1. Contract review is FAIL on this head (record alongside): M1, the console's field designer keeps reference on a retype, so the new error refuses a Studio publish that the designer offers no control to repair; S1, the record-picker sentence is wrong for select and is published in the entry and the changeset; S2, the relation arm throws where the engine's scan catches. The head has to move for M1 and S1.
  2. dogfood_battery is not pinned to the head. The report's battery opens with b26f2c16. The head is 77ac3ce2, an ordinary one-parent commit on top of it, not a merge of the base, so the --land gate refuses it. The report's "Dogfood Regression Gate is green at 77ac3ce" is not a battery reading: the shard job Dogfood Regression Gate (${{ matrix.shard }}/3) is skipped on this head and only the aggregate concluded success. Run the full battery once on the final head after the rework and post a report whose dogfood_battery opens with that sha.
  3. Changeset Skills-docs: line. The PR body reads Skills-docs: follow-up #37529; the changeset still reads Skills-docs: follow-up owed — …. skills: teach the three data-model publish checks from #35143's Data model family (PR #37513) #37529 is filed and open, so the changeset line takes the number too (the merged changeset of PR fix(lint)!: ten publish-time checks for flows that save and do not run #36691 reads Skills-docs: follow-up #36718).
  4. Changeset sentences that do not hold (read sentence by sentence):
    • "the record page edits a text, number or select field carrying it with a record picker": false for select (contract review S1). The same sentence is in the ADR-0087 entry's reason.
    • "The engine's summary index finds no foreign key, skips the summary with nothing logged": true of a child with no field pointing back. For a relationshipField that names no child field the summary is indexed and never recomputed. Same outcome; reword when the line is touched.
  5. PR body. Its readings line names b26f2c16, and the body does not name the 77ac3ce2 commit that fixes the objectql fixture, a file outside the claim's surface. Add one line for it. The claim reads Clause-②: no; the PR and changeset read no (narrowing), which is the right spelling (answer A to the report's open question), so the claim line is the seat's to amend.

PR shape and card relation: ok

Scope and changeset

  • No content/docs/releases/ path. One changeset, not empty: @objectstack/lint minor, @objectstack/spec patch, with the BREAKING banner, three FROM and TO pairs and the adr-0087: registered marker.
  • l1-face flag, changeset: @objectstack/objectql is touched with no entry. Answered: the one file is protocol-batch-object-registration.test.ts, the package ships dist, README.md and CHANGELOG.md only, so nothing publishes from it and no entry is owed. Check Changeset is green on the head. This is the seat's call if it reads the rule more strictly.
  • Files outside the claim's surface, both a consequence the rules ask for in the same PR: the objectql fixture (a stale fixture the new rule turned red) and four hand-written docs pages whose transcripts print the rule count.
  • Docs lines read: → Running author-time rules (81)... in cli.mdx, validating-metadata.mdx, build-with-claude-code.mdx and react-pages.mdx. AUTHORING_RULES has 80 entries at the merge base and on main, 81 on this head. Correct.
  • Not required, for the rework's prose pass: the rule-family table in validating-metadata.mdx (the row at :501) still describes the roll-up family by its aggregands alone and has no row for the new entry.
  • Skills-docs: follow-up #37529: true. The card names the three skill files that teach these shapes.
  • No one-off codemod in the diff, no +0/-0 file, no move or split.

Tests and gates

  • Floor checks on the head: Lint & Repo Gates success, TypeScript Type Check success. Every other check is success or an expected skip.
  • Local readings in the report carry counts and the lock's VERDICT lines. They are pinned to b26f2c16 (lint, metadata-protocol) and to 77ac3ce2 (the objectql file). The check-runs on the head are the gate verdict for the rest, and they include Test Core 1 to 10.
  • Positive control: Test Core 4/10 was red at b26f2c16 (check-run read; the report and the fix commit put it on three objectql cases refused with rollup/child-without-parent-reference), and is green on the head after the fixture gained its foreign key. That is the new refusal crossing the protocol save door once, end to end. The job log itself was not read.
  • Refusal pins assert the verdict and not a green run: the rule id and severity: 'error' on the gate's errors for both errors (the object door, and object_extension for the reference rule), and on advisories for the two warnings. No case in the diff goes through an HTTP envelope, so there is no code or status to assert at this layer.
  • Each rule has a pin that fires and a pin that stays silent. No assertion was removed or loosened; three door-roster pins gained the new entry name.
  • Dogfood: see rework item 2.
  • No API read in the report's evidence that git would have answered.

Premise

…t; the relation arm reads past an unreadable carrier

The field/reference-on-non-reference-type message adds the record-picker
clause only for types the inline editor routes to its reference branch
(text, number, date and the like), not for select, boolean, the file-backed
types, markdown or textarea. pointsBackTo treats a non-string reference as
not pointing back, as the engine's foreign-key scan does, so one unreadable
sibling no longer throws the whole roll-up entry and its aggregand refusals.
The changeset's Skills-docs line names follow-up #37529.

Claude-Session: https://claude.ai/code/session_01Q4EjjQkY5yXZrN9BEA3rEK
Co-authored-by: Claude <noreply@anthropic.com>
… type that reads none, and reads a stored one away

changeType drops reference when the next type is none of lookup,
master_detail, tree, user and summary, as it drops the picklist binding,
option kinds, referenceNameVisible and deleteBehavior. The designer's read
door strips a reference from a field whose declared type reads none, so a
draft an earlier build wrote that way saves without it on the next edit and
the new publish refusal no longer strands it.

Claude-Session: https://claude.ai/code/session_01Q4EjjQkY5yXZrN9BEA3rEK
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/xl and removed size/l labels Nov 26, 2026
…es at module top

Claude-Session: https://claude.ai/code/session_01Q4EjjQkY5yXZrN9BEA3rEK
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK

Contract-review-claim: session_01Q4EjjQkY5yXZrN9BEA3rEK · head ad43f0b · 2026-11-26T13:35Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: ad43f0b457457c90866eb2d7418d373ffb9fdfe3
Local-runs: none
Scope: packages/spec/src/migrations/entries/semantic/18.publish-refuses-data-model-fields-that-save-and-do-not-work.ts, packages/lint/src/authoring-rules.ts, packages/lint/src/data-model-rules.ts, packages/lint/src/validate-approval-approvers.ts, packages/lint/src/data-model-rules.field-reference-shapes.test.ts, packages/lint/src/data-model-rules.summary-rollup.test.ts, packages/lint/src/validate-approval-approvers.test.ts, packages/lint/src/validate-functional-completeness.test.ts, packages/lint/src/runtime-gate.object-writes.test.ts, packages/lint/src/runtime-gate.object-formula-writes.test.ts, packages/lint/src/validate-security-posture.runtime-surface.test.ts, packages/objectql/src/protocol-batch-object-registration.test.ts, ui/packages/app-shell/src/views/metadata-admin/inspectors/ObjectFieldInspector.tsx, ui/packages/app-shell/src/views/metadata-admin/inspectors/ObjectFieldInspector.referenceNameVisible-29629.test.tsx, ui/packages/app-shell/src/views/metadata-admin/previews/object-fields-io.ts, ui/packages/app-shell/src/views/metadata-admin/previews/object-fields-io.test.ts + read, not reviewed: packages/objectql/src/engine-summaries-and-expansion.ts, packages/spec/src/data/field-value.zod.ts, packages/spec/src/data/field.zod.ts, packages/spec/src/data/related-list-body-table.ts, packages/spec/src/data/injected-system-column-provenance.ts, packages/spec/src/kernel/unmanaged-install.ts, packages/spec/src/migrations/entries/README.md, packages/plugins/plugin-approvals/src/lifecycle-hooks.ts, packages/lint/src/runtime-gate.ts, packages/lint/src/object-graph.ts, packages/lint/src/system-fields.ts, packages/lint/src/index.ts, packages/lint/src/runtime.ts, packages/lint/src/rule-explanations.ts, packages/metadata-protocol/src/protocol-authoring-gate.ts, packages/metadata-protocol/src/runtime-authoring-gate.ts, packages/metadata-protocol/src/seed-loader.ts, packages/core/src/utils/import-field-meta.ts, ui/packages/plugin-detail/src/InlineFieldInput.tsx, ui/packages/plugin-detail/src/fieldEnrichment.ts, ui/packages/plugin-detail/src/DetailSection.tsx, ui/packages/fields/src/FieldEditWidget.tsx, ui/packages/fields/src/field-type-alias.ts, ui/packages/app-shell/src/views/studio-design/DataPillar.tsx, ui/packages/app-shell/src/views/studio-design/StudioCustomizeControls.tsx, ui/packages/app-shell/src/preview/DraftChangesPanel.tsx, ui/packages/app-shell/package.json, .changeset/config.json, content/docs/deployment/validating-metadata.mdx, the object definitions under examples/, packages/create-objectstack/src/templates/, packages/platform-objects/src/ and packages/metadata-core/src/, and the hotcrm checkout
Security-touching: no
Rule-change-verified: none

Delta round by the reviewer of record 7190867118 (FAIL at 77ac3ce2). This head is a substantive head, so this is a whole record for it and not a note on the old one.

Face: the file list (22 paths) holds one published-schema path (the ADR-0087 entry, the first path on the Scope line), and the PR body and the changeset declare Clause-②: no (narrowing). The floor is every path of the diff outside the prose faces, sixteen files: the twelve of the first record and the four ui/packages/app-shell files the seat's scope line 7190889569 admitted. Inputs: card #35143 with all thirteen comments (claim 7186969898, scope line 7190889569, reports 7190134451 and 7193521657), the PR body, the net diff against base 276174ab0c70804700b196d4d718268331be8120, the delta 2a5ace05..ad43f0b4 (three commits, eleven files), the merge commit 2a5ace05 (second parent on main, no conflict resolution in it), and the check-runs on this head (63 success, 11 skipped, none failed or pending). The merge changed none of the engine, spec, lint or protocol files the first record cites, so those line numbers stand. Numbers that moved are restated below.

① Derived judgments

Each check was read against the code it cites at this head. Both refusals are true of the engine, the platform's own designer no longer writes the refused shape, and the published sentences now hold.

  • rollup/child-without-parent-reference (error; CLI and the object door): RIGHT, both arms.
    • No relationshipField: the engine takes the first lookup / master_detail field of the child whose reference is the parent's name (engine-summaries-and-expansion.ts:272-314) and, with none, skips the summary without a log line (:357). pointsBackTo (data-model-rules.ts:955-962) uses the same two types and the same comparison, and now reads past a carrier it cannot read, as the engine's scan does (:303-309).
    • A written relationshipField: the engine takes it as written (:272). When it names no column of the child, a child row yields no parent id (:650-652), so nothing is recomputed. The lint refuses only that case.
    • A child the walk does not hold stays silent, so the objectql: a published roll-up summary that sums a text field makes every create, update and delete of its child answer 500, though each write lands — the authoring door does not check the summed field's type #28661 order (parent saved before its child) still publishes.
    • The child's fields are read as served. On the CLI objectsAsServed folds the stack's own extensions. At the door context.objects is the registry's served list, with the batch's pending object_extension drafts folded in (runtime-authoring-gate.ts:882-912, :1471-1472). An unmanaged install cannot carry objectExtensions (unmanaged-install.ts:99).
    • Differential: the baseline never holds the written item, so a stored object with the defect is refused at its next publish, as the changeset says. A child write that removes the foreign key is charged; an unrelated edit of a child under a roll-up that was already broken is not.
  • field/reference-on-non-reference-type (error; CLI, the object and object_extension doors): RIGHT. Every engine reader of reference asks the type first: referenceTargetOf (field-value.zod.ts:215-227), $expand (engine-summaries-and-expansion.ts:910), the seed loader (seed-loader.ts:1623), import (import-field-meta.ts:103). The summary exemption (data-model-rules.ts:1130) matches the console's own set (fieldEnrichment.ts:41-47).
  • The record-picker clause: RIGHT for the types the entry and the changeset name. InlineFieldInput.tsx answers select / multiselect with options (:356), boolean (:379), the file-backed types (:394-403) and markdown / textarea (:417) before it looks at reference (:436-441). TYPES_EDITED_WITHOUT_REFERENCE (data-model-rules.ts:1107) holds exactly those and the two computed types, and the rule adds the clause for no member of it (:1187). Text, number and date reach :440. One remainder: N6.
  • The field designer (@object-ui/app-shell): RIGHT.
    • changeType (ObjectFieldInspector.tsx:1264) removes reference when the next type is none of lookup, master_detail, user, tree, summary (:1291, :1302). readsReference (object-fields-io.ts:179) is the spec's REFERENCE_VALUE_TYPES plus summary, the set the lint exempts.
    • readFields (:228), the one read door of draft.fields, drops the key from a field whose declared spec type reads none (stripStrayReference, :202), after the retired-key strip, so a referenceTo recovered onto a text field is dropped too. A type string the spec does not declare is left as it is.
    • writeFields (:253) writes what the door read, so the next write of the object's fields comes out without the key. Any patch marks the Studio draft dirty (DataPillar.tsx:1136-1139), so that write is saved.
    • Nothing the engine read is lost: on those types no reader followed the key.
  • field/count-named-lookup (warning): no accept-set change. Right as an advisory; see N1.
  • approval-detail-editable-while-pending (warning): RIGHT. A node locks unless lockRecord is false (lifecycle-hooks.ts:483), the detail-row lock reads master_detail fields only (:873-886), and a lookup child is a body table only by relatedList: 'primary' (related-list-body-table.ts:93-99).
  • D2, no new rule: RIGHT. A bare summary is refused as itself at the object door, and the pin asserts it there.
  • Public surface: no new export. packages/lint/src/index.ts, runtime.ts and rule-explanations.ts are not in the diff. TYPES_EDITED_WITHOUT_REFERENCE is module-local. readsReference is exported from a module that no entry of @object-ui/app-shell re-exports, and the package is private.
  • Clause-②: no (narrowing) and Metadata-protocol: narrowed: RIGHT. Two publishes that were accepted are refused, nothing is widened, no export is added.

② Semver level

  • @objectstack/lint minor and @objectstack/spec patch, unchanged. One moved package at minor discharges narrowed, as in PR fix(lint)!: ten publish-time checks for flows that save and do not run #36691. No major.
  • New changeset: @object-ui/app-shell patch, Clause-②: no, Metadata-protocol: none. Right: the designer accepts nothing new and exports nothing new. The package is private and versioned by changesets (privatePackages.version in .changeset/config.json), and a patch entry with these two lines is the form its other entries take.
  • The first changeset still carries the BREAKING banner, the FROM and TO section with three pairs, and the marker adr-0087: registered publish-refuses-data-model-fields-that-save-and-do-not-work, which is the entry's id. Its Skills-docs: line now reads follow-up #37529.
  • The entry is well formed and its file name is unchanged. Only its reason moved.
  • packages/objectql is touched by one test file. The package ships dist only, so no entry is owed.
  • Check Changeset is green on this head.

③ Boundary flags

  • Open questions in report 7193521657 (the PR body's readings line, and a line naming the commits outside the claim's surface): both answered A. The body carries both lines.
  • Out-of-scope findings in the report: R8's refOf(def) arm (N4) and the rule-family table row in validating-metadata.mdx:501. Both are the seat's to carry. Neither is touched.
  • Declared narrowing of the local run: the whole @object-ui/app-shell suite was not run to the end locally. Test UI 1 to 16, Type Check UI, Lint UI and Build & E2E UI are success on this head.
  • Commit ad43f0b4 adds two module-top imports to the retype pin file. No assertion and no wait bound changed.
  • The four ui/ files and the second changeset are inside the seat's scope line 7190889569.
  • Main has moved to 411646562566a1e12b4e0fc3de256192e8302719. The head merges cleanly with it. Main still counts 80 authoring rules and this head 81.
  • Stored objects: not rewritten and not refused at boot. A stored object that carries either error is refused at its next publish. The changeset and the entry both say so.
  • Shipped metadata, by reading and not by a run, at this head: no object field under examples/, the scaffold templates (the blank template's three objects came in with the merge), platform-objects or metadata-core carries reference on a type that reads none. The ten roll-ups under examples/ are unchanged. For hotcrm the first record's reading stands: the delta changes no verdict on a stack that parses.
  • The read door serves every reader of draft.fields in the designer, more than a dozen modules, as the retired-key strip already does. The diff panels read both sides through it, so the removal of a stray key is not listed as a change.
  • Same function, not this PR's refusal: a retype from lookup to user keeps a foreign target (readsReference('user') is true), the spec's own parse refuses that (field.zod.ts:3577-3582), and the designer draws no target picker on user. It predates this PR and was read, not driven. A card for the seat.
  • SQL push-down: the diff reads no data and adds no query. Nothing to report.
  • No test was weakened. The select case left the first reference pin for a pin of its own that asserts the clause is absent, and date took its place.

④ Design judgment

Against card #35143, Data model family only. Findings of record 7190867118, re-judged at this head:

M1 (must-fix): CLOSED.

  • The closing condition was that a Studio retype no longer produces the refused shape. changeType now removes the key, and the pin retypes a lookup to Text through the rendered type list and reads the saved field. lookup to Master-Detail keeps the target.
  • Drafts that already hold the key: stripped at the read door, pinned in both draft shapes, with a control for a type the spec does not declare.
  • The report's ablations (the changeType delete removed, the read-door strip removed) each turned its pin red. Read in the report, not re-run.
  • What is left is N8.

S1 (should-fix): CLOSED.

  • The entry's reason (lines 26-27), the changeset and the docblock (data-model-rules.ts:1161) now say text, number or date.
  • The message adds the clause only outside TYPES_EDITED_WITHOUT_REFERENCE.
  • The pins assert the clause on text, number and date, and its absence on a select with options.
  • What is left is N6.

S2 (should-fix): CLOSED.

  • pointsBackTo catches and answers that the field does not point back.
  • The pin serves a child with an unreadable lookup beside a real foreign key through the object door: no authoring-rule-threw, no relation error, and the rollup/non-numeric-aggregand refusal of the same write held. With the unreadable carrier alone the relation error is reported, which is what the engine does with that child.

Nits, none with an effect on correctness or the contract:

  • N1 (open, unchanged). field/count-named-lookup fires on a lookup named after its target object (own_total to own_total in this PR's own fixture). Advisory only.
  • N2: closed. The entry comment (authoring-rules.ts:2599-2606) now says where the served fields come from.
  • N3: closed. The entry, the changeset and the docblock say the second arm is indexed and never recomputed.
  • N4 (open, the seat's). R8's refOf(def) arm, now data-model-rules.ts:1350, still reads a reference on a select as an option source. A follow-up card.
  • N5 (accepted). The rule ids stay module-local.
  • N6 (new). The message still adds the record-picker clause on types the record page opens no inline editor for: html, richtext, password, secret, vector, composite, record, repeater. The hosts exclude them before InlineFieldInput is reached (DetailSection.tsx:660, fieldEnrichment.ts:166-177, FieldEditWidget.tsx:188-203). The docblock's "every other non-reference type falls through" (data-model-rules.ts:1103-1105) is too wide by the same set. The first record's S1 listed the editor's own routing and not the hosts' gate, so this is a remainder of that list and not a miss in the rework. No published sentence names these types.
  • N7 (new). The set of types that keep reference is now spelled twice: the lint's REFERENCE_VALUE_TYPES plus its module-local REFERENCE_READ_OFF_TYPE, and the designer's readsReference. The designer's pin ties it to the spec's set plus the literal summary, not to the lint's. A type the lint later exempts would be stripped at the designer's read door on the next field save. One exported source would close it and would be a new export, so it is a card and not this PR.
  • N8 (new). The stored repair needs a write of the object's fields. An object-level edit in Studio is a shallow patch (DataPillar.tsx:1136-1139) and the save body is the draft (:1168), so fields goes out as stored. An object that already holds a stray key is then still refused at that publish, and the designer shows no key. The refusal names the field, and any edit of a field of that object repairs it. The app-shell changeset's "repaired by its next edit" is true of a field edit; that sentence is a prose item for L1. Normalising once at the save body would close it.
  • N9 (new). In the retype pin, rejections is FieldSchema's parse, which never refused this key, so the case is carried by the absent-key assertion alone. The header of object-fields-io.ts (lines 16-17) still names one exception to "preserve unknown properties"; there are now two.

Card lines for #35143 are already on the card in 7190889569.

Open: none at must-fix or should-fix. Nits N1, N4, N6, N7, N8 and N9 are recorded for a follow-up card.

Implemented-by: claude/issue-35143-data-model-checks
Reviewed-by: session_01Q4EjjQkY5yXZrN9BEA3rEK

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK

席位核对

L1 delta — PR #37513 at ad43f0b457457c90866eb2d7418d373ffb9fdfe3 · card #35143 (Data model family, Part of) · report 7193521657 · scope line 7190889569 · follows REVISE 7190877214

VERDICT: ACCEPT

Read by an agent that did not write the code. Mechanical face: l1-face.mjs --pr 37513, read 2026-11-26T13:39Z on this head, exit 5 (the same two flags: changeset, dogfood; both answered below). Check-runs on the head were read directly: 63 success, 11 skipped, 0 failed, 0 pending.

The five rework items

  1. Contract review: PASS on this head (record alongside). M1, S1 and S2 are closed. Nits only, recorded for a follow-up card.
  2. dogfood_battery: cleared. The report's line opens with ad43f0b4, which is the head. Full battery, no shard and no path, lock VERDICT exit 0: 487 files passed and 3 skipped, 4129 tests passed and 68 skipped, no failures. These are the counts of the earlier run at b26f2c16. The --land gate reads a sha at the start of the line, and this one is the head's.
  3. Changeset Skills-docs: line: cleared. It reads follow-up #37529, as the PR body does. skills: teach the three data-model publish checks from #35143's Data model family (PR #37513) #37529 is open (pm:queue, domain:skills).
  4. Changeset sentences: cleared. Both were reworded and hold (named below).
  5. PR body: cleared. The readings line names ad43f0b4, and one line names the commits outside the claim's surface (77ac3ce2, 48d632c3, ad43f0b4). The claim's Clause-② spelling is amended in the scope line 7190889569.

Sentences read (changeset and docs faces, sentence by sentence)

  • .changeset/35143-data-model-publish-checks.md, the three lines that moved:
    • Skills-docs: follow-up #37529. True.
    • "With no foreign key the engine's summary index skips the summary with nothing logged; with a relationshipField that names no child field the summary is indexed and never recomputed." Holds for both arms.
    • "the record page edits a text, number or date field carrying it with a record picker that writes a record id into it." Holds: those three types reach the inline editor's reference branch.
  • .changeset/35143-field-designer-drops-stray-reference.md (new, @object-ui/app-shell patch):
    • The refusal and its exempt types; the retype that kept the key; the picker drawn only on lookup, master_detail and tree; the retype that now removes it beside the four keys it already removed; "nothing is lost". All hold against the code at this head.
    • "An object saved that way earlier is repaired by its next edit". True of an edit that writes the object's fields (any field added, edited, reordered or retyped). An object-level edit (label, sharing model) does not write fields, so the stored key goes out again and that publish is refused. Accepted as written, recorded here. If the head moves for any other reason, write "its next field edit". It is not worth a commit of its own: an ordinary commit on top unpins the battery.
  • content/docs: the four (81) lines are unchanged since the first read. Main at 41164656 still prints 80.

For the seat at ACCEPT, none of it moves the head

PR shape and card relation: ok

Scope and changeset

  • The four ui/packages/app-shell/src/views/metadata-admin/** files and the second changeset are inside the scope line 7190889569, and the PR body names the fix with its evidence.
  • @object-ui/app-shell is private and versioned by changesets. Its entry is a patch with Clause-②: no and Metadata-protocol: none, the form its other entries take. No Skills-docs: line is owed on it.
  • l1-face flag, changeset: @objectstack/objectql, as before. One test file, the package ships dist only, no entry owed. The seat's call if it reads the rule more strictly.
  • No content/docs/releases/ path, no empty changeset, no +0/-0 file, no one-off codemod, no move or split.

Tests and gates

  • Floor checks on the head: Lint & Repo Gates success, TypeScript Type Check success. Every other check is success or an expected skip, with Test Core 1 to 10, Test UI 1 to 16, Type Check UI, Lint UI, Build & E2E UI and Check Changeset among the successes.
  • Local readings: the lint suite is pinned to 2740a172 and the narrowed app-shell set to 48d632c3. Neither is the head, so neither is counted either way. The check-runs on the head are the verdict for both. The retype pin file and the battery were run at the head.
  • The whole app-shell suite was not finished locally (declared in the report). Test UI 1 to 16 on the head covers it.
  • Positive controls, read in the report and not re-run: four ablations, each turning its own pin red and restored (the catch in pointsBackTo, select in the editor set, the changeType delete, the read-door strip). The stored-key pin stayed green under the changeType ablation, which is right: the read door holds that case.
  • Refusal pins assert the verdict: the new roll-up pin reads the rule ids on errors and the absence of authoring-rule-threw on advisories; the select pin reads severity, path and the absent clause. The select case left the first pin for its own and date took its place. Nothing was removed or loosened.
  • ad43f0b4 adds two module-top imports to the pin file. No assertion and no wait bound changed.
  • The merge 2a5ace05 has main as its second parent and no conflict resolution in it. The head merges cleanly with main at 41164656.
  • No API read in the report's evidence that git would have answered.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 26, 2026 13:55
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 26, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 26, 2026
@objectstack-fleet
objectstack-fleet Bot marked this pull request as draft November 26, 2026 14:12
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: ad43f0b457457c90866eb2d7418d373ffb9fdfe3
Local-runs: none
Scope: packages/spec/src/migrations/entries/semantic/18.publish-refuses-data-model-fields-that-save-and-do-not-work.ts, packages/lint/src/authoring-rules.ts, packages/lint/src/data-model-rules.ts, packages/lint/src/validate-approval-approvers.ts, packages/lint/src/data-model-rules.field-reference-shapes.test.ts, packages/lint/src/data-model-rules.summary-rollup.test.ts, packages/lint/src/validate-approval-approvers.test.ts, packages/lint/src/validate-functional-completeness.test.ts, packages/lint/src/runtime-gate.object-writes.test.ts, packages/lint/src/runtime-gate.object-formula-writes.test.ts, packages/lint/src/validate-security-posture.runtime-surface.test.ts, packages/objectql/src/protocol-batch-object-registration.test.ts, ui/packages/app-shell/src/views/metadata-admin/inspectors/ObjectFieldInspector.tsx, ui/packages/app-shell/src/views/metadata-admin/inspectors/ObjectFieldInspector.referenceNameVisible-29629.test.tsx, ui/packages/app-shell/src/views/metadata-admin/previews/object-fields-io.ts, ui/packages/app-shell/src/views/metadata-admin/previews/object-fields-io.test.ts + read, not reviewed: packages/objectql/src/engine-summaries-and-expansion.ts, packages/spec/src/data/field-value.zod.ts, packages/spec/src/data/field.zod.ts, packages/spec/src/data/related-list-body-table.ts, packages/spec/src/data/injected-system-column-provenance.ts, packages/spec/src/kernel/unmanaged-install.ts, packages/spec/src/migrations/entries/README.md, packages/plugins/plugin-approvals/src/lifecycle-hooks.ts, packages/lint/src/runtime-gate.ts, packages/lint/src/object-graph.ts, packages/lint/src/system-fields.ts, packages/lint/src/index.ts, packages/lint/src/runtime.ts, packages/lint/src/rule-explanations.ts, packages/metadata-protocol/src/protocol-authoring-gate.ts, packages/metadata-protocol/src/runtime-authoring-gate.ts, packages/metadata-protocol/src/seed-loader.ts, packages/core/src/utils/import-field-meta.ts, ui/packages/plugin-detail/src/InlineFieldInput.tsx, ui/packages/plugin-detail/src/fieldEnrichment.ts, ui/packages/plugin-detail/src/DetailSection.tsx, ui/packages/fields/src/FieldEditWidget.tsx, ui/packages/fields/src/field-type-alias.ts, ui/packages/app-shell/src/views/studio-design/DataPillar.tsx, ui/packages/app-shell/src/views/studio-design/StudioCustomizeControls.tsx, ui/packages/app-shell/src/preview/DraftChangesPanel.tsx, ui/packages/app-shell/package.json, .changeset/config.json, content/docs/deployment/validating-metadata.mdx, the object definitions under examples/, packages/create-objectstack/src/templates/, packages/platform-objects/src/ and packages/metadata-core/src/, and the hotcrm checkout
Security-touching: no
Rule-change-verified: none

Delta round by the reviewer of record 7190867118 (FAIL at 77ac3ce2). This head is a substantive head, so this is a whole record for it and not a note on the old one.

Face: the file list (22 paths) holds one published-schema path (the ADR-0087 entry, the first path on the Scope line), and the PR body and the changeset declare Clause-②: no (narrowing). The floor is every path of the diff outside the prose faces, sixteen files: the twelve of the first record and the four ui/packages/app-shell files the seat's scope line 7190889569 admitted. Inputs: card #35143 with all thirteen comments (claim 7186969898, scope line 7190889569, reports 7190134451 and 7193521657), the PR body, the net diff against base 276174ab0c70804700b196d4d718268331be8120, the delta 2a5ace05..ad43f0b4 (three commits, eleven files), the merge commit 2a5ace05 (second parent on main, no conflict resolution in it), and the check-runs on this head (63 success, 11 skipped, none failed or pending). The merge changed none of the engine, spec, lint or protocol files the first record cites, so those line numbers stand. Numbers that moved are restated below.

① Derived judgments

Each check was read against the code it cites at this head. Both refusals are true of the engine, the platform's own designer no longer writes the refused shape, and the published sentences now hold.

  • rollup/child-without-parent-reference (error; CLI and the object door): RIGHT, both arms.
    • No relationshipField: the engine takes the first lookup / master_detail field of the child whose reference is the parent's name (engine-summaries-and-expansion.ts:272-314) and, with none, skips the summary without a log line (:357). pointsBackTo (data-model-rules.ts:955-962) uses the same two types and the same comparison, and now reads past a carrier it cannot read, as the engine's scan does (:303-309).
    • A written relationshipField: the engine takes it as written (:272). When it names no column of the child, a child row yields no parent id (:650-652), so nothing is recomputed. The lint refuses only that case.
    • A child the walk does not hold stays silent, so the objectql: a published roll-up summary that sums a text field makes every create, update and delete of its child answer 500, though each write lands — the authoring door does not check the summed field's type #28661 order (parent saved before its child) still publishes.
    • The child's fields are read as served. On the CLI objectsAsServed folds the stack's own extensions. At the door context.objects is the registry's served list, with the batch's pending object_extension drafts folded in (runtime-authoring-gate.ts:882-912, :1471-1472). An unmanaged install cannot carry objectExtensions (unmanaged-install.ts:99).
    • Differential: the baseline never holds the written item, so a stored object with the defect is refused at its next publish, as the changeset says. A child write that removes the foreign key is charged; an unrelated edit of a child under a roll-up that was already broken is not.
  • field/reference-on-non-reference-type (error; CLI, the object and object_extension doors): RIGHT. Every engine reader of reference asks the type first: referenceTargetOf (field-value.zod.ts:215-227), $expand (engine-summaries-and-expansion.ts:910), the seed loader (seed-loader.ts:1623), import (import-field-meta.ts:103). The summary exemption (data-model-rules.ts:1130) matches the console's own set (fieldEnrichment.ts:41-47).
  • The record-picker clause: RIGHT for the types the entry and the changeset name. InlineFieldInput.tsx answers select / multiselect with options (:356), boolean (:379), the file-backed types (:394-403) and markdown / textarea (:417) before it looks at reference (:436-441). TYPES_EDITED_WITHOUT_REFERENCE (data-model-rules.ts:1107) holds exactly those and the two computed types, and the rule adds the clause for no member of it (:1187). Text, number and date reach :440. One remainder: N6.
  • The field designer (@object-ui/app-shell): RIGHT.
    • changeType (ObjectFieldInspector.tsx:1264) removes reference when the next type is none of lookup, master_detail, user, tree, summary (:1291, :1302). readsReference (object-fields-io.ts:179) is the spec's REFERENCE_VALUE_TYPES plus summary, the set the lint exempts.
    • readFields (:228), the one read door of draft.fields, drops the key from a field whose declared spec type reads none (stripStrayReference, :202), after the retired-key strip, so a referenceTo recovered onto a text field is dropped too. A type string the spec does not declare is left as it is.
    • writeFields (:253) writes what the door read, so the next write of the object's fields comes out without the key. Any patch marks the Studio draft dirty (DataPillar.tsx:1136-1139), so that write is saved.
    • Nothing the engine read is lost: on those types no reader followed the key.
  • field/count-named-lookup (warning): no accept-set change. Right as an advisory; see N1.
  • approval-detail-editable-while-pending (warning): RIGHT. A node locks unless lockRecord is false (lifecycle-hooks.ts:483), the detail-row lock reads master_detail fields only (:873-886), and a lookup child is a body table only by relatedList: 'primary' (related-list-body-table.ts:93-99).
  • D2, no new rule: RIGHT. A bare summary is refused as itself at the object door, and the pin asserts it there.
  • Public surface: no new export. packages/lint/src/index.ts, runtime.ts and rule-explanations.ts are not in the diff. TYPES_EDITED_WITHOUT_REFERENCE is module-local. readsReference is exported from a module that no entry of @object-ui/app-shell re-exports, and the package is private.
  • Clause-②: no (narrowing) and Metadata-protocol: narrowed: RIGHT. Two publishes that were accepted are refused, nothing is widened, no export is added.

② Semver level

  • @objectstack/lint minor and @objectstack/spec patch, unchanged. One moved package at minor discharges narrowed, as in PR fix(lint)!: ten publish-time checks for flows that save and do not run #36691. No major.
  • New changeset: @object-ui/app-shell patch, Clause-②: no, Metadata-protocol: none. Right: the designer accepts nothing new and exports nothing new. The package is private and versioned by changesets (privatePackages.version in .changeset/config.json), and a patch entry with these two lines is the form its other entries take.
  • The first changeset still carries the BREAKING banner, the FROM and TO section with three pairs, and the marker adr-0087: registered publish-refuses-data-model-fields-that-save-and-do-not-work, which is the entry's id. Its Skills-docs: line now reads follow-up #37529.
  • The entry is well formed and its file name is unchanged. Only its reason moved.
  • packages/objectql is touched by one test file. The package ships dist only, so no entry is owed.
  • Check Changeset is green on this head.

③ Boundary flags

  • Open questions in report 7193521657 (the PR body's readings line, and a line naming the commits outside the claim's surface): both answered A. The body carries both lines.
  • Out-of-scope findings in the report: R8's refOf(def) arm (N4) and the rule-family table row in validating-metadata.mdx:501. Both are the seat's to carry. Neither is touched.
  • Declared narrowing of the local run: the whole @object-ui/app-shell suite was not run to the end locally. Test UI 1 to 16, Type Check UI, Lint UI and Build & E2E UI are success on this head.
  • Commit ad43f0b4 adds two module-top imports to the retype pin file. No assertion and no wait bound changed.
  • The four ui/ files and the second changeset are inside the seat's scope line 7190889569.
  • Main has moved to 411646562566a1e12b4e0fc3de256192e8302719. The head merges cleanly with it. Main still counts 80 authoring rules and this head 81.
  • Stored objects: not rewritten and not refused at boot. A stored object that carries either error is refused at its next publish. The changeset and the entry both say so.
  • Shipped metadata, by reading and not by a run, at this head: no object field under examples/, the scaffold templates (the blank template's three objects came in with the merge), platform-objects or metadata-core carries reference on a type that reads none. The ten roll-ups under examples/ are unchanged. For hotcrm the first record's reading stands: the delta changes no verdict on a stack that parses.
  • The read door serves every reader of draft.fields in the designer, more than a dozen modules, as the retired-key strip already does. The diff panels read both sides through it, so the removal of a stray key is not listed as a change.
  • Same function, not this PR's refusal: a retype from lookup to user keeps a foreign target (readsReference('user') is true), the spec's own parse refuses that (field.zod.ts:3577-3582), and the designer draws no target picker on user. It predates this PR and was read, not driven. A card for the seat.
  • SQL push-down: the diff reads no data and adds no query. Nothing to report.
  • No test was weakened. The select case left the first reference pin for a pin of its own that asserts the clause is absent, and date took its place.

④ Design judgment

Against card #35143, Data model family only. Findings of record 7190867118, re-judged at this head:

M1 (must-fix): closed.

  • The closing condition was that a Studio retype no longer produces the refused shape. changeType now removes the key, and the pin retypes a lookup to Text through the rendered type list and reads the saved field. lookup to Master-Detail keeps the target.
  • Drafts that already hold the key: stripped at the read door, pinned in both draft shapes, with a control for a type the spec does not declare.
  • The report's ablations (the changeType delete removed, the read-door strip removed) each turned its pin red. Read in the report, not re-run.
  • What is left is N8.

S1 (should-fix): closed.

  • The entry's reason (lines 26-27), the changeset and the docblock (data-model-rules.ts:1161) now say text, number or date.
  • The message adds the clause only outside TYPES_EDITED_WITHOUT_REFERENCE.
  • The pins assert the clause on text, number and date, and its absence on a select with options.
  • What is left is N6.

S2 (should-fix): closed.

  • pointsBackTo catches and answers that the field does not point back.
  • The pin serves a child with an unreadable lookup beside a real foreign key through the object door: no authoring-rule-threw, no relation error, and the rollup/non-numeric-aggregand refusal of the same write held. With the unreadable carrier alone the relation error is reported, which is what the engine does with that child.

Nits, none with an effect on correctness or the contract:

  • N1 (open, unchanged). field/count-named-lookup fires on a lookup named after its target object (own_total to own_total in this PR's own fixture). Advisory only.
  • N2: closed. The entry comment (authoring-rules.ts:2599-2606) now says where the served fields come from.
  • N3: closed. The entry, the changeset and the docblock say the second arm is indexed and never recomputed.
  • N4 (open, the seat's). R8's refOf(def) arm, now data-model-rules.ts:1350, still reads a reference on a select as an option source. A follow-up card.
  • N5 (accepted). The rule ids stay module-local.
  • N6 (new). The message still adds the record-picker clause on types the record page opens no inline editor for: html, richtext, password, secret, vector, composite, record, repeater. The hosts exclude them before InlineFieldInput is reached (DetailSection.tsx:660, fieldEnrichment.ts:166-177, FieldEditWidget.tsx:188-203). The docblock's "every other non-reference type falls through" (data-model-rules.ts:1103-1105) is too wide by the same set. The first record's S1 listed the editor's own routing and not the hosts' gate, so this is a remainder of that list and not a miss in the rework. No published sentence names these types.
  • N7 (new). The set of types that keep reference is now spelled twice: the lint's REFERENCE_VALUE_TYPES plus its module-local REFERENCE_READ_OFF_TYPE, and the designer's readsReference. The designer's pin ties it to the spec's set plus the literal summary, not to the lint's. A type the lint later exempts would be stripped at the designer's read door on the next field save. One exported source would close it and would be a new export, so it is a card and not this PR.
  • N8 (new). The stored repair needs a write of the object's fields. An object-level edit in Studio is a shallow patch (DataPillar.tsx:1136-1139) and the save body is the draft (:1168), so fields goes out as stored. An object that already holds a stray key is then still refused at that publish, and the designer shows no key. The refusal names the field, and any edit of a field of that object repairs it. The app-shell changeset's "repaired by its next edit" is true of a field edit; that sentence is a prose item for L1. Normalising once at the save body would close it.
  • N9 (new). In the retype pin, rejections is FieldSchema's parse, which never refused this key, so the case is carried by the absent-key assertion alone. The header of object-fields-io.ts (lines 16-17) still names one exception to "preserve unknown properties"; there are now two.

Card lines for #35143 are already on the card in 7190889569.

No must-fix, no should-fix. Nits N1, N4, N6, N7, N8 and N9 are recorded for follow-up card #37577.

Implemented-by: claude/issue-35143-data-model-checks
Reviewed-by: session_01Q4EjjQkY5yXZrN9BEA3rEK

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK

维护者速读

  • 发布元数据时多拦两类「能保存但不生效」的错误:汇总字段的子对象没有指回父对象、非关联类型的字段带了关联目标;另加两条只提醒不拦的检查。
  • 属于发布前检查第二批的「数据模型」一族,作者在发布那一刻就知道问题,而不是上线后才发现数据不对。
  • 已存的旧对象不会被改写,下次发布时才会被拦;Studio 改字段类型时会自动清掉旧的关联目标,界面能修。
  • 要你做的:用 os-zhuang 账号批准本 PR(收窄类改动需授权批准)。契约审核 PASS 记录 7194461560,Head-sha ad43f0b457457c90866eb2d7418d373ffb9fdfe3。

席位意见:两级审核在这个 head 上都通过(L1 ACCEPT 7193959285,契约审核 PASS 7194461560,上一轮 FAIL 的 M1/S1/S2 均已关闭),CI 全绿;剩余小问题立卡 #37577。建议批准。

席位核对 — ACCEPT · repo:objectstack#6 · head ad43f0b457457c90866eb2d7418d373ffb9fdfe3

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK

Review requested: this narrowing PR lands by an authorized approval. Seat record above (ACCEPT at head ad43f0b457457c90866eb2d7418d373ffb9fdfe3); contract review PASS 7194461560 on the same head.

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 45837486482 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

分类:failure —— 按下面的日志分诊。

失败的 job(日志抽取,best effort):

  • Test Core (5/10) — 失败步骤: Run this shard's tests

    @objectstack/cli:test:  FAIL   integration  test/start-deployment-durability.integration.test.ts > #30120 — with the image switch on, a start missing its settings refuses > none set: exit 1, naming al
      ↳ 失败原因: @objectstack/cli:test: Error: Test timed out in 5000ms.
    

↳ 失败原因 是判读的关键:超时(Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言(AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError。 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

  • test/start-deployment-durability.integration.test.ts — 24h 窗口内只有本 PR 撞到过,暂不汇总(再有一个不同 PR 撞到就会自动开汇总 issue)。
  • ⚠️ 24h 评论账本没读完(超过 5 页仍未读到窗口尽头),所以上面的「不同 PR 数」是下界,不是全量。

历史信号:

  • 本 PR 过去 24h 无队列失败记录(首次)。
  • 过去 24h 队列共有 8 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK

Queue failure triage — run 45837486482

Read: unrelated, load/timing class. The one failing test is @objectstack/cli test/start-deployment-durability.integration.test.ts ("#30120 — with the image switch on, a start missing its settings refuses > none set"), and the failure reason is Test timed out in 5000ms, not an assertion. This PR touches nothing in packages/cli (its only cli-named file is the doc page content/docs/deployment/cli.mdx). First queue failure for this PR; the signature has no aggregate issue.

Next step: one re-queue of the same head ad43f0b as the discriminator. This is a narrowing PR, so the enqueue has to come from an authorized approver (os-zhuang) — the seat cannot enqueue it. No code change from the seat.

Stamped 2026-11-26T14:49Z

@os-zhuang
os-zhuang added this pull request to the merge queue Nov 26, 2026
Merged via the queue into main with commit d9bc148 Nov 26, 2026
87 of 88 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-35143-data-model-checks branch November 26, 2026 16:13
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…sh checks (objectstack-ai#37707)

<!-- claude-projects-attribution: {"github_login":"os-sales"} -->
_Requested by **Sales** · [project
thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4Uu3zQ2AqeghSGpv6Q7VEPDyQ)_

Fixes objectstack-ai#37529

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 用户能看到什么变化:照技能文档让 AI
助手建数据模型的人,以后助手会提前知道三条发布检查:汇总字段的子对象必须有指回父对象的关联字段;关联目标只能写在关联类字段上;审批锁只锁主从明细行,用查找关系画进记录正文的明细表在审批期间仍然可改。以前文档没写,助手会写出发布时被拒的内容。
- 为什么做:属于「发布前拦住存得进去却不起作用的数据模型」这批工作的配套文档;检查已经上线,技能文档要跟上。
-
出错会怎样:只改技能文字和评测用例,不动产品。三个文件余量都只有几个词,新增的句子靠同一文件里把说法写短换来,没有删掉事实;写错直接撤回即可。
- 要你做什么:无。

## What changes

One sentence per rule, each worded from the code on `main` at
`fbcfdfbb58` (the lint rules PR objectstack-ai#37513 landed), not from the card's
paraphrase:

- `skills/objectstack-data/rules/relationships.md` (Roll-up Summaries):
a roll-up is refused at publish when `relationshipField` is omitted and
the child has no `lookup` / `master_detail` referencing the parent, or
when `relationshipField` names no field of the child
(`rollup/child-without-parent-reference`). Both arms are in the rule
(`summaryRollupFindings`, severity `error`).
- `skills/objectstack-data/rules/field-types.md` (Relational): only
`lookup`, `master_detail`, `user` and `tree` read `reference`; on any
other type but `summary`, publish refuses it
(`field/reference-on-non-reference-type`, severity `error`). The card
says `summary` reads it; the code says the four types read it and
`summary` is exempt from the refusal, so the sentence says that.
-
`skills/objectstack-automation/references/state-machines-and-approvals.md`
(Approval Best Practices, item 2): `lockRecord` locks the record and its
`master_detail` child rows only; a `lookup` child shown in the record's
details (`relatedList: 'primary'`, or a parent field group, as the data
skill names it) stays editable, reported as the warning
`approval-detail-editable-while-pending`. It is taught as a warning, not
a refusal.
- Evals: data case 12 (roll-up counts) now says the child has no field
pointing at the parent (`project`, named in the prompt) and expects
`reference: 'project'`; a new data case 29 asks about `reference` on a
`text` field and requires the rule id
`field/reference-on-non-reference-type`; automation case 3 (budget
approval) now carries a lookup body table and expects `master_detail`.
- One `@objectstack/skills` patch changeset.

### Token ratchet: no ceiling moved

Every addition is paid for by shorter wording in the same file (`node
scripts/check-skills-token-ratchet.mjs`, exit 0 at `4695c42cc6`).

| File | Lines before / after | Bytes before / after | Tokens before /
after | Ceiling | Headroom before / after |
|:--|:--|:--|:--|:--|:--|
| `skills/objectstack-data/rules/relationships.md` | 389 / 391 | 16765 /
16801 | 4192 / 4201 | 4203 | 11 / 2 |
| `skills/objectstack-data/rules/field-types.md` | 270 / 273 | 14156 /
14160 | 3539 / 3540 | 3541 | 2 / 1 |
|
`skills/objectstack-automation/references/state-machines-and-approvals.md`
| 386 / 388 | 23732 / 23741 | 5933 / 5936 | 5936 | 3 / 0 |
| `skills/objectstack-data/evals/objects-fields-relationships.json` (not
ratcheted) | 506 / 521 | 35675 / 36736 | 8919 / 9184 | none | n/a |
| `skills/objectstack-automation/evals/flows-triggers-approvals.json`
(not ratcheted) | 450 / 451 | 28588 / 29048 | 7147 / 7262 | none | n/a |

Whole bundle: ratcheted (authored) 199619 to 199632 tokens against a
204473 total ceiling; shipped tree 299752 to 300145 tokens; all
`SKILL.md` files together 4961 lines before and after; whole `skills/`
tree 23255 to 23276 lines.

## Tests

- Skill evals: NOT MEASURED, reason: no model runner in this container.
The three touched cases are graded by nothing here.
- Eval tokens: checked by hand. `node
ui/scripts/check-skill-eval-tokens.mjs` exits 0 but walks
`skills/objectui` only, so it says nothing about these fixtures
(contract review 7204561928). On `4695c42cc6` every `must_contain` token
of each data case is in its own reference answer and no
`must_not_contain` token is (29 cases, 0 violations).
- `pnpm --filter @objectstack/spec run check:skill-examples`: exit 0,
"352 prose examples type-check across 3 surface(s)".
- `node ui/scripts/check-skill-examples.mjs`: exit 0, "Every marked
skill example holds up against the built types."

The two example gates were read at `ad8cf055c2`; the delta at
`4695c42cc6` changes no code example. At `4695c42cc6`: token ratchet
exit 0, `pnpm check:skill-links` exit 0,
`check:skill-identifier-liveness` exit 0, `check:skill-frame-sync` exit
0; `check:doc-authoring` NOT MEASURED locally (exit 3, no `typescript`
in the worktree), CI's.

## Acceptance notes

- Wording shortened to pay for the new sentences, no fact removed.
relationships.md: "Supported via `summary`" becomes "Via `summary`" (two
table cells); the recompute sentence drops "so it's consistent".
field-types.md: nine table cells and two prose phrases lose filler words
("built-in format validation" to "format validated", "Video files" to
"Video", and the like). state-machines-and-approvals.md: a code comment,
the send-back opening sentence and two lead-ins are shorter.
- One nuance went: best practice 2 no longer says "unless you have a
strong reason to allow edits while pending". It still says to keep the
lock and why.
- After the review delta (7204561928 S1, N1 to N3): the roll-up sentence
says the refusal applies only when `relationshipField` is omitted; the
approval sentence uses the data skill's words for the table; data case
29 requires the rule id; case 12's prompt names `project`. Paid down in
the same files: best practice 1 is shorter, and the `lockRecord` config
row reads "Lock the record while pending" (best practice 2 says what the
lock covers). state-machines-and-approvals.md now sits at zero headroom,
relationships.md at 2.
- Draft PR objectstack-ai#36158 edits the same three files. `node
scripts/pm/overlap-check.mjs` reports it merges cleanly against this
branch (exit 0); the claim on the card cleared it.
- The dispatch asked to extend existing eval cases where one fits. Cases
12 and 3 are extended, so their prompts changed; the `reference` rule
fit no existing case and got a new one.

## Verification

<details><summary>Derived gates at ad8cf05: 49 derived, 48 run, 1 NOT
MEASURED</summary>

`node scripts/pm/dispatch-gates.mjs --ran`: "49 derived famil(ies)
accounted for — 48 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit
3)", exit 0.

- NOT MEASURED: `pnpm check:dual-build-cjs-loads`, exit 3, reason: it
reads every package's built output and only the closures the skill gates
need were built here. CI builds the whole tree.
- Exit 0, among the 48: `node scripts/check-skills-token-ratchet.mjs`
and its `--self-test`, `pnpm check:skill-links`, `pnpm
check:skill-identifier-liveness`, `pnpm check:skill-compatibility`,
`pnpm check:skill-frame-sync`, `pnpm --filter @objectstack/spec run
check:skill-refs`, `pnpm --filter @objectstack/spec run
check:skill-served-sections`, `pnpm --filter @objectstack/lint run
check:doc-formula-expressions`, `pnpm check:doc-authoring`, `pnpm
check:nul-bytes`, `pnpm check:published-files`, `node
scripts/check-empty-changeset.mjs --base origin/main`, `node
scripts/check-changeset-no-major.mjs --base origin/main`, `node
scripts/check-adr-0087-registration.mjs --base origin/main`.

</details>

Read first, by risk:

1. `skills/objectstack-data/rules/field-types.md`, the new sentence
under the Relational table: it says `summary` is exempt, which differs
from the card's wording.
2.
`skills/objectstack-automation/references/state-machines-and-approvals.md`,
best practice 2: the rewritten item and the dropped clause.
3. `skills/objectstack-data/evals/objects-fields-relationships.json`,
case 12: an existing prompt gained a sentence.

Two-minute check: run `node scripts/check-skills-token-ratchet.mjs` and
expect exit 0 with the three files at headroom 2, 1 and 0.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01L6bhgVUz5oS8fMgmncxU96

<!-- signed: repo:objectstack#2 · os-sales ·
session_01L6bhgVUz5oS8fMgmncxU96 -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
… move from step 18 to step 19, so `os migrate meta --from 18` shows them (objectstack-ai#38239)

repo:objectstack#3 · os-tesla · session_01L9qibvcTXi4hWgjz8G8ium

<!-- claude-projects-attribution: {"github_login":"os-tesla"} -->
_Requested by **Tesla** · [project
thread](https://claude.ai/code/project/chan_01AXsQkLFKRdQCqQ3RTr6Jao?thread=cmsg_01AXsQkLFKRdQCqQ3RTr6JaoT8rr3zveNwye1npfS2EynC)_

Fixes objectstack-ai#38142

Clause-②: no
Metadata-protocol: none

## 维护者速读
- 从 18 升级到 19 的作者,以前在升级提示里看不到三条变化(表单工具改名、表单类型、发布时拒收存不住的数据模型字段),现在这三条会列在
18 → 19 的升级提示里。
- 修正第 19 版升级说明,替用升级命令从 18.x 升上来的团队补上漏掉的提示。
- 只是把三条说明挪到正确的大版本下,内容一字不改,不碰任何数据或配置;出错也只是提示位置不对,可以直接撤回。
- 无

## What changes
- Three ADR-0087 semantic entries move from protocol major 18 to 19:
`semantic/18.ID.ts` becomes `semantic/19.ID.ts` for
`define-form-studio-helper-renamed-define-metadata-form`,
`form-type-define-form-and-packageless-list-at-form-name` (both from
objectstack-ai#37366) and
`publish-refuses-data-model-fields-that-save-and-do-not-work` (from
objectstack-ai#37513). The ids and the file contents are unchanged (pure renames, 100%
similarity).
- Why 19: `gen:migration-registry` files an entry by its filename's
major, and `composeMigrationChain(fromMajor)` keeps only the steps above
`fromMajor` (`packages/spec/src/migrations/chain.ts:42`). All three were
added after `PROTOCOL_VERSION` moved to 19 (`204356a6e`, objectstack-ai#37314). None
is in `@objectstack/spec@18.6.0`, the last 18.x release; objectstack-ai#37513 first
shipped in `19.0.0-next.0`, objectstack-ai#37366 in `19.0.0-next.2` (tag ancestry).
Filed under 18, they were skipped by exactly the 18 → 19 upgrade they
describe.
- `form-type-…` still follows `define-form-…` in id order, so its "since
the previous entry" sentence still reads right.
- The id-keyed `adr-0087: registered` markers in `.changeset/pre/*` and
the released CHANGELOGs stay valid and are not edited.
- One `@objectstack/spec` patch changeset. The registry,
`spec-changes.json` and the upgrade guide are generated and not
committed, so nothing else changes in the diff.

## Tests
No test file changes: the pins that read the chain
(`semantic-relevance.test.ts`, `migrations.test.ts`) read the generated
step lists, not counts or ids for these entries. The before/after
readings below are probes against the generated registry, kept in the
project, not in this PR.

<details><summary>Readings (head fc06c4d, base origin/main
23fa361)</summary>

Generated registry and `composeMigrationChain(18)`:

| | step 18 semantic | step 19 semantic | chain `--from 18` lists the
three |
|:--|:--|:--|:--|
| before (main) | 582, holds all three | 21, holds none | MISSING ×3 |
| after (this branch) | 579 | 24, holds all three | LISTED ×3 |

`applyMetaMigrations(stack, 18)` on a minimal stack: before, `todos=21`,
all three NOT LISTED; after, `todos=24`, all three are `todos`.

Local runs at fc06c4d:
- `pnpm exec turbo run build --filter='./packages/**'
--filter='@objectstack/dogfood^...'` under `os-verify-lock`:
command-exit 0.
- `pnpm --filter @objectstack/spec typecheck`: command-exit 0.
- `pnpm --filter @objectstack/spec test`: `Test Files 911 passed (911)`,
`Tests 28851 passed | 1 todo (28852)`.
- Derived gates (`dispatch-gates.mjs --commands`): 83 run, each exit 0;
`--ran` reconciles 83 derived, 83 run, 0 NOT MEASURED (a derived zero:
every line records its exit code).
- `overlap-check.mjs` before the first push: merges cleanly with
origin/main, 0 open PR heads overlap.
</details>

## Acceptance notes
- **Should `check-adr-0087-registration` read the major?** Not built
here (claim). The measured answer: in the window the per-entry files
exist (`f293d454b`, 2026-08-10, to origin/main `23fa3619`), every entry
added landed at or above the protocol major of its day, except these
three.
- Protocol 17 (to `4e9fe9ff6`, the 17 → 18 bump): 50 added under 17 and
717 under 18 (the next major, filed before the bump), 0 below 17. The
one explicit backfill in the window (`5823d593db`, "backfill nine
ADR-0087 ledger entries missing from the v17 stock") landed under 17,
equal to the protocol major then.
- Protocol 18 (to `204356a6e`, the 18 → 19 bump): 345 under 18, 0 below.
The bump commit itself added one entry under 19.
- Protocol 19 (since): 33 under 19, 3 under 18. Those 3 are this card's,
renamed here.
- So a rule "a newly added entry's major is equal to `PROTOCOL_MAJOR` or
above it" would have fired on exactly these three in about 1,150
additions, and on no backfill. "Equal to `PROTOCOL_MAJOR`" would have
been wrong: it refuses the 717 entries filed ahead of the 17 → 18 bump.
The gate already reads the paths of the entries a diff adds, so the
check would close a blind spot of an existing gate rather than add a new
one. A later backfill below the current major would still need a named
exemption. Whether to file the card is the seat's decision.
- Reach, corrected by the contract review (comment 7237861973): that
reading measures the protocol move, not the release. 34 more
`semantic/18.*` entries were added between `spec@18.6.0` (`958ee0359`)
and the move, ship in no 18.x release, and are skipped by `--from 18`
the same way; each was filed while `PROTOCOL_MAJOR` read 18, so the
at-or-above rule would not have refused them. They are outside this PR's
claim; the carrier is the seat's.
- Releases already out: `19.0.0-next.0` and `next.2` carry these entries
under 18, so `os migrate meta --from 18` on those prereleases still
skips them. The fix ships with the next prerelease. No released text is
edited (AGENTS.md: CHANGELOGs are release-owned).

## Verification
Read first (by risk):
1. The three renames: `git diff --stat -M origin/main...HEAD` shows
`R100` for each.
2. The changeset.

Two-minute check: in `packages/spec`, `pnpm gen:migration-registry` and
then `grep -n
"publish-refuses-data-model-fields-that-save-and-do-not-work"
src/migrations/registry.ts`. On this branch the id sits inside the
`semantic:19` region; on main it sits inside `semantic:18`.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01L9qibvcTXi4hWgjz8G8ium)_

Co-authored-by: Claude <noreply@anthropic.com>
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…MAJOR (objectstack-ai#38436)

<!-- claude-projects-attribution: {"github_login":"os-project-manager"}
-->
_Requested by **Leehom** · [project
thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XHogQ9ogKPxHhiFfT2UQgJi)_
Fixes objectstack-ai#38240
Clause-②: no
Metadata-protocol: none

## 维护者速读

-
用户能看到什么变化:用户无感;只有往平台升级说明里新增条目的开发者会碰到:条目编号低于当前协议大版本时,合并前的门禁直接拒绝,并告诉他改成哪个文件名。
- 为什么做:属于升级说明(ADR-0087 迁移账本)的守卫;此前已有三条 19 版的升级说明被误放在 18 下,按「从 18
升级」运行时永远看不到(已另行改正)。
- 出错会怎样:最坏是误拒一条合法的补登记说明;作者在变更说明里加一行补登记声明即可通过,门禁本身可直接撤回,不影响任何已发布内容。
- 要你做什么:无。

**Round 2** (contract review 7249162118, head `323f21d860`): S1 fixed
(the refusal's printed backfill line carries `MINOR`, `PATCH` and `WHY`
placeholders and the reason must name a release of the entry's own major
in digits, so the line pasted unedited stays red, EM-R6); S2 fixed (the
`ledgerAdded` conjunct applies only on a merge base from before the
per-entry split, so an id the template already carries no longer hides a
new entry, EM-R7); N1 fixed (`retired-keys/` and `retired-defs/`
refusals give the tombstone aging cost read by `build-schemas.ts`).
Also: EM-G7 (the L1-a nit), EM-R8 (a case at major 20), and EM-U2 no
longer spells a spec version in prose (the `check:future-spec-major`
red). Battery EM now has 50 cases; `origin/main` merged.

_Where the sections below still describe round 1 (the `ledgerAdded`
condition on every base, a 40-character-only backfill reason, 31 EM
cases, test readings at `9982079f87`), the Round 2 line above supersedes
them: delta contract review 7250195970 (PASS) and delta L1-a 7250194256
(ACCEPT) read head `323f21d860`._

## What changes

`scripts/check-adr-0087-registration.mjs` gains a second rule, judged on
every diff (with or without a breaking changeset):

- **Added entries.** For each of the three entry directories
(`semantic/`, `retired-keys/`, `retired-defs/`), an entry file at HEAD
is *added* when its key (the filename minus its `MAJOR.` prefix) is
absent from the merge base's listing of the same directory. A
`semantic/` entry must also be in `ledgerAdded`, the id set the R4
`registered` check already reads, so the two never disagree about what a
PR registered.
- **Refusal.** An added entry whose prefix is below `PROTOCOL_MAJOR` is
refused. The message names the file, its prefix, the current
`PROTOCOL_MAJOR` and where it was read, gives the `git mv` to
`PROTOCOL_MAJOR.KEY.ts`, and says the one case that may sit lower is a
backfill, with the exact line to write.
- **Backfill escape.** The gate had no existing escape for this (its
only text input is changeset bodies, and its one marker is the
breaking-change disposition, of which a changeset may carry exactly
one). So a minimal declaration form: an HTML-comment line in a changeset
the PR adds, whose keyword is `adr-0087-backfill` plus a colon, followed
by the entry path and the release that shipped the change (40 characters
minimum, the same floor as a `not-required` reason). It is not an
`adr-0087` disposition (that pattern needs the colon directly after
`adr-0087`), and each one is printed and annotated as an exemption on
every run.
- **`PROTOCOL_MAJOR` source.** Read at HEAD from
`packages/spec/src/kernel/protocol-version.ts` (`PROTOCOL_SOURCE`,
imported from `scripts/sync-template-versions.mjs`) and evaluated by
that module's `loadProtocolMajor`, the same reader the version lane
uses. Nothing is hard-coded and no second copy is parsed. The reader is
async and `scan()` is not, so it runs in a child `node` process, only
when the diff adds an entry. A major that cannot be read is a red.
- **Self-test.** New battery `EM (objectstack-ai#38240)`, 31 cases, roster floor 60 to
61. The GR7 transition fixture now carries the protocol module, because
its `beta` entry counts as added and is judged against it.

## The rule's reach

Covers:
- An entry the PR adds, in any of the three entry directories, whose
prefix is below `PROTOCOL_MAJOR` at HEAD. That covers the three
`semantic/18.*` entries objectstack-ai#38142 moved to 19.
- CI's `Check Changeset` job checks out the PR's merge commit. So a
branch cut before a protocol move is judged against the major on `main`
once its CI runs after the move.

Does not cover:
- **Entries stranded by the protocol move itself.** The 34
`semantic/18.*` entries objectstack-ai#38256 carries were each filed while
`PROTOCOL_MAJOR` read 18. They were at the major of their day, so this
rule would not have refused any of them. Catching that shape takes a
check at the protocol move (no unreleased entry left below the new
major), not a check on added entries. That check is not built here.
- **A move to a lower major.** A file renamed from `19.X.ts` to
`18.X.ts` keeps its key, so it is not *added* (the card's R100 pin) and
is not judged.
- **A PR carrying `skip-changeset`.** The real scan runs in `Check
Changeset`, which that label skips wholesale. Adding an entry publishes
from `@objectstack/spec`, so such a PR owes a changeset anyway.
- **A merge base from before the per-entry split.** The key alone
decides added-ness in `retired-keys/` and `retired-defs/` (they have no
`id:` line for `ledgerAdded` to see). From such a base, all of their
files would read as added: a red, never a silent pass, and no open
branch is that old.

## History reading

From objectstack-ai#38239's Acceptance notes: since the per-entry files exist
(`f293d454b`, 2026-08-10), about **1,150** entries were added and **3**
landed below the protocol major of their day, all three in objectstack-ai#38142. No
backfill was among them: the one explicit backfill (`5823d593db`) landed
at the major of its day. A rule of "equal to `PROTOCOL_MAJOR`" would
have refused the 717 entries filed ahead of the 17 to 18 bump.

Re-measured for this PR from a blobless clone of `main`, first-parent
`f293d454b..f42bcc1`, all three entry directories. An entry counts as
added when its key appears as `A` and not as `D` in the same commit, so
a move between majors is not an add. Major of the day is read by
position against the two bump commits `4e9fe9ff6` (17 to 18) and
`204356a6e` (18 to 19).

| directory | added | above the major of the day | equal | below |
|:--|--:|--:|--:|--:|
| `semantic/` | 643 | 330 | 310 | 3 |
| `retired-keys/` | 305 | 218 | 87 | 0 |
| `retired-defs/` | 210 | 169 | 41 | 0 |
| **total** | **1,158** | **717** | **438** | **3** |

The three below:
`publish-refuses-data-model-fields-that-save-and-do-not-work`,
`define-form-studio-helper-renamed-define-metadata-form` and
`form-type-define-form-and-packageless-list-at-form-name`, each `18.*`
under protocol 19.

## Tests

All readings are at head `9982079f87`, unless a line names another tree.

- **Red before.** The `EM-R1` fixture (an added `semantic/18.*` while
`PROTOCOL_VERSION` is `19.0.0`) run through `scan()` from `main`'s gate
(`f42bcc18c6`) and from this branch's gate: main's is green, this
branch's is red. The same battery run against this branch's gate with
the refusal loop switched off: 15 failures, all in `EM-R1`, `EM-G5`,
`EM-R3`, `EM-R4` and `EM-R5`. Nothing else in the self-test moved.
- **Green after.** `node scripts/check-adr-0087-registration.mjs
--self-test` printed `991 assertions` and exited 0. The battery floor
holds, including `EM (objectstack-ai#38240)` at 31.
- **Replayed on real history.** `scan()` over `d9bc148e0` (objectstack-ai#37513, the
commit that filed
`publish-refuses-data-model-fields-that-save-and-do-not-work` under 18
while protocol was 19) is red, naming that file. Over `216524a286`
(objectstack-ai#38239, three `R100` renames 18 to 19) it is green, with 0 entries
counted as added. The CLI over `f42bcc18c6..origin/main` (`5df10eccaa`,
three new `19.*` entries) prints `3 migration entries added, each at or
above PROTOCOL_MAJOR 19.`

<details><summary>Red before: main's scan() against this branch's, on
the EM-R1 fixture</summary>

```text
main f42bcc1: GREEN -- EM-R1 expected RED, got green (0 problem(s))
branch: RED (1 problem(s))
  packages/spec/src/migrations/entries/semantic/18.late-note.ts: adds a migration entry under protocol major 18, below the current PROTOCOL_MAJOR 19
--- ablated gate (refusal loop off) --self-test:
✗ check-adr-0087-registration --self-test -- 15 failure(s)
  • EM-R1 an added semantic/18.* under PROTOCOL_MAJOR 19 is refused: expected RED, got green
  • EM-G5: the backfill is reported with where it was declared -- got []
  • EM-R3 a backfill line with a short reason is refused: expected RED, got green
  • EM-R4 a backfill line naming another entry does not excuse this one: expected RED, got green
  • EM-R5 an added retired-keys/18.* under PROTOCOL_MAJOR 19 is refused: expected RED, got green
  (and ten message-match lines under those cases)
```
</details>

<details><summary>Green after, and the replay on the commit that filed a
19 note under 18</summary>

```text
✓ check-adr-0087-registration --self-test: 991 assertions over real temp git repos (real scan()/assertInputs() path)

replay d9bc148 (the commit that filed a 19 note under 18): protocolMajor 19 · added ["semantic/18.publish-refuses-data-model-fields-that-save-and-do-not-work.ts"] · 1 problem(s)
packages/spec/src/migrations/entries/semantic/18.publish-refuses-data-model-fields-that-save-and-do-not-work.ts
      adds a migration entry under protocol major 18, below the current PROTOCOL_MAJOR 19
      (evaluated from packages/spec/src/kernel/protocol-version.ts at d9bc148).
      The filename prefix alone decides which upgrade step lists an entry, and
      `os migrate meta --from N` replays only the steps above N. An entry filed below the current
      major is never shown to a project upgrading from 18, the readers it was written for.
      fix: file it under the current major --
        git mv packages/spec/src/migrations/entries/semantic/18.publish-refuses-data-model-fields-that-save-and-do-not-work.ts packages/spec/src/migrations/entries/semantic/19.publish-refuses-data-model-fields-that-save-and-do-not-work.ts
      The one case that may sit lower is a BACKFILL: ...
      (the last line prints the exact backfill declaration for this path)

replay 216524a (PR objectstack-ai#38239, three R100 renames 18 -> 19): added 0 · 0 problem(s)

$ node scripts/check-adr-0087-registration.mjs --base f42bcc1 --head origin/main
✓ check-adr-0087-registration: 1 declared-breaking changeset(s), each carrying an ADR-0087 disposition.
✓ check-adr-0087-registration: 3 migration entries added, each at or above PROTOCOL_MAJOR 19.
```
</details>

<details><summary>Derived gate families: 34 derived, 34 run, all exit
0</summary>

Derived with `node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` at `9982079f87`. Each command ran under
`os-verify-lock.sh`, and its exit code was captured before any pipe.
- 33 commands in one runner: `VERDICT command-exit 0`. Every one exited
0: `check-adr-0087-registration` (`--base origin/main` and
`--self-test`), `check-closing-keyword-parity` (both halves),
`check-comment-mask-corpus`, `check-declaration-mirrors` (both),
`check-self-test-wired` (both), `check-self-test-workflow-commands`
(both), `check-whole-set-label-write` (both), `ci/plan-test-core-shards
--self-test`, `pm/bare-root-worklist --self-test`, and the pnpm families
`adr-anchors`, `agent-test-spelling`, `bash32-floor`,
`changeset-gate-self-tests`, `ci-filter-parity`, `cli-command-ids`,
`cross-package-test-inputs`, `driver-memory-census`, `entry-guard`,
`gitlink-declared`, `nul-bytes`, `parse-guard`, `pnpm-filter-targets`,
`pnpm-flag-spellings`, `ratchet-remedy-authority`, `refd-timer-probe`,
`scripts-symbol-anchors` and `watch-hint-literal`.
- `pnpm check:pm-dispatch-gates`: `VERDICT command-exit 0`,
`dispatch-gates self-test (fast tier): 2459 cases pass`.
- `dispatch-gates --ran`: `34 derived famil(ies) accounted for — 34 run,
0 NOT-MEASURED`.
</details>

## Acceptance notes

- **No changeset.** The diff is one file under `scripts/` and publishes
nothing, so the PR carries `skip-changeset`. That label skips the real
scan in `Check Changeset`. The gate's `--self-test` half still runs,
unconditionally, in `Lint & Repo Gates`
(`check:changeset-gate-self-tests`).
- **Why a new declaration form for backfills.** The gate's only text
input is changeset bodies. Its one marker is the breaking-change
disposition, which a changeset may carry exactly once, and a backfill is
not a breaking change. Reading the PR body instead would need the
workflow to pass it in, which is a governed `.github/workflows/**` edit.
The form is one line per entry, checked against the exact added path,
with the same 40-character reason floor as `not-required`. A line that
names no refused entry excuses nothing and is not itself an error.
- **`PROTOCOL_MAJOR` runs in a child process.** `loadProtocolMajor` is
async (it imports the type-stripped module) and `scan()` is synchronous
and called synchronously across the whole self-test. So the reader is
called in a child `node`, only when an entry is added. The reader file
itself is untouched. Cost: one short spawn on a PR that adds an entry,
nothing on any other.
- **Seat routing on the scope (A).** The seat (repo:objectstack#5) read
the card's ":570 entry dirs" as plural and ruled scope A: all three
entry directories, decided by key, with `semantic/` also required in the
R4 set. A stays within *added* entries, so it does not widen past the
reach note 7237892858. The narrower B (`semantic/` only, exactly the R4
id set) was not taken.
- **The R4 set and renames.** `ledgerAdded` (the R4 set) is an id set
read from `id:` lines. Renames do not count in it, because an id
survives a move. But it carries no file paths, and it cannot see
`retired-keys/` or `retired-defs/`, whose entries declare `export const
entry = '...'` and no `id:`. The card's directory scope and its ~1,150
reading both span all three directories, so added-ness is decided by the
key in each directory, and `semantic/` additionally requires the id to
be in `ledgerAdded`. EM-G3 (semantic) and EM-G6 (retired-keys) pin that
a rename, here a downward one so a counting rule would red, is not
counted.
- **Predicate 4 untouched.** Nothing in `verifyTypeSurfaceOnly` or the
prescription exemption moved (maintainer ruling 2026-08-30 on objectstack-ai#13080).
- **Not merged with `main`.** Since the branch point, `main` gained 8
commits. None touches this file, `sync-template-versions.mjs` or the
protocol module (`overlap-check`: merges cleanly). The three entries
`main` added are the CLI reading above.
- **Follow-up filed: objectstack-ai#38467.** As the reach note suggests, a second
check could run at the protocol move: no entry absent from every
released tag may stay below the new major. That shape is the one that
stranded the 34. objectstack-ai#38467 carries that check, a downward rename, a PR not
re-judged after a protocol move, the `build-schemas.ts` remedy major,
the README/ADR prose and `--list` (L2 N2, N3), and the delta L2 nits N1
(`retired-defs/` cost text) and N5 (capitalised placeholder words).

## Verification

Read first (by risk):
1. `scan()`'s new tail block (the refusal and its backfill match) and
`addedMigrationEntries`, the added-ness definition the rule stands on.
2. `protocolMajorAt`, the child process that evaluates `PROTOCOL_MAJOR`
with `loadProtocolMajor`.
3. The `EM` battery, especially EM-G3 and EM-G6 (renames are not added)
and EM-R2 (an unreadable major is red).

Two-minute check: `node scripts/check-adr-0087-registration.mjs
--self-test` prints the success line with no failures. Then run the gate
on this branch with `node scripts/check-adr-0087-registration.mjs`. Its
last line should read `this PR adds no migration entry.`

---
_Generated by [Claude
Code](https://claude.ai/code/session_01FEkQ5oPfjnm2yWHEwkiYrn)_


<!-- signed: repo:objectstack#5 · os-project-manager ·
session_01FEkQ5oPfjnm2yWHEwkiYrn -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…g, 56 changesets added) and state what npm publishes (objectstack-ai#38645)

<!-- claude-projects-attribution: {"github_login":"os-steve"} -->
_Requested by **Steve** · [project
thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9St4eUWHFcCKuRUrCZPperJ)_

Fixes objectstack-ai#38189

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 用户能看到什么变化:v19 发布页的 breaking 清单补上 11 月 26 日之后合进来的 56 条改动(其中 30 条还在 main
上、下一次预发布才带上,页上逐条标明),计数和页头的发布状态也改成现在 npm 上的真实情况。
- 为什么做:升级到 19 的人把这页当完整清单用;原清单只数到 19.0.0-next.0 的输入,之后 next.1、next.2 和
main 上的 breaking 改动大多没列。
- 出错会怎样:只改一个文档页,不影响任何代码或发布;某条写错了,读者会被误导,但直接撤回这个改动即可恢复原页。
- 要你做的:无。

## What changes

`content/docs/releases/v19/index.mdx` only.

- **Header.** The publication sentence now states what npm answers:
`latest` is 18.6.0, `next` is `19.0.0-next.2`; the line's versions on
npm are `19.0.0-next.0` (2026-11-26) and `19.0.0-next.2` (2026-11-28).
`19.0.0-next.1` was versioned on `main` (30a8047) and is not on npm, so
its changes first ship in `next.2`.
- **How this list was built.** Re-measured at `6eb23c87` (origin/main at
start, 2026-11-29) with the method the page states:
`classifyReleaseBullet` over every changeset on `main` — the 1,185 in
`.changeset/pre/` (consumed by the next.0, next.1 and next.2 version
passes) and the 219 still pending. 159 breaking from 155 PRs: 98 to act
on, 61 registered.
- **56 new lines' worth of changesets**, each sorted by the classifier
into 需手动处理 (27) or 自动迁移 (29), placed under the page's existing topic
headings, with three new ones: 需手动处理 → Knowledge; 自动迁移 → Knowledge
sources, Sharing and permissions. The 30 still pending carry "— on
`main`".
- **自动迁移 intro** and **Coming from 18.x step 3**: the registered split
restated in changesets (31 on the protocol-19 step, 30 on the
protocol-18 step, of 61).
- **Callout**: no longer says no prerelease was published.

## Tests

The classifier run (script in the dev's scratchpad; it imports
`classifyReleaseBullet` from `scripts/release-github-releases.mjs` and
feeds each changeset body as a CHANGELOG bullet, `- ` on the first line
and two-space indent on the rest), at `b03fd5f5`'s parent tree
`6eb23c87` (the diff touches no changeset):

<details><summary>Raw counts</summary>

```
ALL 1404 {"manual":98,"migrated":61,"other":830,"added":403,"semantic":12}
OLD (in a46efa8 set) 950 {"migrated":31,"manual":71,"other":563,"added":278,"semantic":7}
NEW (after a46efa8) 454 {"manual":27,"other":267,"added":125,"migrated":30,"semantic":5}
  NEW next.0 45 {"other":27,"added":13,"migrated":1,"semantic":2,"manual":2}
  NEW next.1 138 {"manual":9,"other":80,"migrated":12,"added":36,"semantic":1}
  NEW next.2 52 {"added":11,"other":38,"manual":3}
  NEW pending 219 {"added":65,"other":122,"migrated":17,"manual":13,"semantic":2}
missing-from-tree of a46 set: none
```

The same function over the 950 files as they stood at `a46efa8c` (`git
show a46efa8:.changeset/FILE`):
`{"migrated":31,"manual":71,"other":563,"added":278,"semantic":7}`, and
0 of the 950 changed section between `a46efa8c` and `6eb23c87` — the
page's first count reproduces exactly.

</details>

<details><summary>The 57 breaking changesets added after a46efa8 (pass
· section · PR · file)</summary>

```
next.0  manual    37477  37004-retire-knowledge-ragflow.md
next.0  manual    37491  36964-flow-option-label-filters.md
next.0  migrated  37437  35827-data-table-staged-edit-retired.md   (already on the page)
next.1  manual    37605  31908-p4c-sealed-expiry.md
next.1  manual    37640  37604-platform-record-followups.md
next.1  manual    37668  37104-knowledge-settings-readers.md
next.1  manual    37720  37682-i18n-retire-build-chat-keys.md
next.1  manual    37720  37682-retire-build-chat-frontend.md
next.1  manual    37818  37608-disabled-holder-publish-rollback-refused.md
next.1  manual    37883  37575-first-render-grid-shell-passes.md
next.1  manual    37900  36689-mcp-stdio-disabled-package-every-caller.md
next.1  manual    37902  37678-knowledge-turso-settings-group.md
next.1  migrated  37366  37086-define-metadata-form-rename.md
next.1  migrated  37366  37086-form-metadata-type.md
next.1  migrated  37371  36055-view-all-stops-voting-on-fields.md
next.1  migrated  37513  35143-data-model-publish-checks.md
next.1  migrated  37584  37499-disabled-holder-unbound-row-bare-write-refused.md
next.1  migrated  37600  36595-related-list-key-under-arrangement.md
next.1  migrated  37676  37304-knowledge-source-governed-type.md
next.1  migrated  37783  37712-agent-model-provider-retired.md
next.1  migrated  37807  35143-seeds-actions-checks.md
next.1  migrated  37840  36377-flow-bare-ordering-record-date-arithmetic.md
next.1  migrated  37870  37613-book-audience-one-gate.md
next.1  migrated  37910  37717-lookup-depends-on-param-computed-field.md
next.2  manual    37948  37851-disabled-holder-own-row-publish-rollback-refused.md
next.2  manual    38028  managed-email-password-held-off.md
next.2  manual    38042  36679-secret-rewrap-confirmation-exit.md
pending manual    37896  runtime-object-less-action-no-record.md
pending manual    37963  37467-knowledge-title-arm-retired.md
pending manual    37982  37907-knowledge-turso-test-connection.md
pending manual    38038  38019-knowledge-source-review-follow-ups.md
pending manual    38085  37622-related-list-keys-agree-under-arrangement.md
pending manual    38180  auth-switches-read-declaration.md
pending manual    38209  35879-served-schema-platform-stamped-keys.md
pending manual    38268  sec2-wf9p-f12.md
pending manual    38269  37752-app-list-edit-with-ai-removed.md
pending manual    38310  38041-knowledge-source-closure-system-object.md
pending manual    38431  36987-auth-updateuser-returns-void.md
pending manual    38452  38377-retire-split-algorithm-version.md
pending manual    38580  36057-scenarios-delete-agent-confirmation-names.md
pending migrated  37924  37856-ask-ai-action-type-retired.md
pending migrated  37929  36495-action-locations-acted-on.md
pending migrated  37971  37307-knowledge-source-references.md
pending migrated  38001  automation-variable-keys-reserved-segments.md
pending migrated  38013  37983-knowledge-source-save-needs-the-service.md
pending migrated  38060  37961-knowledge-source-unmounted-adapter-refused-at-save.md
pending migrated  38096  34562-record-structural-lint.md
pending migrated  38107  35143-views-dashboards-checks.md
pending migrated  38145  37214-chart-series-measure-format-refused.md
pending migrated  38168  36544-form-view-modal-size-retired.md
pending migrated  38216  33912-share-unknown-recipient-ledger.md
pending migrated  38216  33912-share-unknown-recipient.md
pending migrated  38273  33806-pending-confirmation-service-one-seam.md
pending migrated  38299  35924-publish-reparses-object-draft.md
pending migrated  38398  37753-build-progress-frame-retired.md
pending migrated  38470  38369-knowledge-held-without-embedder-or-store.md
pending migrated  38545  38150-adopt-orphans-door-retired.md
```

PR = the `(#N)` of the commit that added the changeset (`git log
--diff-filter=A`). The pass is the version commit that moved the file
into `.changeset/pre/`: next.0 33a31dc, next.1 30a8047, next.2
9d111a7 (`packages/spec/package.json` reads `19.0.0-next.0/1/2` at
each).

</details>

<details><summary>Page cross-checks</summary>

- Every one of the 155 PRs behind a breaking changeset is linked on the
page (0 missing), and the page links no PR outside that set.
- Each of the 30 pending changesets sits on a line carrying "— on
`main`", and no published one does.
- `!`-titled first-parent commits since 18.6.0 (958ee03) to `6eb23c87`:
135 (87 to `a46efa8c`, as the page said); all 135 are in the list.
- Registered markers resolved to their entry files
(`packages/spec/src/migrations/entries/*/N.*`,
`packages/spec/src/conversions/entries/N/`, and metadata-core's forward
conversion for `permission-view-all-fields-beside-record-bypass`): the
30 registered changesets added after `a46efa8c` name 39 ids, all on step
19; the 31 before it name 33 ids, 32 on step 18 and
`protocol-18-range-refused` on step 19.

</details>

## Acceptance notes

- **Pending changesets are in the list.** The card's done-when covers
every changeset between `a46efa8c` and the measurement sha; 30 of those
are still in `.changeset/` and ship in the next cut, so their lines are
marked "on `main`" and the intro says so.
- **`19.0.0-next.1` is not on npm.** `npm view PKG versions` for
`@objectstack/spec`, `core`, `cli`, `runtime` and `@object-ui/i18n`
lists `19.0.0-next.0` and `19.0.0-next.2` only. The header states that
fact and no more.
- **The registered split is now counted in changesets, not entries.**
The old page said 41 registered entries, 39 on protocol 18. Counting the
ids in the registered markers gives 33 at `a46efa8c` (32 on step 18), so
the 41/39 could not be reproduced from any stated method. The rewritten
intro and step 3 count changesets (31 on step 19, 30 on step 18, of 61),
which match the bullets one to one.
- **Followed the classifier where a title has no `!`:** objectstack-ai#37605, objectstack-ai#37883,
objectstack-ai#37963, objectstack-ai#38209 and objectstack-ai#38269 are breaking by their banner or their
`(narrowing)` arm; objectstack-ai#38209's Clause-② reads "no (narrowing …)", which the
classifier counts as breaking although the body says nothing a client
sends is refused. Listed as classified; no changeset changed.
- **objectstack-ai#37513** merged before the next.0 cut but its changeset was consumed
by next.1 (its body says the next.0 CHANGELOG missed it).
- **One line, several changesets**: objectstack-ai#37720, objectstack-ai#37366 and objectstack-ai#38216 each carry
two changesets; objectstack-ai#37818 with objectstack-ai#37948, objectstack-ai#38038 with objectstack-ai#38310 and objectstack-ai#38013 with
objectstack-ai#38060 share a line. The existing 102 lines were not rewritten.
- **Counts on a release page**: each is anchored to a named measurement
sha, the snapshot the card asks for; it is not a count kept in sync with
the tree.
- **objectstack-ai#37437** (closed card objectstack-ai#37922's bullet) is not added twice.
- **Check Changeset** will be red: this docs-only PR publishes nothing
from any package, the `skip-changeset` case, and the dispatch opens it
without labels, so that label is the seat's to apply.

## Verification

Read first, by risk: the method paragraph and header (`index.mdx` lines
6-47), the 自动迁移 intro, then the new 需手动处理 → Knowledge block.

Two-minute check: `git show
6eb23c8:.changeset/pre/37851-disabled-holder-own-row-publish-rollback-refused.md
| head -12` shows the `fix(metadata-protocol)!` summary and the BREAKING
banner behind the objectstack-ai#37948 line; `npm view @objectstack/spec dist-tags`
prints `{ latest: '18.6.0', next: '19.0.0-next.2' }`.

<details><summary>Local gate readings at b03fd5f</summary>

```
dispatch-gates --commands at b03fd5f: 52 commands (1 path changed)
first pass: 47 exit 0; 5 exit 3/1 = PREREQUISITE NOT MET (lint, spec, client-react unbuilt), re-run after building the closures under os-verify-lock (VERDICT command-exit 0 both):
  pnpm --filter '@objectstack/lint...' build ; pnpm --filter '@objectstack/client-react...' build
final: 52 of 52 :: exit 0
✓ dispatch-gates --ran: 52 derived famil(ies) accounted for — 52 run, 0 NOT-MEASURED (a DERIVED zero — all 52 recorded an exit code and none of them is 3).
check-release-page-status: OK — 3 GA major(s) in scope (v16, v17, v18)
```

</details>

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01ADHkmRar3Kkg6SpwVgaaVE

<!-- signed: repo:objectstack#3 · os-steve ·
session_01ADHkmRar3Kkg6SpwVgaaVE -->

Co-authored-by: Claude <noreply@anthropic.com>
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 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