Skip to content

feat(spec): serve metadata list columns on /meta/types, hook first - #36881

Merged
objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/project-thread-gs5c0d
Nov 24, 2026
Merged

objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/project-thread-gs5c0d

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Requested by Yibo Wang · project thread
Part of #36860

This is part (a) of the card's two-PR split, which the seat chose when the whole change measured about 3,530 changed lines: the spec declaration, the serving, the header translation, the extractor support and the console precedence, proven end to end on hook. Part (b) follows from main once this merges and closes the card: the other 26 types, their 52 new header leaves in the 11 metadata-forms bundles, the 9 console declarations moved into spec and the duplicate object registration resolved.

Clause-②: yes (widening)
Metadata-protocol: added
Skills-docs: none — the served list is Studio display data that only the spec registry declares; a metadata author cannot write it, and no skill under skills/** teaches Studio list columns (skills/objectstack-ui/SKILL.md names entries[].schema only, unchanged)

维护者速读

  • 工作室里「钩子」列表的列改由平台规范统一声明,列头随界面语言显示,其他元数据列表暂时不变。
  • 属于工作室元数据列表标准化:列定义从控制台代码搬进规范,命令行和 AI 客户端读同一份。
  • 只有看钩子列表的管理员会看到列变化;出错时退回原来的默认列,合并后可直接撤回。
  • 无。

What changes

  • Spec (@objectstack/spec). MetadataListViewSchema is a list layout bound to the type's own schema (data: { provider: 'schema', schemaId }) with columns. Each MetadataListColumnSchema is ListColumnSchema narrowed to field / label / type. field is a schema key or a dotted path into it, and type is a MetadataListCellTypeSchema renderer: text, badge, boolean, count, list or summary. defineList({ schemaId, columns }) builds one and refuses anything else. METADATA_LIST_REGISTRY (system) sits beside METADATA_FORM_REGISTRY and declares hook here. resolveMetadataListLabels translates a list's headers through metadataForms.<type>.fields.<field>.label.
  • Serve (@objectstack/metadata-protocol, @objectstack/rest). getMetaTypes() serves the registry entry as list beside form, and GetMetaTypesResponseSchema declares it. translateMetaTypesResponse localizes the headers with the bundle and locale it already uses for form. A type with no entry carries no list key.
  • i18n (@objectstack/lint). walkMetadataForms emits the form field slot for each column path the type's form does not already label, with the header as the English source. scripts/check-i18n-bundles.mjs names the registry module as a bundle trigger. Every hook header reuses a form label, so no bundle changes.
  • Console (@object-ui/app-shell). ResourceListPage reads the served columns first (servedListColumns.tsx). If the type serves none, it uses the console's listColumns, then the default name / label / description. A served header is shown as served. A key the stored row omits shows the schema default at that path. listCells overrides a served column's cell and listExtraColumns appends server-stamped values that are not schema keys. builtinComponents.tsx and anchors.ts are not touched here; their 9 declarations move in part (b).

Tests

  • packages/spec/src/system/metadata-list-zod-reconciliation.test.ts: every column resolves to a declared, writable, non-retired, non-overlay key of its type's schema. No column is duplicated, and each header equals the form field label or the humanized path. Each refusal has a "gate can fail" pin: an undeclared key, an _ overlay key, a retired key, an undeclared nested key, and defineList refusing currency, an empty column list and width.
  • packages/metadata-protocol/src/protocol.meta-types-list-layout-36860.test.ts: every registry type is served with its own frozen layout. The control is a type with no entry, which carries no list key.
  • packages/rest/src/meta-types-list-headers.test.ts: zh-CN headers are translated through the form field slot, dotted path included, and only the header is rewritten. The controls are the en headers, a type serving no list, and no in-place mutation across requests. Ablation: replacing the translate call with next.list = entry.list reds the zh-CN case (1 failed, 2 passed), restored by trap.
  • ui/.../servedListColumns.test.tsx covers the renderers, path and default readers and the precedence helpers. ui/.../ResourceListPage.servedListColumns-36860.test.tsx mounts the page and checks served headers in order, each renderer, schema defaults for absent keys, a dotted path, the default list as control, a listCells override and a listExtraColumns column.

Acceptance notes

Verification

Read first, by risk:

  1. ui/packages/app-shell/src/views/metadata-admin/ResourceListPage.tsx: the precedence expression and localizeColumnLabel skipping a served header.
  2. packages/lint/src/i18n-walk.ts: the column step in walkMetadataForms. It decides which bundle leaves part (b) adds.
  3. packages/spec/src/ui/view.zod.ts: the pick/extend narrowing behind defineList.

Two-minute check: pnpm --filter @objectstack/rest exec vitest run src/meta-types-list-headers.test.ts. Expect 3 passed, with the zh-CN case reading ['名称', '事件', '最大重试次数'].

Gates on 597f70e
  • node scripts/pm/dispatch-gates.mjs --ran: 145 derived, 145 run, 0 NOT-MEASURED, 0 UNRUN. Two findings were fixed in this PR: check:test-source-alias (module-top @objectstack/objectql import in the new rest test) and check:engine-double-contract (ledger rewritten with --write for the new metadata-protocol test). Three gates first exited 3 on prerequisites and were re-run green: the plugin-teardown self-test after fetching its pinned fixture commit, and check:skill-examples and check:dual-build-cjs-loads after building the packages that had no dist.
  • pnpm --filter @objectstack/spec check:generated: all 14 artifacts up to date. check:authorable-surface, check:llms-txt, check:spec-parsed-alias, check-i18n-bundles (no bundle changes), check:i18n, check:i18n-walk-parity, check-changeset-no-major, check-empty-changeset and check-changeset-fixed pass. check:i18n-coverage passes after building service-print.
  • check-governed-merges --branch HEAD: not governed, 1,309 changed lines.
  • tsc --noEmit is clean for @objectstack/metadata-protocol, @objectstack/rest and @objectstack/lint. @object-ui/app-shell type-check was not measured locally because the ui workspace deps have no dist; the only error in the changed files is the shared unresolved @object-ui/components import. CI's type-check lane is the verdict.
  • Tests: spec src/system + src/api/protocol 2,941 passed; app-shell metadata-admin list and directory pages 221 passed (15 files); @objectstack/lint i18n 27; metadata-protocol meta-types 67; rest list headers 3 + schema titles 3.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WGufzg7mFFG5b13DcQ93kf

Trim the list registry to hook for the first half of the card (the other
26 types, their bundle leaves and the nine console moves follow in the
second half), keep the console declarations as they were, regenerate the
spec baselines and add the changeset.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzg7mFFG5b13DcQ93kf
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 4 package(s): @objectstack/lint, @objectstack/metadata-protocol, @objectstack/rest, @objectstack/spec, touching 23 documentable anchor(s). ⚠️ 8 changed file(s) yielded no anchor (packages/spec/api-surface/system.json, packages/spec/api-surface/ui.json, packages/spec/authorable-surface/ui.json, …), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

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

  • content/docs/kernel/services-checklist.mdx (via getMetaTypes (symbol, a method of class ProtocolDiscoveryAndBasesFacet))
  • content/docs/plugins/adding-a-metadata-type.mdx (via getMetaTypes (symbol, a method of class ProtocolDiscoveryAndBasesFacet))
  • content/docs/protocol/kernel/i18n-standard.mdx (via metadataForms (literal, a string literal in walkMetadataForms))
  • content/docs/ui/reports.mdx (via LABEL (symbol, a top-level const object))
  • content/docs/ui/translations.mdx (via metadataForms (literal, a string literal in walkMetadataForms))

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

  • content/docs/releases/implementation-status.mdx (via RestServer (symbol, a top-level class))
  • content/docs/releases/v12.mdx (via RestServer (symbol, a top-level class))
  • content/docs/releases/v16.mdx (via RestServer (symbol, a top-level class))
  • content/docs/releases/v17/17-3.mdx (via RestServer (symbol, a top-level class))
  • content/docs/releases/v17/17-5.mdx (via RestServer (symbol, a top-level class))
  • content/docs/releases/v18/18-3.mdx (via RestServer (symbol, a top-level class), metadataForms (literal, a string literal in walkMetadataForms))

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
  • 8 changed file(s) yielded no anchor (packages/spec/api-surface/system.json, packages/spec/api-surface/ui.json, packages/spec/authorable-surface/ui.json, …) — pages documenting those are invisible to this run
  • 2 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 — 179 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 97e0f934e5e0613179a429ce9fcaa47e2d351768 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 9564f2ffa652853cd99bf35c017614c887bfc09f — the merge of head 597f70e74069d518950e6ea574de3ac32c71e2e1 into base 97e0f934e5e0613179a429ce9fcaa47e2d351768, 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 9564f2ffa652853cd99bf35c017614c887bfc09f && git checkout 9564f2ffa652853cd99bf35c017614c887bfc09f
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 97e0f934e5e0613179a429ce9fcaa47e2d351768 597f70e74069d518950e6ea574de3ac32c71e2e1 && git checkout -B drift-repro 97e0f934e5e0613179a429ce9fcaa47e2d351768 && git merge --no-ff 597f70e74069d518950e6ea574de3ac32c71e2e1

node scripts/docs-audit/affected-docs.mjs --json 97e0f934e5e0613179a429ce9fcaa47e2d351768

⚠️ 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 97e0f934e5e0613179a429ce9fcaa47e2d351768 → 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#3 · os-support-ai · session_01WGufzesUz1Y8VZuKJRhVL8

Contract-review-claim: session_01WGufzesUz1Y8VZuKJRhVL8 · head 597f70e · 2026-11-24T07:34Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzesUz1Y8VZuKJRhVL8

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 597f70e74069d518950e6ea574de3ac32c71e2e1
Local-runs: none
Scope: packages/spec/src/api/protocol.zod.ts, packages/spec/src/system/i18n-resolver.ts, packages/spec/src/system/index.ts, packages/spec/src/system/metadata-list-registry.ts, packages/spec/src/ui/view.zod.ts + packages/spec/src/system/metadata-list-zod-reconciliation.test.ts, packages/metadata-protocol/src/protocol-discovery-and-bases.ts, packages/metadata-protocol/src/protocol-meta-type-schema.ts, packages/metadata-protocol/src/protocol-meta-types-listing.ts, packages/metadata-protocol/src/protocol.meta-types-list-layout-36860.test.ts, packages/rest/src/rest-server.ts, packages/rest/src/meta-types-list-headers.test.ts, packages/lint/src/i18n-walk.ts, scripts/check-i18n-bundles.mjs, scripts/engine-double-contract.pinned.json, ui/packages/app-shell/src/views/metadata-admin/servedListColumns.tsx, ui/packages/app-shell/src/views/metadata-admin/ResourceListPage.tsx, ui/packages/app-shell/src/views/metadata-admin/registry.ts, ui/packages/app-shell/src/views/metadata-admin/useMetadata.ts, the two app-shell tests, the generated spec shards (api-surface, authorable-surface, declaration-map, export-origins, json-schema.manifest) and content/docs/references, .changeset/36860-metadata-list-columns.md
Security-touching: no
Rule-change-verified: none

Inputs: card #36860 body and all six comments (7122720706, 7122828117, 7122844515, 7122871023, 7123560039, 7124466797), the PR body, the 32-file net diff against merge-base 5c2e34cdb2b4, and the head's check-runs. The tree touches packages/spec/src/**, so the face is the published schema and the record carries ④; the brief named the declaration shape, the committed tree decides the tier.

No must-fix, no should-fix.

① Derived judgments

  • MetadataListCellTypeSchema, MetadataListColumnSchema, MetadataListViewSchema, defineList and their six types (@objectstack/spec/ui): right. New names only. The column is ListColumnSchema.pick(field, label, type) with type re-declared as a closed six-value enum; ListColumnSchema.type is a free string on main, so every value a metadata column accepts is one a ListColumn already accepts. The view is ListViewShapeSchema.pick(data, columns) with columns narrowed to at least one metadata column. Both stay strict, so width and the other ListView keys are refused (pinned by the "gate can fail" case). No accept-set on any existing schema moves.
  • METADATA_LIST_REGISTRY, MetadataListType, resolveMetadataListLabels (@objectstack/spec/system): right. A frozen const beside METADATA_FORM_REGISTRY, one entry (hook: name, label, object, events, priority, async, description). All seven keys are declared on HookSchema at head (hook.zod.ts 555 to 684) and all seven are fields of hook.form.ts with no explicit label, so each header equals the humanized form label and no bundle leaf is new. The resolver returns a new object, rewrites label only, and leaves a list untouched when the bundle has no entry for the type.
  • GetMetaTypesResponseSchema.entries[].list optional: right. Additive on a non-strict entry object; a client that ignores it parses as before. The dev's note that schema and form are still undeclared there is accurate and stays out of scope.
  • getMetaTypes() serves list beside form, omitted when the type has none: right. Both emit sites carry it, the MetaTypesListingEntry pin gains list?, and the protocol test holds the control (no list key on an undeclared type).
  • translateMetaTypesResponse translates the headers through metadataForms.TYPE.fields.FIELD.label: right. Same bundle, locale and options as form; the rest test pins zh-CN, a dotted path, the en control, a type with no list and no in-place mutation.
  • walkMetadataForms step 3 and the METADATA_LIST_REGISTRY_MODULE coupling constant: right by reading. The de-duplication key matches the entry shape walkFormField pushes (['metadataForms', type, 'fields', path, 'label'], source metadataFormField), so a column the form labels emits nothing and a column it does not emits one leaf with the header as source. The constant follows the two bare constants already there. See N2: on this head the branch has no input.
  • Generated shards and reference docs: right. They list exactly the new names and the five keys ui/MetadataListColumn:field|label|type, ui/MetadataListView:columns|data; Spec property liveness, Lint · docs & code guards and Build Docs are green on the head.
  • engine-double-contract.pinned.json: right. Three ledger rows for the new metadata-protocol test file, nothing else.
  • Console precedence (servedListColumns): right. Served list, else the console listColumns, else the default; listExtraColumns appended after any of the three with key de-duplication. For hook no console declaration exists on main, so the only visible change is the Hooks list. A type that serves no list reads exactly the expression it read before.

② Semver level

  • Changeset: @objectstack/spec, @objectstack/metadata-protocol, @objectstack/rest, @objectstack/lint, @object-ui/app-shell, each minor. These are every package whose source the diff touches; scripts/** and content/docs/** publish nothing. Check Changeset is green on the head.
  • Clause-②: yes (widening) is right: new exports and one new optional served key; nothing accepted before is refused. It is present in the PR body and the changeset body.
  • Metadata-protocol: added is right, and nothing here is semantic. No existing key changes meaning or default. The authorable ratchet gains five keys, which is added by AGENTS.md step 3, and added takes at least minor, which every listed package has. No author-facing door accepts a MetadataListView yet (only the spec's own registry calls defineList), so none was arguable; added is the conservative reading and costs nothing.
  • Skills-docs: none with its reason is on both the changeset and the PR body (the body line was added after the dev report, without a head move). Its truth is judged in ③.

③ Boundary flags

  • open_questions: empty. Nothing to answer.
  • Seat route 7122844515, four points: followed. (1) Shape: ListViewShapeSchema and ListColumnSchema narrowed through defineList, no new shape. (2) Label source: the existing fields.KEY.label slot; no new translation slot, and the extractor emits that slot for a column the form does not label. (3) Absent keys: schemaDefaultAt reads the served JSON Schema default at the column path, pinned for priority and async. (4) flow: not declared in (a); the report states type only for (b).
  • Skills-docs: none: true on this head, and no skills follow-up is owed by (a). Read at head: outside packages/spec nothing calls defineList or imports MetadataListViewSchema / MetadataListColumnSchema. The only caller is metadata-list-registry.ts; the only other reference is the response schema's list. There is no loader, no registrar, no metadata type and no stack-definition key through which an app or plugin author's list declaration is consumed, and the registry is a frozen module constant. An author can import defineList and build a value, but nothing loads it. skills/** at head teaches no Studio metadata list columns (its only hits are the record-page relatedListColumns, a different surface). The five authorable-surface/ui.json rows are the ratchet's mechanical ledger of the keys of every exported strict object schema in the category; it does not test for a door, and listing them is correct and required by the gate. The export therefore does not make none untrue. Two things follow. The body's own words "a metadata author cannot write it" sit beside Metadata-protocol: added, whose definition is what an author can write: the added rests on the ratchet count alone and is the conservative choice (② above); it is not evidence of a door. And the skills debt starts the day a door opens: the card that adds a list registrar or a stack key owes Skills-docs then, not this one (N4).
  • Plugin registrar: correctly absent. No registrar is added; the registry is frozen; the PR body says so.
  • Part of #36860: right for split (a). The card's acceptance for Flows, Jobs, the 9 console types, object, and the zh screenshots is not met by this PR and is named for (b), which carries Fixes. The split and its line counts are on the card (7123560039).
  • Corrected and dropped columns (report 7124466797): nothing in (a) is made false by them. The registry holds hook only, and the reconciliation test asserts exactly ['hook'], so (b) must edit that assertion to add a type. One comment is made false meanwhile (N3).
  • Dev flag, out-of-scope 1 (schema and form undeclared on the response schema): accurate, pre-existing, not widened here. The seat files it.
  • Dev flag, out-of-scope 2 (the runtime dispatcher serves form, and now list, untranslated): accurate and pre-existing for form, but it has one new consequence in (a), recorded as N1. The seat files it with that consequence named.
  • Security: no new exposure. list is a compile-time constant of column keys and English labels, a subset of what the same entry already serves as schema and form. The diff changes no route registration and no guard: the REST route and the dispatcher's /meta domain keep their existing caller gates. Header translation reads the bundle the same call already reads for form. Cells read the row body the list read already returns whole.
  • SQL push-down: not applicable. The diff adds no query, no id materialisation and no in-app join; the served value is a module constant and the console reads rows it already fetched.
  • Author: the PR user.login was not read as an input; the body is signed by the dev session session_01WGufzg7mFFG5b13DcQ93kf through the relay.

④ Design judgment

Each hits file holds against the seat route and its first consumer (Studio's generic list, proven on hook). Nits and accepted deviations, none affecting correctness or the contract on this head:

  • N1 (accepted deviation, goes on the dispatcher card). servedListColumns marks every served header labelLocalized: true whether or not the server translated it. Where the listing is served untranslated (the runtime dispatcher path, or a host with no translation bundle), a zh reader of the Hooks list now sees Name / Label / Description where the console's own engine.list.col.* table gave 名称 / 显示名 / 描述 before. On the REST path with the shipped bundles the headers are translated. Part (b) widens this to 27 types, so the dispatcher card should land before or with (b), or (b) should fall back to the console table when a served header equals its English source.
  • N2 (carry to (b)). The extractor's list-column branch in i18n-walk.ts emits nothing on this head (every hook column is a form field) and no lint test pins it. It reads correct. Part (b) gives it its first input and owes the pin: one column path the form does not declare emits one leaf, and a path the form declares emits none.
  • N3 (prose). registry.ts now says the columns reading listInclude: 'grants' are the type's own listExtraColumns; position still declares _holderCount and _grantedPermissionSets under listColumns in the untouched builtinComponents.tsx. True only after (b).
  • N4 (carry to the registrar card). defineList is exported and its jsdoc does not say that only the spec's own registry is read. No skill should teach it until a door consumes an author's declaration; the card that opens one owes the skills and docs update and should say so in its Skills-docs: line.
  • N5. MetadataListViewSchema inherits data as picked: optional, any provider arm. Only defineList forces provider: 'schema', and no consumer in the diff reads data. Accepted under the seat's shape-reuse ruling (one declaration can feed the record grid later); if a second producer appears, narrow data to the schema arm.
  • N6. MetadataListType is keyof a Record keyed by string, so it is string, not a union. Same as MetadataFormType; parity, not a defect.
  • N7. The reconciliation test hand-copies humanizeFieldPath from @objectstack/lint. A drift between the two would show as a header mismatch only for a column the form does not label, which (b) introduces.

Check-runs on the head: 71 names, latest run each; all success except nine skipped (opt-in, queue-only and matrix-parent lanes). None failed, none pending.

Implemented-by: claude/project-thread-gs5c0d
Reviewed-by: session_01WGufzesUz1Y8VZuKJRhVL8 (isolated L2 subagent, model claude-fable-5-2)

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzesUz1Y8VZuKJRhVL8

席位核对 — ACCEPT · repo:objectstack#3 · head 597f70e · 2026-11-24T07:42Z

L1 read of #36881, which is Part of #36860: part (a) of the seat's split, the spec, serve and console precedence. Seat routes 7122844515; dev report 7124466797. Contract-review claim 7125152059. CONTRACT_REVIEW_TIER L2 record 7125274794: PASS, clean round, rendered on the schema face because packages/spec/src/** is touched.

Face. l1-face.mjs --pr 36881: every item ok. skills-docs reads ok once the body carries the none — … line, and the L2 confirms that line is true (below). At this head: 61 checks succeed, 9 skip as expected, 0 fail. mergeable_state clean. check-governed-merges.mjs says NOT governed (1309 changed lines). Clause-②: yes (widening), Metadata-protocol: added.

Read and sound.

  • Spec: MetadataListViewSchema and MetadataListColumnSchema are strict narrowings of ListViewShapeSchema / ListColumnSchema, which follows the seat's shape-reuse route. The closed six-value cell enum is a subset of the free type string. defineList refuses an unknown renderer, an empty list and keys outside field/label/type. METADATA_LIST_REGISTRY holds hook only. The reconciliation test refuses an undeclared, retired or overlay key, and a header that differs from the form label for the same path.
  • Serve: getMetaTypes() serves list beside form on both emit sites, and GetMetaTypesResponseSchema declares it. REST translates headers through the existing metadataForms.<type>.fields.<path>.label slot (resolveMetadataListLabels), which follows the seat's label-source route. The rest-server translate-call ablation turns the pin red.
  • Console: servedListColumns puts served columns first, then the console listColumns, then name/label/description. An absent key shows the schema default (seat route point 3). flow declares type only (point 4). No plugin registrar is added, which is correct per the route.
  • Security: list is a compile-time constant and a subset of the schema and form already served on the same row. No route or guard changes.
  • Skills-docs: none is true. Outside packages/spec, nothing calls defineList or consumes an authored list (no loader, registrar, metadata type or stack key). The five authorable-surface/ui.json rows are the ratchet's mechanical ledger of exported strict schemas, which the gate requires. The card that opens a registrar or stack key owes the skills and docs update.

Changeset, read sentence by sentence. Every sentence matches the diff.

No must-fix, no should-fix.

For the seat (landing todo). The report names two out_of_scope_findings that no card carries. Before or with part (b), which widens the first to 27 types, file:

  • (a) The runtime http-dispatcher /metadata/types path serves form, and now list, untranslated, unlike the REST /meta handler. On that path the console treats served headers as already localized, so a zh reader of Hooks would see Name / Label / Description where the console's own table gave 名称 / 显示名 / 描述 (L2 N1).
  • (b) GetMetaTypesResponseSchema still declares neither schema nor form on an entry, though both are served.

Notes (nit, no action required in (a)):

  • N1. The changeset lists @object-ui/app-shell (private: true) at minor. That is harmless, and other ux PRs leave it out.
  • N2. Carried from the L2 record: the extractor's list-column branch has no pin yet, and (b) owes one. The registry.ts listInclude jsdoc names listExtraColumns while position still declares the grant columns under listColumns, which is false until (b). The defineList jsdoc should say only the spec registry is read (carry to the registrar card). MetadataListViewSchema.data is accepted under the shape-reuse route. The reconciliation test hand-copies humanizeFieldPath.
  • N3. Most of 元数据列表列改为在 spec 里声明,经 /meta/types 下发(像表单布局一样);第一批补上 hook、flow、job 等类型的关键列 #36860's acceptance (the first-batch types, the 9 console moves, the object fix, zh screenshots of Hooks, Flows and Jobs) lands with (b). That is why this PR is Part of.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzi4PechTRCTBrfxV8W

Landing · 2026-11-24T07:44Z · L1 ACCEPT 7125297029 (L1-a) at head 597f70e · #36860 part (a)

reading value
check-governed-merges.mjs --pr 36881 NOT governed · +1287/−22
landing-k.mjs --pr 36881 OK · K = 4 < 15 · locale and shared-budget legs clear
contract Clause-②: yes (widening) · Metadata-protocol: added (served list on /meta/types; spec list registry seeded with hook) · L2 PASS 7125274794 (CONTRACT_REVIEW_TIER) · Skills-docs: none confirmed by L1
checks at 597f70e 63 success, 11 expected skip, 0 failed, 0 pending

State: ready + auto-merge (Tier S). Part of #36860: the card stays open for part (b), which follows from main after this merges.

Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
… chain (objectstack-ai#36916)

<!-- claude-projects-attribution: {"github_login":"os-support-ai"} -->
_Requested by **Yibo Wang** · [project
thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwBP9pYn3ZkhGT2R2hstwEY6w)_
Fixes objectstack-ai#36809

Clause-②: yes (widening)
Metadata-protocol: added
Skills-docs: none — the new member is a response field the console
reads, not something a metadata author writes; no skills/ page teaches
`GET /i18n/locales` or how the console resolves flow labels

> This PR adds a member to a published response
(`GetLocalesResponseSchema`, non-test `packages/spec/src/**`) and so
**owes a contract-tier L2 review** before it lands (seat route
7124316383, L1-b).

## 维护者速读

-
用户能看到什么变化:声明了回退语言的应用里,控制台的流程名称、流程步骤名和流程表单字段文字,在当前语言缺译时改显示回退语言的译文,和服务端一致;没声明回退语言的应用不变。
- 为什么做:控制台此前只认当前语言,同一个流程标签在服务端和控制台显示成两种文字,违背了翻译文档"按应用声明的回退链降级"的承诺。
- 出错会怎样:最坏是某个流程标签显示成回退语言或作者原文,不影响任何数据;回退本次合并即可恢复原样。
- 要你做什么:无。

## What changes

**Carrier: `GET /api/v1/i18n/locales` gains `fallbackChain`** (optional
`string[]`), not discovery `locale`. Why this door:

- It already carries the other half of the resolvers' options,
`sourceLocale` (the `defaultLocale` the server hands the resolvers), so
the console reads the whole `ResolveOptions` declaration from one
answer.
- It has one producer (the runtime's `/i18n` domain). Discovery has two
(`HttpDispatcher` and `metadata-protocol`'s `getDiscovery`), and adding
it to one would let two machine-readable answers about one boot
disagree.
- Its value comes from `II18nService.getFallbackLocale()`, read with the
same feature-detected accessor and the same non-empty condition as
`metaTranslateOptions` (`@objectstack/rest`) uses for every server-side
metadata translation. A service with no accessor (the core in-memory
provider) or an empty answer serves no member: the server threads a
declaration and never invents one.

**Console:**

- `ui/apps/console/src/loadLanguage.ts` reads the locale list next to
the active language's bundle (in parallel). If a chain is declared and
the language is not `sourceLocale` (the resolvers skip the chain for
it), it fetches each fallback locale's bundle and keeps its `flows`
group. It lays them next to the app namespace through
`withDeclaredFlowsFallback` (`@object-ui/i18n`). With no declared chain,
the answer is exactly what it was before. A failure in either extra read
gives that same answer.
- `ui/packages/i18n/src/flowsBundle.ts`: `activeFlowsBundle` now also
returns the fallback locales' rows. The new `flowsResolveOptions`
returns `{ locale, fallbackChain, defaultLocale }`, the options the
server passes. The new `flowsLocaleChain` gives the order the spec's
private `localeChain` walks, for the keys that no spec resolver reads.
The module doc now describes what the code does.
- `flowLabels.ts` (`flowLabelTranslations` takes the declared options;
`useFlowLabelTranslations` passes them), `FlowRunner.tsx` (flow name,
field copy per key, option labels), `flow-label-translations.tsx`
(Studio rail) and `stageChangeStarts.tsx` (stage confirm) pass the
options to `translateFlow` / `resolveFlowApprovalStepLabel` /
`resolveFlowScreenFieldOptions`.
- Docs: `content/docs/ui/translations.mdx` now covers what the console
does. `content/docs/references/api/protocol.mdx` is regenerated with the
new member, and `packages/spec/authorable-surface/api.json` is
regenerated (the `+1` key is the `Metadata-protocol: added`).

## Tests

<details><summary>New pins (files named for this card) and
runs</summary>

-
`packages/runtime/src/domains/i18n-locales-fallback-chain-36809.test.ts`:
the member comes from `getFallbackLocale()` (spy called, value
followed). It is absent with no accessor, an `undefined` answer, an
empty answer, or the core memory provider. The body parses as
`GetLocalesResponseSchema`.
-
`ui/packages/i18n/src/__tests__/flowLabels-fallback-chain-36809.test.ts`:
with a declared fallback, the console answer equals the spec resolvers'
answer with the server's options (flow label, approval step) and covers
the plain node and untitled screen. No chain gives the old answer. An
authored-language request walks no chain. The array survives the real
i18next store. `flowsLocaleChain` visits the same locales as the
resolvers in 5 cases.
- `ui/apps/console/src/loadLanguage.fallbackChain-36809.test.tsx`: the
real loader with URL-routed fetch. A declared chain reads the fallback
text and matches the server. No chain means no extra bundle read. The
authored language means no fallback read. A failed locale read degrades
to the old answer.
-
`ui/packages/app-shell/src/views/__tests__/FlowRunner.fallbackChain-36809.test.tsx`:
the runner's flow name and field label come from the fallback, and the
placeholder comes from the active language.
- Updated: `ui/apps/console/src/loadLanguage.test.tsx` (the session pin
now expects the locale-list read next to the bundle read, both with the
bearer).

Runs (head `b276ff4e`):
- runtime: 4 files / 74 tests passed (new pin, anonymous-deny,
supported-locales, envelope conformance).
- ui: i18n 3 files / 20 tests; console + FlowRunner + stage confirm +
FlowCanvas 5 files / 47 tests; FlowRunner suite 19 files / 129 tests;
new runner + loader pins 2 files / 6 tests. All passed.
- typecheck: `@objectstack/runtime`, `@objectstack/spec`,
`@object-ui/i18n`, `@object-ui/plugin-detail`, `@object-ui/console`,
`@object-ui/app-shell`: exit 0.

</details>

<details><summary>Ablations (one-time, restored, `git diff HEAD` empty
after each)</summary>

- `flowsResolveOptions` forced to `{ locale }` (via
`scripts/ablation-replace.mjs`, anchor 1 to 0, blob `39830597` to
`fe1e4a35`): 4 of 12 tests in the i18n pin went red. Restored, blob
equals HEAD.
- The producer's `fallbackChain` spread deleted from
`packages/runtime/src/domains/i18n.ts` (blob `ca4e8bdd` to `d1a26537`):
2 of 6 tests in the runtime pin went red. Restored, blob equals HEAD.
- Both subjects resolve from `src` (relative imports), so no dist
preflight was needed.

</details>

## Acceptance notes

- One extra round trip when a fallback is declared and the language is
not the authored one: the fallback bundle is fetched after the locale
list answers. App labels for the active language reach the screen
together with it. With no declared chain, only the parallel locale-list
read is added.
- `flowsLocaleChain` mirrors the spec's private `localeChain`. A parity
pin holds it equal to `resolveFlowApprovalStepLabel`'s walk. Exporting
the spec's own helper would remove the copy, but that is a public spec
export outside this claim (carrier: none, noted, not filed).
- The file adapter collapses `fallbackLocale || defaultLocale || 'en'`
at boot, so a file-backed stack with no `fallbackLocale` serves its
`defaultLocale` as the chain. The console now follows that too, as the
server does.

## Verification

<details><summary>Local gates and two-minute check</summary>

- `node scripts/pm/dispatch-gates.mjs --commands` derived 120 families.
All 120 ran locally. 116 exited 0. 3 exited 3 (prerequisite not met, so
NOT MEASURED locally; CI runs them): `check-plugin-teardown-shape
--self-test` (shallow clone cannot reach the pinned fixture), `spec
check:skill-examples` (needs a `client-react` build),
`check:dual-build-cjs-loads` (needs a full build). `pnpm --dir ui exec
vitest run scripts/` had one timeout under shared-box load
(`js-comment-mask-returns-interpolation-9424`); the file passed on its
own (8/8). `--ran` reconciliation: 120 derived, 117 run, 3 NOT-MEASURED,
0 UNRUN.
- `pnpm --filter @objectstack/spec check:generated`: 14/14 up to date
after `--fix` regenerated `check:docs`.
- `overlap-check --branch`: VERDICT clean (merges cleanly with
origin/main and with objectstack-ai#36881 / objectstack-ai#36857, which share files).
- Read first, by risk: `ui/apps/console/src/loadLanguage.ts` (the new
reads), `ui/packages/i18n/src/flowsBundle.ts` (the reserved tree entry
and the chain walk), `packages/runtime/src/domains/i18n.ts` (the
producer hunk).
- Two-minute check: `pnpm --dir ui exec vitest run
packages/i18n/src/__tests__/flowLabels-fallback-chain-36809.test.ts`
should report 12 passed.

</details>

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

https://claude.ai/code/session_01WGufzh1FMUQYf1PcEunaaK

## Fix round 1 (L1 REWORK 7127286361 / contract review FAIL 7127267955
on b276ff4 → ee54ef8)

- **M1: closed.** `ui/apps/console/src/loadLanguage.ts` negotiates the
console language against the same `/i18n/locales` answer's
`locales[].code` (`resolveLocaleAmong(lang, codes) ?? lang`, the
matching `negotiatedTranslationLocale` runs) before the
authored-language check, before the fallback filter and before the
resolvers; the negotiated tag rides `DeclaredFlowsFallback.locale`,
`flowsResolveOptions` passes it as `locale`, and `activeFlowsBundle` /
`flowLabelTranslations` key by it. Pins with alias tags in
`loadLanguage.fallbackChain-36809.test.tsx`: a `zh-Hans` and a `zh`
console on a `zh-CN`-authored stack with fallback `en` read the authored
Chinese (equal to the server's answer for the negotiated request) and
fetch no `en` bundle; a `ja` console on a stack holding `ja-JP`
negotiates to `ja-JP` and still reads the `en` fallback. Ablation (raw
tag instead of the negotiated one): 3 of 7 loader tests red, restored.
- **S1: closed.** Claim amendment 7127305468 names
`ui/apps/console/src/loadLanguage.test.tsx` and
`ui/packages/i18n/src/index.ts`.
- **N2: closed.** The `fallbackChain` describe and jsdoc in
`packages/spec/src/api/protocol.zod.ts` say the member is absent when
the i18n service reports no fallback, and that the request tag is
negotiated against `locales[].code` first;
`content/docs/references/api/protocol.mdx` regenerated,
`content/docs/ui/translations.mdx` explains the negotiation.
- **N1: kept.** Sharing the `/i18n/locales` read with `loadLocales.ts`
needs that file, outside the claimed surface; one extra request per
language load, no correctness effect.

Line budget: 18 files, +957/−77 = 1,034 changed lines (one PR for the
card), under the 3,000-line line.

<!-- signed: repo:objectstack#3 · os-support-ai ·
session_01WGufzh1FMUQYf1PcEunaaK -->

---------

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

<!-- claude-projects-attribution: {"github_login":"os-support-ai"} -->
_Requested by **Yibo Wang** · [project
thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwBDErTg6aA1Xze24mDcUfseY)_
Fixes objectstack-ai#36887

The published wire schema of `GET /meta/types` now declares every member
the route serves on an entry. It follows objectstack-ai#36881, which declared `list`,
and is independent of objectstack-ai#36926 (objectstack-ai#36860 part b), which touches the
listing's translation, not this schema.

Clause-②: yes (widening: the published response schema declares four
members the route already serves)
Metadata-protocol: added
Skills-docs: none — the declared members are Studio display data the
spec registry and plugins produce, not something a metadata author
writes; `skills/objectstack-ui/SKILL.md:34` names `entries[].schema`
only and stays true

## 维护者速读

-
对外发布的类型列表响应格式现在写全了服务器一直在返回的字段(schema、form、actions、schemaId),按这份格式写客户端的人终于能看到它们;服务器返回的内容一点没变。
- 属于工作室元数据列表标准化的收尾(objectstack-ai#36860 的配套卡)。
- 影响按发布的协议类型写客户端或生成代码的开发者,最终用户看不到变化;合并后可直接撤回。
- 无需你决定。

## What changes

- **`GetMetaTypesResponseSchema` (`@objectstack/spec`,
`api/protocol.zod.ts`).** Each entry now declares:
  - `schemaId`: a string, the same value as `type`.
- `schema`: a JSON Schema record. It is optional, because a type with
neither a spec schema nor a hand-crafted one serves none.
- `form`: a `FormView` (`FormViewSchema`, strict). It is optional,
because a type with no declared form serves none.
- `actions`: `Action[]` (`ActionSchema`). It is optional, absent when
the type has none.

The card names `schema` and `form`. The same row also serves `schemaId`
and `actions`, which were undeclared too. The card's Expected line
("declares every member the route serves") and its strict test cover
them, so they are declared here as well (stated in the claim,
7127426588).
- **A parsed shape.** `form` and `actions` carry defaults, so the
response's input and output types now differ. Following ADR-0122,
`GetMetaTypesResponseParsed` is declared next to the bare alias, and its
isomorphism pin leaves `type-alias-convention.pin.test.ts` (888 → 887,
with a receipt line).
- **Generated artifacts.** The `api` shards of `api-surface` and
`export-origins` and the protocol reference page are regenerated.
`dropped-refinements.baseline.json` declares the 12 refinement sites the
response now reaches through `FormViewSchema` and `ActionSchema`, which
the build printed (275 schemas, 1,183 sites). Those refinements are
correct runtime rules that the published JSON Schema cannot express, as
for every other schema that embeds these two.
- Nothing the server sends changes.

## Tests

-
`packages/metadata-protocol/src/protocol.meta-types-response-schema-36887.test.ts`
(new). It takes a real `getMetaTypes()` answer through JSON, as the wire
sends it, and covers every registry type plus `webhook` (the synthesised
arm), with a plugin-registered `datasource` action.
- The answer parses, and no served member is stripped, which is the
strict reading, since `z.object` drops an undeclared key.
- A second case checks that the members the card names are actually on
the wire, so the parse read them.
- Controls: a served key the schema does not declare is reported, and a
malformed `form` is refused (so `form` is typed, not `unknown`).
- 4 passed. On the spec dist from before this change, the strict case
reported 82 stripped members (`agent.schemaId`, `agent.schema`,
`agent.form`, …).
- `packages/spec` `src/api` + the alias pin file: 65 files, 2,123
passed.

## Acceptance notes

- `schema` and `form` are declared with their real shapes: `form` reuses
`FormViewSchema`, and `schema` is a JSON Schema object, for which the
spec has no narrower schema.
- `@objectstack/metadata-protocol` changes only a test and the
engine-double ledger, so the changeset names `@objectstack/spec` alone
(`minor`, as `added` requires).
- Overlap: `node scripts/pm/overlap-check.mjs` reads clean against
`main` and open PRs.

## Verification

Read first, by risk:
1. `packages/spec/src/api/protocol.zod.ts`: the four new members, and
the `optional` on `schema` and `form` (both can be absent at runtime).
2. `packages/spec/dropped-refinements.baseline.json`: the 12 declared
sites and the header counts.

Two-minute check: `pnpm --filter @objectstack/metadata-protocol exec
vitest run src/protocol.meta-types-response-schema-36887.test.ts`.
Expect 4 passed.

<details><summary>Gates on ce27cea</summary>

- `node scripts/pm/dispatch-gates.mjs --ran`: 121 derived, 121 run, 0
NOT-MEASURED, all exit 0. `check:engine-double-contract` first failed on
the new test's engine doubles and passed after `--write` (the ledger
commit). That commit's `scripts/` path derived 7 more families, all run
and green.
- `pnpm --filter @objectstack/spec check:generated --fix` regenerated
the 3 stale artifacts and re-checked them green. The alias pin's type
error was fixed the ADR-0122 way (a `Parsed` alias, with the pin
removed).
- `check-governed-merges --branch HEAD`: NOT governed, 183 changed lines
(+175 / −8).
- `tsc --noEmit` is clean for `@objectstack/metadata-protocol`.
</details>

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

https://claude.ai/code/session_01WGufzg7mFFG5b13DcQ93kf

<!-- signed: repo:objectstack#3 · os-support-ai ·
session_01WGufzg7mFFG5b13DcQ93kf -->

---------

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

<!-- claude-projects-attribution: {"github_login":"os-support-ai"} -->
_Requested by **Yibo Wang** · [project
thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwBDErTg6aA1Xze24mDcUfseY)_
Fixes objectstack-ai#36860

> **Held for the maintainer's own review.** This is part (b) of the
card's two-PR split. The whole card measured about 3,530 changed lines,
over the 3,000-line human-review line, so the maintainer ruled that
every part goes to their own review whatever its size: splitting must
not route around it. This PR stays a draft and out of the merge queue
until the maintainer has read it. Part (a), objectstack-ai#36881, merged on L1 + L2
before that ruling and is handed to the maintainer with this one.

This part closes the card: the other 26 types, their header translations
in all 11 bundles, the console's own declarations moved into the spec,
and the runtime dispatcher translating the types listing, which folds in
objectstack-ai#36886 (the dispatcher answered `/meta/types` in English).

Clause-②: yes (widening: `/meta/types` serves `list` on 26 more entries,
and the runtime dispatcher's listing is now translated)
Metadata-protocol: none

## 维护者速读

- 工作室里 27 类元数据(对象、字段、视图、页面、流程、报表、智能体等)的列表列改由平台规范统一声明,列头按界面语言显示(11
种语言都有译文);经运行时分发器访问的主机,类型列表也不再一律显示英文。
- 属于工作室元数据列表标准化(objectstack-ai#36860 的第二部分,第一部分是 objectstack-ai#36881):控制台、命令行和 AI 客户端读同一份列定义。
- 影响打开这些列表的管理员;列名和顺序有变化(例如页面列表去掉了不存在的 route 列)。出错时页面退回默认列,合并后可直接撤回。
- 需要你亲自审阅后再决定合并:这一卡总量超过 3,000 行,按你的要求分拆后的每一部分都交你审,本 PR 不进合并队列。

## What changes

- **Registry (`@objectstack/spec`).** `METADATA_LIST_REGISTRY` declares
27 types: the first batch (`hook`, `flow`, `job`, `api`, `action`,
`report`, `dataset`, `email_template`, `assignment_rule`,
`sharing_rule`, `queue`, `agent`, `tool`, `skill`, `doc`, `seed`,
`mapping`, `picklist`, `translation`) and the eight the console declared
itself (`object`, `field`, `view`, `page`, `dashboard`, `permission`,
`position`, `book`). Every column is a key the type's schema declares,
checked by the reconciliation test, whose roster now asserts all 27.
Keys the card proposed that no schema declares were dropped or
corrected, as reported in the card's thread.
- **Headers in every language (`@objectstack/platform-objects`).** The
52 headers no form field already labels get their own
`metadataForms.<type>.fields.<path>.label` leaf, regenerated with `node
scripts/check-i18n-bundles.mjs --write` and translated in all ten
non-English locales. No zh-CN, ja-JP or es-ES leaf echoes the English. A
column the form labels reads the form's words.
- **Both doors translate the listing (`@objectstack/rest`,
`@objectstack/runtime`), objectstack-ai#36886.** `translateMetaTypesListing`
(`meta-item-read-gate.ts`) is the one translation of the types listing:
type labels and descriptions, form labels, list headers and schema
titles. `RestServer`'s `GET /meta` now delegates to it, and the runtime
dispatcher's `GET /meta` and `GET /meta/types` call it with the
request's locale and answer through `successWithHeaders` with `Vary:
Accept-Language`, as `RestServer` and the rest of the meta domain do.
Before, the dispatcher served `getMetaTypes()` untranslated, so a zh-CN
reader of a dispatcher-served host got English for all of it.
- **Console (`@object-ui/app-shell`).** `builtinComponents.tsx` and
`anchors.ts` drop their `listColumns` and keep only what the schema
cannot say: a field row's server-stamped `object` (`listExtraColumns`),
a position's holder count and granted permission sets, a view's derived
display type and a book's audience (`listCells`), and a sharing rule's
`sharedWith` rendering plus its `_packageId`. `object` was registered
twice with disagreeing columns (the later won); both declarations are
gone, so the spec's is the only one. A page's former `route` column
named no `PageSchema` key and is dropped.
- **Changelog for what admins see (`@object-ui/app-shell`).** The
changeset names the private console package, which
`.changeset/config.json` versions (`privatePackages.version: true`), and
says what changes on screen: no fixed column widths on the moved lists
(except the view list's display type and the book list's audience), the
Fields list reads name, type, label, then object, the sharing-rule
header reads "Access Level", and the Pages list shows type and
description in place of the dropped route column.
- **Summary cells read an expression's source
(`@object-ui/app-shell`).** The `summary` renderer joined only an
object's scalar members, so a cron schedule, whose `expression` is
served as the `{ dialect, source }` envelope, read `cron · UTC`. An
expression envelope member now contributes its `source`, so a cron job
reads `cron · <expression> · UTC` (the showcase job: `cron · 0 1 * * * ·
UTC`). Any other object member stays out, as before.
- **Echo ledgers (`@objectstack/platform-objects` tests).** The
bare-type ledger reads a type as bare when its catalog entry has no form
`sections`, since a type with no form now carries `fields` for its
column headers; the metadata-form catalog count grows by the 52 header
rows (771 → 823).
- **Docs.** `content/docs/protocol/kernel/i18n-standard.mdx` adds the
list columns row (`resolveMetadataListLabels`), the slot paragraph, and
says all three resolvers run in `GET /meta` on both doors.

## Tests

- `packages/spec/src/system/metadata-list-zod-reconciliation.test.ts`:
the roster assertion grows from `['hook']` to the 27 types (111 passed).
- `packages/lint/src/i18n-walk.metadata-list-columns.test.ts` (new, the
L2 N2 pin on objectstack-ai#36881): a column on a type with no form gets its own slot
entry seeded with the header (`job.schedule` → `Schedule`), a dotted
path the form leaves out gets one (`agent` `model.model` → `Model`), a
column the form labels keeps exactly one entry, the form's
(`hook.events`), and every registry column has exactly one entry (4
passed).
-
`packages/runtime/src/domains/meta-types-translation-parity-36886.test.ts`
(new): both dispatcher doors answer zh-CN with the same label, form
label and headers as `RestServer` (`{ label: '钩子', form: '事件', headers:
['名称', '事件'] }`), and both carry `Vary: Accept-Language`, as
`RestServer` does. Controls: an en request, and a host with no i18n
service, answer as declared. Ablations: putting back
`deps.success(result)` reds the zh-CN case (1 failed, 2 passed);
answering the translated body without the header reds the Vary case (1
failed, 3 passed).
- `ui/.../ResourceListPage.servedListColumns-36860.test.tsx`: mounts
each moved list under setup (`?scope=environment`) and checks the served
headers, plus the view list keeping its derived display type through its
console cell override.

## Screenshots (card acceptance, zh-CN)

Taken on a booted `examples/app-showcase`: hooks and flows built from
`9ce7a6d0` (the commits after it until `f2edd9de` change only the
changeset and tests), the Jobs list re-taken on `f2edd9de`, console at
`/apps/setup/metadata/<type>?scope=environment`, browser locale zh-CN.
Stored in the project's shared files under
`objectstack-seat3-ux/36860-shots/`:

- `hook-list-zh.png`: 钩子 (8). Headers 名称 · 显示名称 · 对象 · 事件 · 优先级 · 异步 ·
描述 · 来源. Events read as a list (`beforeInsert, beforeUpdate`), async as
✓ / ×.
- `flow-list-zh.png`: 流程 (33). Headers 名称 · 显示名称 · 类型 · 描述 · 来源. Type
reads as a badge (`autolaunched`, `record_change`, `schedule`,
`screen`).
- `job-list-zh.png`: 后台任务 (1). Headers 名称 · 显示名称 · 调度计划 · 已启用 · 描述 · 来源.
The schedule reads `cron · 0 1 * * * · UTC` (it read `cron · UTC` before
`f2edd9de`, L1 S4), enabled ✓.

Every `GET /api/v1/meta` the console made answered 200 with `Vary:
Accept-Language`. Item labels and descriptions stay in English: they are
the example app's own text, which has no zh translation.

## Acceptance notes

- L2 nits on objectstack-ai#36881 carried here: N1 (headers marked localized while the
dispatcher served them untranslated) is closed by the objectstack-ai#36886 fold; N2
pin added (above); N3 (`listInclude` prose true only after the position
move) is now true; the reconciliation roster grows.
`@object-ui/app-shell` was first left out of the changeset on that
review's advice, and is back in on this PR's L1 (S3), because
`.changeset/config.json` versions private packages. N7 (the
reconciliation test copies `humanizeFieldPath`) is unchanged.
- objectstack-ai#36887 (`GetMetaTypesResponseSchema` declares neither `schema` nor
`form`) is not in this PR; it follows as its own small PR.
- objectstack-ai#36886 is folded in without a closing keyword; it is closed by hand
when this lands.
- `report`'s `dataset` header reads `Data Source`, the report form's
label on current `main`.
- Overlap: `node scripts/pm/overlap-check.mjs` against `main` and the
two open PRs sharing files: objectstack-ai#36869 (`rest-server.ts`) merges cleanly;
objectstack-ai#36802 conflicts in `object-lifecycle-panel-echo-decisions.test.ts`,
where both PRs move the catalog count and add a receipt line. Whichever
lands second resolves it to the sum of both receipts.

## Verification

Read first, by risk:
1. `packages/runtime/src/domains/meta.ts`: the two `getMetaTypes` sites
now translated, and the locale they read.
2. `packages/rest/src/meta-item-read-gate.ts` with `rest-server.ts`:
`translateMetaTypesListing` must answer exactly what
`translateMetaTypesResponse` answered before.
3. `ui/packages/app-shell/src/services/builtinComponents.tsx` and
`anchors.ts`: what the console keeps after the move.
4. Spot-read a bundle, e.g. `zh-CN.metadata-forms.generated.ts`, for the
52 new leaves.

Two-minute check: `pnpm --filter @objectstack/runtime exec vitest run
src/domains/meta-types-translation-parity-36886.test.ts`. Expect 4
passed.

<details><summary>Gates on 2fe89a7 (first round; the rework commits
9ce7a6d, 137ae10, 06064a1 and f2edd9d re-ran the gates they touch,
listed last)</summary>

- `node scripts/pm/dispatch-gates.mjs --ran`: 125 derived, 125 run, 0
NOT-MEASURED, all exit 0. Fixed in this PR along the way:
`check:test-source-alias` (module-top imports in the new tests),
`check:spec-parsed-alias` (`MetadataListCellTypeParsed`) and
`check:engine-double-contract` (ledger rewritten with `--write`). Three
gates first exited 3 on prerequisites and were re-run green after
fetching the plugin-teardown fixture commit and building the packages
that had no dist.
- `check-governed-merges --branch HEAD`: not governed, 2,834 changed
lines (+2,591 / −243), 2,220 of them the 11 generated bundles.
- `tsc --noEmit` is clean for `@objectstack/rest` and
`@objectstack/runtime`. `@object-ui/app-shell` type-check was not
measured locally (the ui workspace deps have no dist); CI's type-check
lane is the verdict.
- Tests: runtime `domains/meta` 2,756 passed; rest meta 2,263; app-shell
`metadata-admin` 222; spec reconciliation 111; lint pin 4; rest list
headers + schema titles 6.
- Rework round 2: `servedListColumns.test.tsx` +
`ResourceListPage.servedListColumns-36860.test.tsx` 17 passed, with a
new case for a served cron envelope and a control for an object member
with no `source`; ablation (back to scalar members only) reds it (1
failed, 10 passed). ESLint clean on both files.
- Rework round: runtime parity test 4 passed; platform-objects
`bare-type-display-echo-decisions` +
`object-lifecycle-panel-echo-decisions` 73 passed (the two files CI's
Test Core (6/10) failed on 99dc6d0); `check-changeset-fixed`,
`check-empty-changeset` and `check-changeset-no-major` (with this body)
exit 0.
</details>

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

https://claude.ai/code/session_01WGufzg7mFFG5b13DcQ93kf

<!-- signed: repo:objectstack#3 · os-support-ai ·
session_01WGufzg7mFFG5b13DcQ93kf -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation protocol:system protocol:ui size/xl tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants