Skip to content

feat(spec): Studio metadata-form select choices are translatable (metadataForms options slot) - #37569

Merged
os-zhuang merged 5 commits into
mainfrom
claude/project-thread-gvxx96
Nov 26, 2026
Merged

os-zhuang merged 5 commits into
mainfrom
claude/project-thread-gvxx96

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Requested by Sales · project thread

Fixes #36950

Clause-②: yes (widening)
Metadata-protocol: added
Skills-docs: none — skills/objectstack-i18n/SKILL.md names the metadataForms group only, never its leaf keys; the group is platform-owned, so no app author writes the new key

维护者速读

  • 用户能看到什么变化:非英文的搭建者在 Studio 里打开对象、字段、报表、仪表盘、钩子、动作、页面、智能体、技能的配置表单时,下拉框里的选项名(例如共享模型「私有 — 仅所有者」、字段类型、删除行为、默认时间段)改为显示当前语言;以前这些选项在所有语言下都是英文,周围的字段名却已经翻译。
  • 为什么做:翻译包里没有放选项名的位置,服务端也不翻译它们。
  • 出错会怎样:只多翻译一层显示文字,选项的值不变,保存下来的数据不变;某个选项没有译文时仍显示原来的英文。
  • 要你做什么:这个 PR 改动约 3,790 行(主要是 10 种语言的译文),超过 3,000 行,按规则需要授权审批人批准后由座位落地。

What changes

The reading the card asked for (at 021524cd, METADATA_FORM_REGISTRY walked with the extractor's path rule): of the 18 registered Studio forms, 9 carry a select row with options — object, field, hook, report, dashboard, action, page, agent, skill — 38 rows, 187 options (185 distinct type.path.value keys: object's fields.deleteBehavior is listed twice, with the same names). Every one is seen by a builder: the console's SchemaForm renders fieldSpec.options ahead of the schema enum (ui/packages/app-shell/src/views/metadata-admin/SchemaForm.tsx, the enum/select branch), and the server translated only label, helpText and placeholder of a form field.

  • Spec, translation slot (packages/spec/src/system/translation.zod.ts). A metadataForms.<type>.fields.<path> entry accepts options: a record from option value to its translated name, the shape objects.<object>.fields.<field>.options already has. choices and values are refused there, as on the object-field face, and the refusal names options as the key to write (the aliases row of the strict object is the rename hint of that unknown-key refusal, not an accepted spelling).
  • Spec, resolver (packages/spec/src/system/i18n-resolver.ts). translateFormField overlays each options[] entry's label with the translation keyed by its value, along the locale chain; an option with no translation, or with a non-string value, is passed through unchanged. This is the walker resolveMetadataFormLabels uses, which /api/v1/meta/types localizes served forms with.
  • Lint, extractor (packages/lint/src/i18n-walk.ts). walkFormField emits metadataForms.<type>.fields.<path>.options.<value> for every option of a row, seeded with its English label, so os i18n extract and pnpm check:i18n offer exactly the keys the resolver reads.
  • Platform-objects, shipped locales. node scripts/check-i18n-bundles.mjs --write added the 185 keys to all eleven *.metadata-forms.generated.ts packs; the ten translated packs then got hand-written names (ar, de, es-ES, fr, ja-JP, ko, pt-BR, ru, zh-CN, zh-Hant) and a second --write dropped every source-hash row they had seeded. The 17 Default Period choices take the wording of the console's own period chip (ui/packages/i18n/src/locales/*, dashboard.filters.range.* and dashboard.filters.custom), so the period an author picks reads as the period a viewer sees. Loanwords that read the same as English (URL, HTML, JSON, Markdown, and per locale words such as de Text, fr Date) are spelled so they are not byte-echoes of the source, which the catalog's zero-echo pins require (object-lifecycle-panel-echo-decisions.test.ts, report-form-echo-decisions.test.ts): for example zh-CN 网址(URL), de Textfeld, fr Date (sans heure).
  • content/docs/references/system/translation.mdx regenerated (gen:docs).

