Skip to content

fix(spec): page and related-list columns name a mixed array in their refusal - #39232

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/project-thread-a6ufr2
Dec 3, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/project-thread-a6ufr2

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Bill · project thread

repo:objectstack@os-bill · os-bill · session_01Utp6CaTJhEQ1M6macqmBoN

Fixes #39036

Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:列表页自带的列配置、记录页「相关列表」的列配置,如果把字段名和列对象两种写法混在一起,保存仍被拒,但报错现在直接说「两种写法混用了」并给出改法;以前只说「Invalid input / 期望文字」。和列表视图已合并的修复同一句话。
  • 为什么做:属于搭建助手提效专题,同一类报错让模型多绕一轮;这是列表视图那张卡留下的两个兄弟位置。
  • 出错会怎样:只改报错文字,能保存的写法一条没变;出错最多是提示措辞不准,可直接撤回。
  • 要你做什么:无。

What changes

The list view's columns refusal for a mixed array (LIST_VIEW_COLUMNS_MIXED + listViewColumnsUnionError, landed for the list view) now also answers the two sibling declarations of the same exclusive z.union([z.array(z.string()), z.array(ListColumnSchema)]):

  • packages/spec/src/ui/page.zod.ts: InterfacePageConfigSchema.columns (a list page's own interfaceConfig.columns) gains { error: listViewColumnsUnionError }.
  • packages/spec/src/ui/component.zod.ts: RecordRelatedListProps.columns (the record:related_list prop) gains the same option; its docblock says the refusal names the mix.
  • packages/spec/src/ui/list-columns-mix.ts (new): the constant and the callback moved here verbatim from view.zod.ts, which now imports them. The module is reached by relative import only and is not re-exported from ui/index.ts, following filter-rule-array.ts (ruleArrayFilterError). Exporting the callback from view.zod.ts instead would have added a public symbol to @objectstack/spec/ui, because ui/index.ts does export * from './view.zod'. The api-surface baseline does not move (see the gates below).

The accept set of all three unions is unchanged: the callback answers only when the array holds both a string and an object entry, and returns undefined otherwise, so every other failure keeps zod's Invalid input.

Consumers read first (the card's "check first"), on ui/ at the base commit:

  • List page: InterfaceListPage.tsx hands interfaceConfig.columns to the list view as its columns, so it reaches the same grid path that reads the whole array in the spelling of its first entry (normalizeColumns in ui/packages/plugin-grid/src/objectGridColumns.ts). Accepting a mix there would drop or misread entries, so the union stays exclusive.
  • Related list: record-related-list.tsx (colName per entry) and RelatedList.tsx (expandFields, typeof per entry) read each entry on its own, not by the first one. The union stays exclusive anyway, because the key declares the same union as listViews[].columns and a saved view's columns are composed onto it verbatim.

Tests

  • packages/spec/src/ui/view-columns-mix.test.ts, the existing harness, two new top-level describes:
    • per sibling union (list page interfaceConfig.columns, record:related_list columns): all names and all objects parse; each of the three mixes is refused with the sentence on the invalid_union head at columns; a non-mix failure (['name', 3]) keeps Invalid input;
    • the doors: PageSchema refuses a mixed list page at interfaceConfig.columns with the sentence, and accepts both one-spelling controls; ComponentPropsMap['record:related_list'] is the pinned RecordRelatedListProps (the schema the component-props lint judges a page element by).
    • 26 passed (14 existing + 12 new).
  • packages/metadata-protocol/src/protocol.save-union-issues.test.ts, in the existing describe for the keep-the-head rule (the L2 review's nit N2 on the list view PR): a view save with columns: ['title', { field: 'status' }] answers 422 INVALID_METADATA, stores nothing, and collectMetadataIssues keeps the columns union head with the mix sentence, first among the columns entries. CONTROL: the same view in one spelling saves. 51 passed.

Ablation, per union (sed on the committed file, restored with git checkout HEAD --, porcelain clean after):

Removed { error: listViewColumnsUnionError } from Red Green
page.zod.ts 4 (the 3 list-page mixes + the PageSchema door) 22
component.zod.ts 3 (the 3 related-list mixes) 23
view.zod.ts 6 (the existing list view head, door and wire pins) 20
view.zod.ts, spec rebuilt, metadata-protocol file 1 (the N2 pin) 50

Each ablation reds only its own union's pins. After restoring and rebuilding spec: 26/26 and 51/51.

Acceptance notes

  • The component-props lint (packages/lint/src/validate-component-props.ts) reads a refused record:related_list bag through describeIssue, which prints the union head's own message first, so it now carries the sentence. Read in the code, not pinned here (outside this card's surface).

Verification

Two-minute check: pnpm --filter @objectstack/spec exec vitest run src/ui/view-columns-mix.test.ts prints 26 passed.

Files to read first: packages/spec/src/ui/list-columns-mix.ts, then the one-line uses in page.zod.ts and component.zod.ts, then the new describes in view-columns-mix.test.ts.

Local gates

Derived gates at d3add681 (base origin/main 440331f). Then origin/main was merged once (c5936fb0, bringing 724b369 among three commits, which touches packages/spec/src/ui/component.zod.ts far from this hunk; clean merge). At c5936fb0: spec and metadata-protocol's dependency closure rebuilt, check:generated 14 of 14 up to date, view-columns-mix.test.ts 26 passed, action-notices.test.ts passed, protocol.save-union-issues.test.ts 51 passed.

  • dispatch-gates.mjs --ran: 95 derived families accounted for, 92 run, 92 exit 0, 3 NOT-MEASURED (exit 3, prerequisite not met): check-plugin-teardown-shape --self-test (shallow-clone fixture), check:dual-build-cjs-loads and check:lean-entry-closure (built dist of packages this diff does not touch; CI builds them). Diff 212 lines (+172 / -40), under the 3,000 human-review line.
  • pnpm --filter @objectstack/spec check:generated: all 14 generated artifacts up to date against a dist built from this head, check:api-surface included, so the public surface does not move (the new module is not exported).
  • pnpm --filter @objectstack/spec typecheck (tsc + scripts + test layer) exit 0; pnpm --filter @objectstack/metadata-protocol typecheck exit 0.
  • spec vitest run src/ui src/api/zod-issues-to-fields.test.ts src/shared: 241 files, 7939 tests passed.
  • overlap-check.mjs before the first push: clean against origin/main and the two open PRs sharing a file (fix(spec): describe prose names App Studio, not the retired "Studio" #39218 on view.zod.ts, feat(spec): notices on an action, warnings its dialog draws before submit (#39182) #39201 on component.zod.ts).

🤖 Generated with Claude Code

https://claude.ai/code/session_01Utp6CaTJhEQ1M6macqmBoN

…refusal

The list page's interfaceConfig.columns and the record:related_list columns
prop share the list view's union error, moved verbatim into a module-local
file that ui/index.ts does not re-export. Pins per union, plus the
metadata-protocol walker keeping the non-default union head.

Claude-Session: https://claude.ai/code/session_01Utp6CaTJhEQ1M6macqmBoN
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation protocol:ui tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Dec 3, 2026
@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/spec, touching 4 documentable anchor(s).

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

  • content/docs/protocol/objectui/layout-dsl.mdx (via RecordRelatedListProps (symbol, a top-level const object))

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

  • content/docs/releases/v12.mdx (via RecordRelatedListProps (symbol, a top-level const object))
  • content/docs/releases/v14.mdx (via RecordRelatedListProps (symbol, a top-level const object))

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
  • the SDK route bridge reached 71 of 255 client-bound route-ledger rows — the other 184 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 184: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 60 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 — 183 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 724b3695e9208d0430075a82b195c49e6f6f0b7b → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 6d9448bed4d6d298ad9cf46fd9e475fb901f7f5b — the merge of head c5936fb06f6ac5dd48ee0140a980cfa75314d902 into base 724b3695e9208d0430075a82b195c49e6f6f0b7b, 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 6d9448bed4d6d298ad9cf46fd9e475fb901f7f5b && git checkout 6d9448bed4d6d298ad9cf46fd9e475fb901f7f5b
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 724b3695e9208d0430075a82b195c49e6f6f0b7b c5936fb06f6ac5dd48ee0140a980cfa75314d902 && git checkout -B drift-repro 724b3695e9208d0430075a82b195c49e6f6f0b7b && git merge --no-ff c5936fb06f6ac5dd48ee0140a980cfa75314d902

node scripts/docs-audit/affected-docs.mjs --json 724b3695e9208d0430075a82b195c49e6f6f0b7b

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

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-bill · os-bill · session_01Utp6CYHCfrNqXVPhRFuHmE

Contract-review-claim: session_01Utp6CYHCfrNqXVPhRFuHmE · head c5936fb · 2026-12-03T02:12Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-bill · os-bill · session_01Utp6CYHCfrNqXVPhRFuHmE

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: c5936fb06f6ac5dd48ee0140a980cfa75314d902
Local-runs: none
Scope: packages/spec/src/ui/component.zod.ts, packages/spec/src/ui/list-columns-mix.ts, packages/spec/src/ui/page.zod.ts, packages/spec/src/ui/view.zod.ts + none

Inputs read: card #39036 (body, 4 comments: triage audit, claim 7363732790, amendment 7363760332, os-dev report), PR #39232 (body, 7 files, net diff against main at merge-base 724b369), the check-runs on the head (0 failed; the rest success or skipped, Check Changeset, Lint · repo & tooling gates, Type Check · workspace, Test Core 12/12 and Governed Surface Queue Guard among the successes). The remaining three files (.changeset/39036-…md, view-columns-mix.test.ts, protocol.save-union-issues.test.ts) are the lane seat's ACCEPT at TIER_DEFAULT.

① Derived judgments

  • Accept set of InterfacePageConfigSchema.columns (page.zod.ts:982): unchanged — right. The only edit is a second argument { error: listViewColumnsUnionError } on the same z.union([z.array(z.string()), z.array(ListColumnSchema)]); the arms, their order, .optional() and .describe() are byte-for-byte as on main. A zod error option is read only after the union has already failed, and the callback returns a string or undefined; it cannot turn a refusal into a pass or a pass into a refusal. No narrowing, no widening.
  • Accept set of RecordRelatedListProps.columns (component.zod.ts:1773-1776): unchanged — right. Same one-argument edit on the same two arms; .optional().describe(…) text identical.
  • Accept set of ListViewSchema.columns (view.zod.ts:3652-3655): unchanged — right. The union still passes { error: listViewColumnsUnionError }; the binding is now an import instead of a module-local const. The constant's four string fragments and the callback body in list-columns-mix.ts are character-identical to the 37 lines removed from view.zod.ts (the only change is the export keyword on the callback).
  • Refusal text for a mixed array on the two sibling unions: changed from zod's Invalid input to the list view's sentence — right, and it is the card's Done-when. A non-mix failure still gets undefined from the callback and so keeps zod's default head with the branch detail beneath it.
  • Public surface: unchanged — right. packages/spec/src/ui/index.ts export-stars ./view.zod, ./page.zod and ./component.zod and has no line for ./list-columns-mix; no other file in the tree at the head names the module except its three importers and two test comments. tsup.config.ts builds the per-category index.ts entries only, and package.json exports lists no path that resolves to the module. view.zod.ts no longer declares either name, so nothing leaks through its export *. packages/spec/api-surface, api-surface-signatures.json, export-origins and declaration-map carry neither listViewColumnsUnionError nor list-columns-mix, and the diff touches no generated baseline; the head's repo-gates check-run is green.
  • Generated JSON schema and docs: unchanged — right. An error option is not part of a schema's JSON-schema or describe output, and no generated artifact is in the diff.

② Semver level

@objectstack/spec: patch is right: a refusal's message text changes, no array changes verdict, and no symbol is published. The changeset says what a consumer sees (the sentence, the two spellings, "every array that parsed before still parses") and nothing more.

Clause-②: no — holds. Nothing is narrowed (every previously accepted columns still parses on all three unions) and nothing is added to a published entry. Metadata-protocol: none holds too: the metadata-protocol package changes in a test file only.

③ Boundary flags

  • Claim amendment 7363760332 (new module instead of an export from view.zod.ts): answered — correct call. Exporting the callback from view.zod.ts would have published it through ui/index.ts's export *; the unexported sibling module follows the in-tree precedent packages/spec/src/ui/filter-rule-array.ts (ruleArrayFilterError, imported by page.zod.ts, absent from ui/index.ts). The file surface stayed inside the amended claim.
  • open_questions: empty. security_findings: none; I agree, the diff reads an already-refused input to choose a message and touches no auth, permission, tenancy or data path.
  • Out-of-scope finding (class c): content/docs/protocol/objectui/layout-dsl.mdx lines 682-683 say RecordRelatedListProps columns "is an array of field-name strings, never column-definition objects". Confirmed in the tree at the head, and confirmed pre-existing (the object arm landed with changeset 7056ca5, not here). It is outside this diff and this card's surface; it is owed a follow-up card from the carrier seat, and it is a little more visible after this PR because the refusal now teaches { field: 'name' } on that very prop. Not a finding against this head.
  • The card's "check first": answered in the tree. List page — ui/packages/app-shell/src/views/InterfaceListPage.tsx hands the page's own columns to the list view, and normalizeColumns (ui/packages/plugin-grid/src/objectGridColumns.ts:48-60) decides the whole array's spelling on columns[0]; exclusivity there is load-bearing. Related list — record-related-list.tsx (colName per entry, :61, :532-537) and RelatedList.tsx (typeof c === 'string' ? … : … per entry, :1829) read each entry on its own, so no first-entry reader exists on that path; the union stays exclusive because the card rules the accepted shapes unchanged, which is the right reading of Clause-② no.
  • SQL push-down: not applicable. No query, no id materialisation, no in-app join in the diff.
  • The PR body's ablation table is the dev's account; no ablation was re-run (read-only). The per-union pins it describes exist in the diff, and the head's Test Core shards are green.

④ Design judgment

No must-fix, no should-fix.

packages/spec/src/ui/list-columns-mix.ts — holds. The callback names a mix only when the failed input is an array with at least one string and at least one plain-object entry; arrays, null and other scalars do not count as objects, so ['name', 3], ['name', null] and ['name', ['x']] keep zod's default head. I tried to break the sentence against each union's real element schema: all three object arms are the one ListColumnSchema imported from view.zod.ts (page.zod.ts:17, component.zod.ts:19; component.zod.ts:1755 says so on purpose), whose only required key is field: z.string() and which declares width: z.number().positive().optional(). So both spellings the message shows — ['name', 'amount'] and [{ field: 'name' }, { field: 'amount', width: 120 }] — parse on the page union and on the related-list union, and the repair it prescribes ('name' becomes { field: 'name' }) yields an accepted array on both. The key is literally columns on all three surfaces, so the opening backticked name is true for each. The module imports nothing, so it adds no cycle between the three zod files.

packages/spec/src/ui/page.zod.ts — holds. One import, one option, one comment line; the comment ("the same exclusive union as the list view's columns, with the same refusal for a mix") is true of the line under it. First consumer read: a mixed array accepted here would be misread by normalizeColumns, so naming the mix rather than accepting it is the right repair.

packages/spec/src/ui/component.zod.ts — holds. The docblock's added clause ("refused, with the list view's own sentence naming the mix and the repair (list-columns-mix.ts)") agrees with the code two lines below it. The describe() already says "one spelling per list … an array mixing strings and column objects is refused", so the schema's prose and its refusal now say the same thing.

packages/spec/src/ui/view.zod.ts — holds. Pure move: 37 lines out, one import and its one-line comment in; the use site at :3655 is untouched. exportOptionsPdfUnionError, which the moved jsdoc cites as "the same contract", is still at view.zod.ts:3219.

Wire path (read, not reviewed): collectMetadataIssues (packages/metadata-protocol/src/protocol-metadata-issues.ts:391) pushes a union head ahead of its branch entries whenever entry.message !== ZOD_UNION_DEFAULT_MESSAGE, so the sentence leads at the save door for any of the three unions; the new metadata-protocol test pins that on a list view save, which is what review nit N2 on #38981 asked for.

  • N1 (nit) — list-columns-mix.ts's header keeps the paragraph "Declared with // on purpose — the LIST_VIEW_EXPORT_PDF_RETIRED placement note applies: build-docs takes a file's first JSDoc per exported symbol". The paragraph was written for view.zod.ts; build-docs.ts enumerates .zod.ts files only (:247), so in this module the precaution has nothing to guard, and the note it points at lives in another file. Harmless; the constant is still correctly unexported. Accepted deviation, or a prose touch on a later visit.
  • N2 (nit) — the shared module's rationale for exclusivity ("read the whole array in the spelling of its FIRST entry") is true of the list view and the list page and is not the reason on the related list, whose renderers read per entry. The related list's real reason (same union as listViews[].columns, a saved view composed onto it verbatim) is stated in component.zod.ts's docblock, so nothing false is said; the shared header simply does not carry it. Accepted deviation.
  • N3 (nit) — listViewColumnsUnionError / LIST_VIEW_COLUMNS_MIXED keep their list-view names while serving three keys. A rename would have broken "moved verbatim" for no contract gain; left as is.

Implemented-by: claude/project-thread-a6ufr2
Reviewed-by: session_01Utp6CYHCfrNqXVPhRFuHmE

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-bill · os-bill · session_01Utp6CYHCfrNqXVPhRFuHmE

席位核对

ACCEPT — L1 of record for PR #39232 (card #39036) at head c5936fb06f6ac5dd48ee0140a980cfa75314d902; zone ai-1202, isolated TIER_DEFAULT reviewer. Contract review at CONTRACT_REVIEW_TIER: PASS, record 7365298391 on this head (no must-fix, no should-fix; nits accepted). Not governed. The pre-existing docs drift (content/docs/protocol/objectui/layout-dsl.mdx lines 682-683) goes to a follow-up card filed by the zone.

Mechanical face: node scripts/pm/l1-face.mjs --pr 39232 (run at head c5936fb)

  • ok: shape (open, draft, base main), first-line Fixes #39036, relation, keywords-other-cards, releases-path, empty-changeset, nul-suspects, declarations (Clause-②: no · Metadata-protocol: none), skills-docs (not owed), floor-checks (Lint & Repo Gates success, TypeScript Type Check success), all-checks (60 success, 13 expected skip, 0 failed, 0 pending), dogfood (not owed).
  • flag, changeset: adjudicated as not a defect. The face flags @objectstack/metadata-protocol because a file in it changed and no changeset names it. The only file touched there is src/protocol.save-union-issues.test.ts, a test. That package's files[] is ["dist","README.md","CHANGELOG.md"], so the test file never ships and no changeset is owed for that package. The CI Check Changeset run is success. The user-visible change is in @objectstack/spec, and the PR's changeset covers it.
  • mergeable_state is clean. Queue: never queued. No reviews yet at this head. The contract-tier L2 claim is posted (7365221052) but its verdict is still owed before the queue.

(1) Done-when: all three bullets delivered

  • Bullet 1, mix refusal on both unions, reusing the callback: delivered.
    • page.zod.ts:982 (InterfacePageConfigSchema.columns) and component.zod.ts:1776 (RecordRelatedListProps.columns) each gain { error: listViewColumnsUnionError }. This is the same callback the list view uses (view.zod.ts:3655).
    • The card's "check first" (does a consumer read the array by its first entry?) is done and is in the PR body. I re-read it:
      • The list page reads by first entry. ui/packages/app-shell/src/views/InterfaceListPage.tsx:520 passes cfg.columns to the list view, and ui/packages/plugin-grid/src/objectGridColumns.ts:54 decides the spelling from typeof columns[0].
      • The related list reads each entry on its own (record-related-list.tsx:61 colName, :529-537).
    • Both unions stay exclusive, which is right.
  • Bullet 2, pinned per union with an ablation: delivered, and I re-ran the ablation myself. The method was to delete , { error: listViewColumnsUnionError } from one file, run vitest run src/ui/view-columns-mix.test.ts, and restore with git checkout HEAD -- (porcelain clean after each run). Results:
    • page.zod.ts removed: 4 red, 22 green. The reds are the three 'list page interfaceConfig.columns' mix cases and the PageSchema door.
    • component.zod.ts removed: 3 red, 23 green. The reds are the three 'record:related_list columns' mix cases only.
    • view.zod.ts removed: 6 red, 20 green. The reds are the list view's existing pins only.
    • Restored: 26/26 green.
    • Each ablation reds only its own union. These counts match the dev's table exactly.
  • Bullet 3, N2 pin: delivered. The new case is at packages/metadata-protocol/src/protocol.save-union-issues.test.ts:570, and 51/51 pass at the head. It asserts:
    • the 422 envelope's code (INVALID_METADATA) and status, and that nothing is stored;
    • the head at columns carries the mix sentence and not the default message, and comes first among the columns entries;
    • a CONTROL save in one spelling succeeds.
    • Realness is covered under (5).

(2) Clause-② no: confirmed

  • list-columns-mix.ts is reached only by relative import, from view.zod.ts:111, page.zod.ts:24 and component.zod.ts:79. Neither ui/index.ts nor the root index.ts names it.
  • The file is not *.zod.ts, so files[] (src/**/*.zod.ts) does not ship it as source.
  • The exports map has fixed keys only, with no wildcard.
  • Probe on the dist built from the head:
    • listViewColumnsUnionError and LIST_VIEW_COLUMNS_MIXED are not on @objectstack/spec/ui (dist/ui/index.js) and not on the root entry. Positive control: RecordRelatedListProps is present.
    • Zero hits for listViewColumnsUnionError in any dist/**/*.d.ts and in api-surface/. Positive control: RecordRelatedListProps is in api-surface/ui.json.
  • pnpm --filter @objectstack/spec check:generated against the dist built from this head: all 14 generated artifacts up to date, including check:api-surface, check:docs and check:authorable-surface. The worktree stayed porcelain clean.

(3) The view.zod.ts change is a move: code verbatim, comments edited

  • I diffed the removed base lines (724b3695:view.zod.ts:3559-3594) against list-columns-mix.ts.
  • The constant LIST_VIEW_COLUMNS_MIXED and the callback body are byte-identical.
  • The only differences:
    • const became export const on the callback (list-columns-mix.ts:42). This is needed so other modules can share it.
    • A copyright line was added.
    • The header comment gained one paragraph: "shared by three declarations … not re-exported from ui/index.ts".
    • One parenthetical was added, "(a list page hands its own columns to that same grid)", plus a re-wrap and "mapper" changed to "mappers".
  • That accounts for the net growth: 48 new lines against 37 removed.

(4) Accept sets unchanged: confirmed

  • For each sibling union, view-columns-mix.test.ts:161 (describe.each(SIBLINGS)) asserts that an all-names array and an all-objects array both parse.
  • The doors block (:188) asserts that PageSchema accepts both one-spelling controls.
  • A non-mix failure (['name', 3]) keeps Invalid input.
  • The error option only changes the message: the callback returns undefined unless the array holds both a string and a non-array object.

(5) The N2 pin is real: it goes red when the keep-the-head rule breaks

I broke the rule at protocol-metadata-issues.ts:390 in two ways and re-ran the file each time, restoring after each run:

(6) Changeset, PR body, declarations

  • Changeset .changeset/39036-page-related-list-columns-mix-error.md: '@objectstack/spec': patch. Patch is the right level for a change to refusal text only, and it is the only published package that ships a change.
  • I read the changeset sentence by sentence:
    • "take one spelling per list …" is true.
    • "already refused, and still is" is true.
    • "Both now answer with the list view's sentence" is true. I measured it through zodIssuesToFields: the first wire entry is the sentence at interfaceConfig.columns and at columns, for both orders.
    • "Every array that parsed before still parses, and every other columns refusal reads as before" is true.
    • Nit, not blocking: "a branch detail such as columns.0: expected string, received object". For the example given, ['name', { field: 'amount' }], the measured pre-change first branch detail is columns.1: expected string, received object. The columns.0 form only appears for the object-first mix. Optional fix: change to columns.1 or drop the index.
  • PR body:
    • It opens with the attribution comment and the _Requested by **Bill** …_ line, then a signed line, then Fixes #39036.
    • Clause-②: no and Metadata-protocol: none each start their own line.
    • ## Acceptance notes is present, with the component-props lint note, which is marked as read and not pinned.
    • The body ends with 🤖 Generated with [Claude Code](https://claude.com/claude-code), then the session URL and the signed trailer.
    • No model names appear.
  • Fixes vs Part of: Fixes is correct, because all three Done-when bullets are delivered.

(7) Docs drift: pre-existing; recommend a follow-up card, not a fold

  • content/docs/protocol/objectui/layout-dsl.mdx:682-683 says RecordRelatedListProps' "columns is an array of field-name strings, never column-definition objects".
  • That sentence is already on base 724b3695. The ListColumn arm it contradicts was added earlier, by spec(ui): widen RecordRelatedListProps.columns to the saved-view ListColumn union — the upstream half of objectui#9593 (batch #144 item 3, letter A) #18639 (closed). The generated content/docs/references/ui/component.mdx:2050 already documents both arms. So this PR did not cause the drift and does not touch the page.
  • The PR does make the contradiction more pointed: the new refusal tells an author to write { field: 'name' }, which the hand-written page says is never allowed.
  • Why a card, not a fold:
    • Checklist rule: a published defect that is only noticed and not touched gets a card, not a fix.
    • The adjacency test fails on two of its four conditions. The defect class differs (docs accuracy vs refusal text), and the gate family differs (docs, outside the claim's file surface).
  • Suggested card: grade p3, domain:docs, plus a re-check of the Callout's surrounding sentence. A search shows no existing card (searched "layout-dsl related list columns" and "RecordRelatedListProps" columns docs). The dedupe words are in the dev report's class-c finding.

Deviations accepted

Out of scope

  • The layout-dsl.mdx drift (above): owed as a follow-up card.
  • The kanban lanes union (component.zod.ts ~6145) is a different concept and is untouched. Correct.
  • validate-component-props.ts now carrying the sentence through describeIssue is noted in Acceptance notes and not pinned. It is outside the card's surface, and I accept it as a read-only note.

Evidence readings recorded (all mine, at c5936fb)

  • vitest run src/ui/view-columns-mix.test.ts: 26 passed.
  • vitest run src/protocol.save-union-issues.test.ts (metadata-protocol, after building its dependency closure from the head): 51 passed.
  • Per-union ablations 4/22, 3/23, 6/20; keep-the-head rule ablations 4/47 and 3/48. All restored, porcelain clean.
  • check:generated 14/14.
  • CI check-runs at the head: 60 success, 13 skipped, 0 failed.

Before the queue

  • The contract-tier L2 verdict is still owed (claim 7365221052).
  • Optional: the changeset columns.0 → columns.1 nit.
  • At landing, file the layout-dsl follow-up card.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review December 3, 2026 02:23
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Dec 3, 2026
Merged via the queue into main with commit 1fe9c62 Dec 3, 2026
74 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-a6ufr2 branch December 3, 2026 02:49
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 protocol:ui size/m 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.

Page and related-list columns answer a string/object mix with a bare union refusal (same class as #38981)

2 participants