Skip to content

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

Queued
objectstack-fleet[bot] wants to merge 6 commits into
mainfrom
claude/issue-35143-data-model-checks
Queued

objectstack-fleet[bot] wants to merge 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
Any commits made after this event will not be merged.

This branch has not been deployed

No deployments
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.

2 participants