Small calls made here (no card): the rename hints for choices / values mirror the object-field face; a non-string option value is passed through untouched rather than stringified, since every option a registered form lists has a string value (the reading found none other).

Why

A non-English builder saw a translated field label with English choices under it on every server-rendered Studio form. The bundle had no slot for the names, so no locale could fix it.

Verification

  • packages/spec/src/system/i18n-resolver.test.ts, new top-level describe "select option names": a choice is renamed by its value and keeps its other keys; a value with no translation keeps its English label; a nested repeater row is reached by its dot path; the input form is not mutated.
  • packages/platform-objects/src/metadata-translations/form-option-labels.test.ts (new): through the SERVED bundle and the real registry, the object form's sharing model reads 私有 — 仅所有者 in zh-CN; the reading floor (≥30 option rows over ≥8 forms) holds; for each of the ten translated locales every choice of every form select has a non-empty name that differs from its English label.
  • Local runs on this branch: packages/spec full suite green (vitest, 618 s); packages/lint 236 files / 9,680 tests green; packages/platform-objects translations + metadata-translations 29 files green; packages/cli test/i18n-extract.test.ts green; node scripts/check-i18n-bundles.mjs exit 0; pnpm check:i18n-coverage could not measure here (exit 3: the example apps are not built in this worktree), so CI carries that one; pnpm --filter @objectstack/spec check:generated exit 0 after gen:docs.
  • node scripts/pm/overlap-check.mjs exit 0 against origin/main and the open PRs sharing these files (feat(spec)!: form is a metadata type of its own, and the form doors read a form over both types #37422, refactor(spec)!: rename the Studio helper defineForm to defineMetadataForm and its modules to *.metadata-form.ts #37366).

Contract review (L2) is owed before landing: the diff changes packages/spec/src/** and declares Clause-②: yes (widening). Changed lines exceed 3,000, so landing needs an authorized approval.

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic.
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; pnpm lint passes.
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec touched: its generated artifacts are regenerated and committed.
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English.
  • The Before Submitting list in CONTRIBUTING.md is done.

🤖 Generated with Claude Code

https://claude.ai/code/session_01L6bhgUpnvPnJ1hR74pUrVj


Generated by Claude Code

@github-actions github-actions Bot added size/xl documentation Improvements or additions to documentation protocol:system tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 26, 2026
@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 3 package(s): @objectstack/lint, @objectstack/platform-objects, @objectstack/spec, touching 18 documentable anchor(s).

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

  • content/docs/api/error-catalog.mdx (via helpText (literal, a string literal in appTranslationDataShape))
  • content/docs/automation/flows.mdx (via helpText (literal, a string literal in appTranslationDataShape))
  • content/docs/protocol/kernel/i18n-standard.mdx (via helpText (literal, a string literal in appTranslationDataShape), metadataForms (literal, a string literal in walkFormField))
  • content/docs/protocol/objectui/actions.mdx (via helpText (literal, a string literal in appTranslationDataShape))
  • content/docs/protocol/objectui/layout-dsl.mdx (via helpText (literal, a string literal in appTranslationDataShape))
  • content/docs/ui/translations.mdx (via helpText (literal, a string literal in appTranslationDataShape), metadataForms (literal, a string literal in walkFormField))
  • content/docs/ui/views.mdx (via helpText (literal, a string literal in appTranslationDataShape))

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

  • content/docs/releases/v17/17-5.mdx (via helpText (literal, a string literal in appTranslationDataShape))
  • content/docs/releases/v18/18-2.mdx (via helpText (literal, a string literal in appTranslationDataShape))
  • content/docs/releases/v18/18-3.mdx (via helpText (literal, a string literal in appTranslationDataShape), metadataForms (literal, a string literal in walkFormField))
  • content/docs/releases/v18/18-4.mdx (via helpText (literal, a string literal in appTranslationDataShape))

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

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

Which tree this was computed on

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

node scripts/docs-audit/affected-docs.mjs --json 0f6a1e518f3c4639b03f86a8c07d9d08d91bddb6

⚠️ 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 0f6a1e518f3c4639b03f86a8c07d9d08d91bddb6 → 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#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

Re-run once · 2026-11-26T14:10Z · head 8f1f70f · run 45830682855

One red on this head: Test Core (5/10), job 139947827254. The failing case is packages/cli/test/start-deployment-durability.integration.test.ts:291 ("only the database missing: names only OS_DATABASE_URL"), which hit Test timed out in 5000ms.

The seat judges this a flake, for three reasons:

  • The case spawns a child process synchronously, and the whole file took 67 s on the runner against the 5 s default case timeout.
  • This PR touches no packages/cli file and nothing the start or deployment check reads; its scope is metadataForms translation slots, the resolver and the lint extractor.
  • The area thread re-ran the file locally on this head and got 11/11.

So the failed jobs are re-run once through the relay. If the case fails a second time, that is a real red and the area thread chases the cause.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 8f1f70ffa5c34c3c708669cbf2ccf73ddbfdf324
Local-runs: none
Scope: packages/spec/src/system/i18n-resolver.ts, packages/spec/src/system/translation.zod.ts + packages/lint/src/i18n-walk.ts

Read: card #36950 (body and both comments), this PR's body, file list and net diff against main, and the check-runs on the head. The eleven *.metadata-forms.generated.ts packs are generated output and were not reviewed; they were read only to check that the schema, the resolver and the extractor agree with what they hold. Placeholders below are written TYPE, PATH, VALUE.

① Derived judgments

  • Accept set, widened: right. A metadataForms.TYPE.fields.PATH entry now accepts options, a record from string to string (translation.zod.ts:2551), on all three faces built from appTranslationDataShape (TranslationData, TranslationItem, PlatformTranslationData). Before this head the strict entry refused the key. It is the leaf shape the five sibling option maps already use (object field, action param, picklist, dashboard global filter, flow screen field). Nothing is narrowed.
  • Refusal text, changed: right. choices and values on that entry are refused before and after. The two new aliases rows only name the rename in the unknown-key message, and both alias-integrity halves hold: neither spelling is in the shape, and options is.
  • Served surface: right. resolveMetadataFormLabels now overlays options[].label for the request locale on every field row that has a path, nested rows by dot path. An option's value, its position and its other keys pass through; a missing or empty translation keeps the authored label. Its server caller is packages/rest/src/meta-item-read-gate.ts:3691. No export is added or removed and no signature moves.
  • Extractor surface: right. collectExpectedEntries gains 185 registry-driven entries with a six-segment path and source metadataFormField. The list-column pass filters on path[4] === 'label' (i18n-walk.ts:2769) and is unaffected, and dedupeByPath collapses the two deleteBehavior variants of one path. No application's coverage number moves by default: the CLI counts the metadataForms baseline only for a stack that ships the group or passes --include-platform.
  • Packs agree. Each of the eleven packs holds 37 options blocks and 185 leaves under nine forms, nested at fields[PATH].options[VALUE], which is the address the schema declares, the resolver reads and the extractor emits. That matches the PR's reading: 38 rows, 37 distinct paths, 185 distinct keys.

② Semver level

  • Clause-②: yes (widening) is right, and Metadata-protocol: added is right: one new key an author can write, nothing removed or tightened. Both lines are in the PR body and in the changeset body.
  • @objectstack/spec at minor satisfies the kind. @objectstack/lint and @objectstack/platform-objects at patch are non-protocol moves. Check Changeset is green on the head.
  • The changeset's bullets on served forms, extraction and shipped locales match the tree. Its sentence on the two alias spellings does not: that is finding S1 under ④.

③ Boundary flags

  • Dev flag, the choices / values pair mirrors the object-field face: answered. Right as rename pointers, which is all the object-field face has too. The changeset words them differently; see S1.
  • Dev flag, a non-string option value is passed through and not stringified: answered, right on this face. FormSelectOptionSchema reuses SelectOptionSchema.value, a SystemIdentifierSchema string, so a parsed form has no other value type. The resolver and the extractor carry the same guard. The sibling faces that stringify declare string | number | boolean, which this face does not.
  • Dev flag, check:i18n-coverage could not be measured locally: answered by CI. Lint & Repo Gates is green on the head.
  • Skills-docs: none: holds for skills/**. On main the only mention is skills/objectstack-i18n/SKILL.md:180, the group name in a list with no leaf under it. The group is the platform's by the CLI's own ownership rule (stackAuthorsMetadataForms in packages/cli/src/utils/i18n-coverage.ts): a stack that ships none of it is not asked for it. The docs half is N2.
  • open_questions: none on the card or the PR.
  • SQL push-down: nothing to judge. The change overlays an in-memory form; it adds no query, no id materialisation and no join.
  • Check-runs, newest run per name, read 2026-11-26T14:54Z: every one is success or skipped, none failed. Test Core (5/10) failed once and its re-run succeeded; the aggregate Test Core is green. Lint UI reads skipped on both attempts of the run.
  • Landing class: 3,873 changed lines, over 3,000, so the PR lands on an authorized APPROVED review. None is on the PR at read time. This record does not lift that.
  • Author: objectstack-fleet[bot], so no off-relay author note.

④ Design judgment

No must-fix. One should-fix, owing a delta review.

S1 (should-fix) — the changeset says choices and values are accepted; the schema refuses both.
.changeset/36950-metadata-form-option-labels.md:12 reads "choices and values are accepted as its aliases, as on the object-field face." On the tree an aliases row of a strictObject is the rename pointer of the unknown-key refusal and never an accepted spelling (packages/spec/src/shared/strict-object.ts, the aliases option; packages/spec/src/shared/suggestions.zod.ts:339-372). A bundle that writes choices on this entry fails the parse with "Did you mean choices → options?", as it does on the object-field face; translation.test.ts:1490 pins the same refusal on a sibling face. The schema is right and the sentence is not. It ships as CHANGELOG text that an upgrading author greps, and it reads as the lenient alias Prime Directive 12 forbids. The fix is on the prose face: say the two spellings are refused with a pointer to options. The PR body's "Spec, translation slot" bullet carries the same wording.

packages/spec/src/system/translation.zod.ts: holds. Judged against the card (a slot for option names in the same bundle as the field labels around them) and against its first consumer, translateFormField.

  • The key is the option value, which on a form field is always a system-identifier string, so a record key spells every value and a dot can never split one.
  • A field whose own path is options (the field form's repeater, the object form's fields.options) does not collide with the new key: the path is a key of the fields record, and the option map sits one level below it.
  • The jsdoc's claims hold against the resolver: it overlays the label of the entry whose value matches, it is keyed by value, and a value the row does not offer is never shown, because the resolver maps over the row's own options and never reads the map's other keys. N3 covers one phrase.

packages/spec/src/system/i18n-resolver.ts: holds. What I tried to break:

  • Two rows on one path with different option sets (deleteBehavior, packages/spec/src/data/object.form.ts:371-382): the shared values carry identical English names and one key each, and both rows translate.
  • Nested rows: the console's repeater and composite take fieldSpec.fields when the form declares them (ui/packages/app-shell/src/views/metadata-admin/SchemaForm.tsx:2301-2304), and its select draws opt.label and keys on opt.value (SchemaForm.tsx:2458-2475). So the overlay reaches a nested select and changes the words, never the stored value.
  • An empty skeleton leaf falls through the locale chain. A non-string leaf, or a prototype key such as constructor, fails the string test and the authored label stays.
  • The input is not mutated, an option's other keys (color, visibleWhen) are kept, a synthesized child has no options and is untouched, and a type with no bundle entry still returns the form by identity.
  • The console's own caller (ui/packages/app-shell/src/views/metadata-admin/metadata-form-i18n.ts:171) hands a bundle with no options, so its output is unchanged by this head.

packages/lint/src/i18n-walk.ts (implementing): agrees with the contract. Same path rule as the resolver (field.field, dot-joined, gated on a non-empty path), same guard (an object entry with a string value), key segments ending PATH, options, VALUE, and the seed is the authored English label. FormSelectOptionSchema.label is a required string, so pushEntry always emits. check:i18n, inside the green Lint & Repo Gates, is the gate that holds the committed packs equal to this walk.

Nits:

  • N1 (nit, comment in a reviewed file): i18n-resolver.ts:6078 still names the FormView route as FormFieldSpec.label / helpText / placeholder, and :6088 says only those stay on it. options[].label rides the same route now. Accepted deviation: a fix moves a reviewed file, so it goes with the next touch.
  • N2 (nit, prose face): content/docs/protocol/kernel/i18n-standard.mdx:575 and :586-587 list label, helpText and placeholder as what resolveMetadataFormLabels overlays, and name no option names. This hand-written page is the one that teaches the group's leaves, and the Skills-docs: none reason speaks to skills/** only. Fix it there or in a follow-up card.
  • N3 (nit, jsdoc in a reviewed file): translation.zod.ts:2496, "so a choice is named the same wherever the row is rendered", is true of the served form. The console's curated panels do not read this slot (note 1 below). Accepted deviation.

Out-of-diff notes (read, not reviewed):

  1. The console's curated inspectors for report, dashboard, page and view render the bundled spec form through localizeMetadataForm over ui/packages/app-shell/src/views/metadata-admin/metadata-form-zh-cn.ts, which carries no options. The served form reaches the console through ResourceEditPage and StudioBundleItemEditor. So for three of the nine forms in the PR's reading the new slot does not reach the curated panel. default-period-labels.ts renames Default Period there for zh only, and its header still says the overlay "has no slot for option names". Whether the page and report selects in those panels read English in zh-CN was not run, since this review is read-only. It is a reading for the seat, and a card if it reproduces.
  2. form-option-labels.test.ts is in the remainder, the lane seat's ACCEPT. It refuses any option name byte-equal to its English label in all ten locales, with no decision ledger of the kind report-form-echo-decisions.test.ts keeps. The packs reword loanwords to pass it, for example de Textfeld and fr Date (sans heure).

Implemented-by: claude/project-thread-gvxx96
Reviewed-by: session_01L6bhgV6i8jfWwSXjpWJrjA

VERDICT: PASS

…; the resolver table names option labels

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

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: fa2b9fc7dfa26ab486be4a9a604b5d6922da414a
Local-runs: none
Scope: packages/spec/src/system/i18n-resolver.ts, packages/spec/src/system/translation.zod.ts + packages/lint/src/i18n-walk.ts

Delta round on the record in comment 7195508409 (head 8f1f70ffa5, PASS with S1 open). Read: card #36950 (body and both comments), this PR's body, file list and net diff against main, the earlier record, the delta 8f1f70ffa5..fa2b9fc7df in full, and the check-runs on this head. Placeholders below are written TYPE, PATH, VALUE.

The delta is one commit over two prose files, 4 lines in and 4 out: .changeset/36950-metadata-form-option-labels.md (one sentence) and content/docs/protocol/kernel/i18n-standard.mdx (one table cell, one sentence). No file under packages/ moved, so the two hits files, the extractor, the tests and the eleven packs are byte-identical to the head the earlier record judged. main has not touched any of the three scoped files, the strict-object helper or that docs page since this branch's merge-base.

① Derived judgments

  • Accept set, widened: right, unchanged by the delta. A metadataForms.TYPE.fields.PATH entry accepts options, a record from string to string (translation.zod.ts:2551), on the three faces built from appTranslationDataShape. Nothing is narrowed.
  • Refusal text: right, unchanged by the delta. choices and values on that entry are refused before and after this PR. The two aliases rows at translation.zod.ts:2546 only put the rename into the unknown-key message.
  • Served surface: right, unchanged by the delta. resolveMetadataFormLabels overlays options[].label by option value for the request locale (i18n-resolver.ts:6258-6264). Its server caller is still packages/rest/src/meta-item-read-gate.ts:3691. No export or signature moves.
  • Extractor surface: right, unchanged by the delta. walkFormField emits one entry per option at PATH, options, VALUE (i18n-walk.ts:2795-2800), under the same path rule and the same guard as the resolver.
  • The delta implies no accept-set or public-surface change. It edits CHANGELOG source text and one hand-written docs page. Neither is read by a parser, a gate or a served route.

② Semver level

  • Clause-②: yes (widening) and Metadata-protocol: added are right, and both lines are in the PR body and in the changeset body. The changeset frontmatter is unchanged: @objectstack/spec minor, @objectstack/lint and @objectstack/platform-objects patch.
  • The changeset's four bullets now all match the tree. The one that did not is the sentence the delta rewrote; see S1 under ④.
  • Check Changeset is green on this head.

③ Boundary flags

  • Dev flag, the choices / values pair mirrors the object-field face: answered, right. FieldTranslationSchema carries the same two rows (translation.zod.ts:227), and both are rename pointers. The changeset and the PR body now say so in the same words as the schema behaves.
  • Dev flag, a non-string option value is passed through and not stringified: answered, right on this face, as in the earlier record. FormSelectOptionSchema (packages/spec/src/ui/view.zod.ts:4030) takes its value from SelectOptionSchema, a string. The delta does not touch it.
  • Dev flag, check:i18n-coverage could not be measured locally: answered by CI. Lint & Repo Gates is green on this head.
  • Skills-docs: none: holds for skills/**. The only mention on this head is skills/objectstack-i18n/SKILL.md:180, the group name with no leaf under it. The docs half the earlier record raised as N2 is fixed in this delta.
  • open_questions: none on the card or the PR.
  • SQL push-down: nothing to judge. The delta is prose, and the PR adds no query, no id materialisation and no join.
  • Check-runs, newest run per name, read 2026-11-26T15:37Z: every one is success or skipped, none failed. All ten Test Core shards, the aggregate Test Core, Build Docs, Check Documentation Links, Lint · docs & code guards, Spec property liveness and Governed Surface Queue Guard are green. PR-body guards has one cancelled run superseded by a later success. Lint UI reads skipped.
  • Landing class: 3,879 changed lines, over 3,000, so the PR lands on an authorized APPROVED review. None is on the PR at read time. This record does not lift that.
  • Author: objectstack-fleet[bot], so no off-relay author note.

④ Design judgment

No must-fix, no should-fix.

S1: closed.

What closes it, read on the tree. .changeset/36950-metadata-form-option-labels.md:12 now reads that choices and values "are refused there, as on the object-field face, and the refusal names options as the key to write". Each of the three claims holds:

  • Refused: neither spelling is a key of the strict entry's shape, and an aliases row is read only on the unknown-key path (packages/spec/src/shared/strict-object.ts, the aliases option; packages/spec/src/shared/suggestions.zod.ts:339-372).
  • As on the object-field face: FieldTranslationSchema at translation.zod.ts:227 lists values and choices with the same target.
  • The refusal names options: the message is built as a rename from the written key to options, the wording translation.test.ts:1490-1496 pins on a sibling face.

The PR body's "Spec, translation slot" bullet carries the corrected wording too, and adds that an alias row is a rename hint and not an accepted spelling. No other file in the diff calls the two spellings accepted: a search of the net diff outside the generated packs finds the word only on the aliases row itself.

The delta, read in full.

  • Changeset sentence: right, as above. It is the only line of the file that moved.
  • i18n-standard.mdx:575, the resolver table's first row: now names each options[].label by its value beside label, helpText and placeholder, under resolveMetadataFormLabels. That is what the resolver does (i18n-resolver.ts:6258-6264), and it sits in the column headed "What the panel reads", which is right: the console's select draws the option's label and keys on its value (ui/packages/app-shell/src/views/metadata-admin/SchemaForm.tsx:2447-2475).
  • i18n-standard.mdx:586-587: "Only label crosses over to the schema (as title); helpText, placeholder and the option names stay on the form." I tried to break this against resolveMetadataFormSchemaTitles (i18n-resolver.ts:6511-6526): it walks every fields path of the bundle, reads the label attribute alone, and skips an entry that has none. An entry that carries only options therefore writes nothing to the schema, and no option name reaches a schema node. The sentence holds.
  • The delta adds no new claim that the tree does not back, and it makes no finding on an unchanged hunk reachable.

packages/spec/src/system/translation.zod.ts: holds. Unchanged since the earlier record. The schema is the thing S1 measured the prose against, and it was right then.

packages/spec/src/system/i18n-resolver.ts: holds. Unchanged since the earlier record.

packages/lint/src/i18n-walk.ts (implementing): agrees with the contract. Unchanged since the earlier record.

Nits:

  • N2: closed. Fixed on the prose face, in the two places the earlier record named.
  • N1 (nit, comment in a reviewed file): still open as an accepted deviation. i18n-resolver.ts:6078 and :6088 name the FormView route as label, helpText and placeholder only, and the resolveMetadataFormSchemaTitles jsdoc at :6494-6495 says the same. The docs page now says more than these comments do. A fix moves a reviewed file, so it goes with the next touch.
  • N3 (nit, jsdoc in a reviewed file): still open as an accepted deviation. translation.zod.ts:2496, "so a choice is named the same wherever the row is rendered", is true of the served form only.

Out-of-diff notes (read, not reviewed), both carried from the earlier record and unchanged by the delta:

  1. The console's curated inspectors for report, dashboard, page and view localize the bundled spec form from a console-side table that carries no options, so the new slot may not reach those panels. It was not run, since this review is read-only. It is a reading for the seat, and a card if it reproduces.
  2. form-option-labels.test.ts is in the remainder, the lane seat's ACCEPT. It refuses any option name byte-equal to its English label in all ten locales and keeps no decision ledger for loanwords.

Implemented-by: claude/project-thread-gvxx96
Reviewed-by: session_01L6bhgV6i8jfWwSXjpWJrjA

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

席位核对 — ACCEPT · head fa2b9fc · card #36950 · area s2-ux-T · 2026-11-26T15:38Z

L1 checklist

  • Shape and relation: l1-face.mjs --pr 37569 flagged one item, all-checks. The one non-success is a cancelled PR-body guards run at 14:58:39Z, superseded by the same-name run that succeeded at 14:59:01Z. At fa2b9fc every newest run per name is success or an expected skip, with 0 pending, and mergeable_state is clean.
  • Fixes #36950 is right. The card asks that the select choices of the Studio metadata forms read in the builder's language. The spec gains the options slot on a metadataForms field entry, the resolver overlays each option's label by its value, the extractor emits the matching keys, and the eleven shipped packs carry them (ten translated by hand).
  • Scope: 19 files, all on the card's surface: translation.zod.ts, i18n-resolver.ts, i18n-walk.ts, the eleven generated metadata-form packs, the regenerated reference page, the i18n-standard.mdx table row, tests and one changeset.
  • Size: +3,463 / −416, over the 3,000-line threshold (check-governed-merges.mjs: 0 of 19 paths on the governed register; the size alone makes it a human merge). Most of it is the ten locales' option names.
  • Evidence: the thread's reading walked METADATA_FORM_REGISTRY and found 9 of the 18 forms with select rows, 38 rows and 185 distinct option keys. Every key is extracted, every pack carries it, and the zero-echo pins hold. Test Core 10/10, Lint & Repo Gates (incl. check:i18n-coverage) and Check Changeset are green on this head.
  • L2: the first Contract review record 7195508409 (head 8f1f70f) was a PASS with S1 open: the changeset called choices and values accepted aliases though the schema refuses them. The delta record 7196532900 on this head closes S1 (No must-fix, no should-fix.). The delta is prose only: the changeset sentence and the docs row. N2 is closed. N1 (three resolver comments list only label, helpText and placeholder) and N3 (one jsdoc phrase true of the served form only) stay as accepted deviations.
  • Sentence-by-sentence read of the changeset (@objectstack/spec minor, @objectstack/lint and @objectstack/platform-objects patch): it matches the diff, including the refusal of choices / values with a pointer to options, and that an option with no translation keeps its English.

Tier: H (over 3,000 changed lines). Landing: hand-off to the approver by the next stroke; ⛔ the seat does not merge.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

Tier H hand-off · 2026-11-26T15:39Z · head fa2b9fc · approver os-zhuang

维护者速读

  • 改了什么:非英文的搭建者在 Studio 里打开对象、字段、报表、仪表盘、钩子、动作、页面、智能体、技能这 9 类配置表单时,下拉框里的选项名(共享模型、字段类型、删除行为、默认时间段等,共 185 个)改为显示当前语言,周围的字段名早就翻译了,以前只有选项还是英文。10 种语言的译文都已写好。
  • 影响:只多翻译一层显示文字。选项的值和保存下来的数据都不变,某个选项没有译文时仍显示原来的英文。
  • 审核:席位 L1 ACCEPT(本评论前一条);契约审核档 L2 首轮 PASS 7195508409,有一条建议改(changeset 把被拒的写法说成了可用别名),已修好,增量审核 7196532900 PASS,没有必须改或建议改的项。
  • 要你做什么:这个 PR 改动约 3,880 行(主要是 10 种语言的译文),超过 3,000 行,按规则要你批准后才能合并。撤回这一次合并即可恢复。

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 26, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 26, 2026 15:55
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 26, 2026
@os-zhuang
os-zhuang removed this pull request from the merge queue due to a manual request Nov 26, 2026
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 26, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

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

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

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

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

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

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

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

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

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

历史信号:

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

分诊清单:

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

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

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

重投 · head fa2b9fc · 2026-11-26T16:33Z

The merge queue dropped this PR (CI_FAILURE) on merge-group run 45853999754, after os-zhuang queued it at this head (2026-11-26T15:56Z). The only red job is Test Core (5/10), in packages/cli/test/start-deployment-durability.integration.test.ts › #30120 — with the image switch on, a start missing its settings refuses › none set: exit 1, naming all …, with Test timed out in 5000ms.

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

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

更正 · 重投 7197819250 · 2026-11-26T17:06Z

The seat's re-queue at 16:34Z was wrong for this PR. Merge-group run 45860023058 was refused by Governed Surface Queue Guard (exit 8): #37569 — 3879 changed line(s) (+3463 / -416) EXCEEDS the human-merge line 3000. For a PR past the human-merge line, the enqueue itself is the human review, so only the maintainer's enqueue lets it land. Ruling C covers a governed PR that carries an authorized APPROVED review, which this PR does not have.

@github-actions

Copy link
Copy Markdown
Contributor

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

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

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

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

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

    @objectstack/verify:test:  FAIL  src/harness.required-providers.test.ts > requires: ['knowledge'] — the knowledge service and one store > an install without the optional libSQL store: the service is c
      ↳ 失败原因: @objectstack/verify:test: Error: Test timed out in 5000ms.
    

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

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

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

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

历史信号:

  • ⚠️ 本 PR 过去 24h 已在队列失败 1 次(不含本次)。 内容未变而反复失败 ⇒ 高度怀疑 flaky 测试或与同组 PR 的语义冲突,重排不解决。
  • 过去 24h 队列共有 17 个失败构建(不含本次)。

分诊清单:

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

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

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 26, 2026
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 26, 2026
@objectstack-fleet objectstack-fleet Bot mentioned this pull request Nov 26, 2026
3 tasks
Merged via the queue into main with commit dedc16c Nov 26, 2026
79 of 80 checks passed
@os-zhuang
os-zhuang deleted the claude/project-thread-gvxx96 branch November 26, 2026 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue protocol:system 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.

Spec 表单的选项名(options[].label)没有 metadataForms 翻译槽位:服务端下发的表单里选项名在所有语言下都是英文

3 participants