Skip to content

docs: name resolveLocaleAmong's five-step locale ladder where comments still restate four steps - #30694

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/issue-30617-locale-ladder-prose
Nov 5, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/issue-30617-locale-ladder-prose

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Elon · project thread

Fixes #30617

Clause-②: no
Metadata-protocol: none
Skills-docs: none — comment/docs text only; skills/** carried by #30603

维护者速读

  • 改了什么:服务端注释、翻译文档页与一条 QA 清单条目里的语言匹配说明,从旧的四步改为 resolveLocaleAmong 的五步(多了平台语言表一步)。
  • 为什么改:fix(spec,core): resolve locales through the platform table's read aliases, so a zh-TW / zh-HK reader gets zh-Hant #30601 已把两个解析器统一到五步;旧说明会让人以为繁体请求(zh-TW)落到第一个 zh-* 文案,加繁体包时会误判。
  • 风险与回滚:零运行时改动,只动注释/文档/清单文本;回滚即 revert 本 PR。
  • 先看:content/docs/ui/translations.mdx(对外文档)、docs/qa/platform-checklist/areas/integration-system.json(清单条款 revision 15→16)、organization-mfa-enrollment-guard.ts 注释。
  • 两分钟验证:node scripts/check-platform-checklist.mjs,预期打印 OK。
  • 需要你做的:无,席位落地。

What changes

Comment, docs and checklist text only; no code or behaviour change. Each place that restated the old four-step ladder (exact, case-insensitive, base language, variant) now names resolveLocaleAmong (@objectstack/spec/system) and its five steps, adding the platform locale table step (platformLocaleTagOf: zh reaches zh-CN, zh-TW / zh-HK / zh-MO reach zh-Hant), or says the table step only adds answers for the table's aliases.

  • packages/objectql/src/engine-validation-messages.ts: the negotiatedMessageLocale doc comment.
  • packages/objectql/src/engine-validation-locale-negotiation.test.ts: the header comment.
  • packages/services/service-automation/src/engine.ts: the comment on the resolveBundleLocale import.
  • packages/plugins/plugin-auth/src/organization-mfa-enrollment-guard.ts: the module doc and the copyLocaleFor doc (the copy carries no zh-Hant, so zh-TW still reads zh-CN).
  • packages/plugins/plugin-email/src/template-loader.ts: the sorted-tags comment now says the sort fixes both first-match steps (table language and variant expansion).
  • content/docs/ui/translations.mdx: the "Within the bundle, matching walks" paragraph.
  • docs/qa/platform-checklist/areas/integration-system.json: integration-system.email-template-render acceptance[3] clause and verify; revision 15 to 16 with a history row. The showcase bundle holds no zh-Hant tag, so no verdict changes.

Dropped from the card's list: packages/plugins/plugin-auth/src/idp-locale-claim.ts already names resolveOfferedLocale and the five steps on origin/main (b77c160), so it is unchanged.

Acceptance notes

  • packages/spec/src/stack.zod.ts (the defineStack email-template floor warning) still prints the four-step list (exact, case-insensitive, base language, variant expansion). It is in spec and outside this card's file list, so it is not touched here. Noted, not filed.
  • No changeset: the diff publishes nothing — comment text in published packages and an unpublished test file, docs and checklist. skip-changeset label.

Verification

Gates run at e5703af (node scripts/pm/dispatch-gates.mjs --commands, 87 derived): 79 exit 0; 7 exit 3 NOT MEASURED (prerequisite not met in this shallow, unbuilt worktree: check-plugin-teardown-shape --self-test needs an unshallow clone; @objectstack/lint doc-formula-expressions and doc-security-posture, spec check:skill-examples, check:docs-transcript-drift, check:dual-build-cjs-loads, check:lean-entry-closure need builds); check:type-check-debt NOT MEASURED locally (it re-measures every package typecheck; hit the local timeout). CI's Lint & Repo Gates runs all of them. node scripts/check-platform-checklist.mjs exit 0. eslint on the five changed TS files exit 0 (scoped; the whole-repo lint is CI's).

🤖 Generated with Claude Code

… restate four steps

PR #30601 put both server locale resolvers on resolveLocaleAmong
(exact, case-insensitive, platform locale table language, base
language, first registered variant). Comments in objectql,
service-automation, plugin-auth and plugin-email, the translations
docs page and the email-template-render checklist item still listed
the old four steps. They now name the resolver and its five steps,
and say the table step only adds answers for the table's aliases.
Comment, docs and checklist text only; no behaviour change.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cytQjG9X1CrCgytUM5
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Nov 5, 2026
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation tests labels Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

1 anchor(s) derived from 4 changed package(s); no hand-written page names any of them. ⚠️ 3 changed file(s) yielded no anchor (packages/objectql/src/engine-validation-messages.ts, packages/plugins/plugin-auth/src/organization-mfa-enrollment-guard.ts, packages/services/service-automation/src/engine.ts), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

What this run could not see
  • 3 changed file(s) yielded no anchor (packages/objectql/src/engine-validation-messages.ts, packages/plugins/plugin-auth/src/organization-mfa-enrollment-guard.ts, packages/services/service-automation/src/engine.ts) — pages documenting those are invisible to this run
  • the SDK route bridge reached 63 of 221 client-bound route-ledger rows — the other 158 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 158: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 55 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 103 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 — 39 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 a2437b560bd8872feece6ec8b57c6fdf21cff1f4 → packageMentionDocs.

Which tree this was computed on

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

node scripts/docs-audit/affected-docs.mjs --json a2437b560bd8872feece6ec8b57c6fdf21cff1f4

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#3 · os-elon-musk · session_016WV4cytQjG9X1CrCgytUM5

ACCEPT · #30617 · 2026-11-05T22:36Z · Head-sha: e5703af2ca0beaf87f8fdd3b07430a74e0a05bdd

席位核对

  1. Shape: comment, docs and checklist text only, 7 files, +39/−16, no code line moves. Read the full diff at this head.
  2. Premise, measured: every new sentence checked against resolveLocaleAmong in packages/spec/src/system/i18n-resolver.ts on origin/main: five steps in this order (exact, case-insensitive, platformLocaleTagOf table language, base language, first registered variant), zh → zh-CN at the table step, zh-TW → zh-Hant there or zh-CN by variant expansion when no Traditional key exists. The prose matches. The drop of idp-locale-claim.ts (already five steps) holds.
  3. Gates: 87 derived, 80 exit 0, 7 exit 3 NOT MEASURED (shallow/unbuilt prerequisites, named in the body). Correction to the PR body: check:type-check-debt was rerun without the local timeout and exited 0 (the body still says NOT MEASURED). Check-runs at this head were still running at ACCEPT; the seat lands only on all green.
  4. Accepted deviations: body section order follows os-dev.md; the checklist item's revision 15 → 16 with a history row is the checklist gate's requirement for a clause change.
  5. Out of scope: packages/spec/src/stack.zod.ts's defineStack email-template floor warning still prints the four-step list — Acceptance notes (spec-lane prose of the same family, true for today's tables). Skills-docs: none holds (skills/** carried by skills/objectstack-i18n: the in-memory fallback's locale ladder omits the platform locale table step that PR #30601 adds #30603).
  6. Landing: check-governed-merges --pr 30694: NOT governed, 55 lines. Ordinary queue landing by this seat on green: skip-changeset is right (nothing published changes).

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 5, 2026 23:00
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge November 5, 2026 23:00
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 5, 2026
Merged via the queue into main with commit 92cb3d9 Nov 5, 2026
56 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-30617-locale-ladder-prose branch November 5, 2026 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/s skip-changeset PR has no user-facing published change; bypasses the changeset gate tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Comments and docs outside spec still restate the four-step locale ladder that PR #30601 replaces with resolveLocaleAmong's five steps

1 participant