Repository navigation
fix(spec): a translation item is named in snake_case, the locale tag goes in locale - #26769
Conversation
…goes in `locale` `TranslationItemSchema.name` called the locale tag (`zh-CN`) the conventional item name, which the save door's item-name grammar refuses. The describe, its comment, the generated reference row and the sync's skip warning now say snake_case (`zh_cn`) with the BCP-47 tag in `locale`. The door and the read-side fallback keep their behaviour; a door pin covers both names. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzhKYT8L13Bgj8icT3i
📓 Docs Drift Check2 anchor(s) derived from 2 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 153 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 88027cdb33b26adbd5cf99f8ff7b5cd86ef625bd && git checkout 88027cdb33b26adbd5cf99f8ff7b5cd86ef625bd
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 665059b6056c4caf54e631d678203d8c9dc4aba3 e17cd5817ec1bb1e7ef8fff0004a74478e1fdb34 && git checkout -B drift-repro 665059b6056c4caf54e631d678203d8c9dc4aba3 && git merge --no-ff e17cd5817ec1bb1e7ef8fff0004a74478e1fdb34
node scripts/docs-audit/affected-docs.mjs --json 665059b6056c4caf54e631d678203d8c9dc4aba3 |
…llows the snake_case naming Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzhKYT8L13Bgj8icT3i
Contract reviewServed-tier: Inputs read: card #26128 body and all four comments (triage 6417820397, premise reading 6430828264, claim 6444357938 as amended 15:13Z, os-dev-report 6445682457); PR #26769 body, file list (6 files, +50/−10), its one issue comment (docs-drift bot, computed on the earlier head ① Derived judgmentsNo accept set or behaviour moved. The diff outside the changeset is: the The new text is true. The door grammar is Repo-wide grep for a remaining
Door pin. Declarations. ② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS |
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzhKYT8L13Bgj8icT3i
维护者速读 (席位终稿)
席位意见:接受。契约复核 PASS(6446285830)。 席位核对 · ACCEPT ·
|
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 40548584717 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
|
Queue ejection · re-enqueue once ·
Generated by Claude Code |
Requested by Yibo Wang · project thread
Fixes #26128
Clause-②: no
Metadata-protocol: none
维护者速读
name的说明改为 snake_case(如zh_cn),语言标签写在locale;不再建议用zh-CN作条目名。保存门与读侧回退行为不变。zh-CN命名,而保存门的条目名语法拒收它(400 INVALID_REQUEST),照规范写的作者第一次保存必失败。packages/spec/src/system/translation.zod.ts(name 的 describe 与上方注释)、packages/metadata-protocol/src/protocol.item-name-grammar.test.ts(新增 spec/metadata-protocol: a translation item named after its locale (zh-CN), asTranslationItemSchema.namesays is conventional, is refused 400 INVALID_REQUEST by the item-name grammar at the save door #26128 段)、packages/core/src/fallbacks/authored-translation-sync.ts(跳过警告文案)。pnpm --filter @objectstack/metadata-protocol exec vitest run src/protocol.item-name-grammar.test.ts,预期 27/27 通过,其中zh-CN被拒、zh_cn+locale: 'zh-CN'保存成功。What changes
TranslationItemSchema.namedescribe:Item name — snake_case like every metadata item (e.g. \zh_cn`); the BCP-47 tag goes in `locale`. The comment above it now says the same and that the tag-shapedrow.namefallback covers only rows stored beforelocale` became required.content/docs/references/system/translation.mdx: the generatednamerow, regenerated withgen:schema+gen:docs.authored-translation-sync.ts: the no-locale skip warning now saysset the top-level 'locale' to its BCP-47 tag, e.g. 'zh-CN'instead of suggesting the item be named after the tag. Behaviour unchanged (the existing test matchesno resolvable locale).protocol.item-name-grammar.test.ts):saveMetaItemof typetranslationnamedzh-CNis refused withcode: INVALID_REQUEST,status: 400and the grammar message, persisting nothing;zh_cnwithlocale: 'zh-CN'saves and keeps the tag inlocale.refuseUngrammaticalMetaItemNameand the read-side fallback are untouched.conventionally the locale,name the item after, aname: 'zh-CN'translation item): no hits outside the files above.'@objectstack/spec': patch,'@objectstack/core': patch(the sync warn text).packages/objectql/src/protocol-publish-canonical-fold.test.ts(about line 269): the test-helper comment now says the name is snake_case (zh_cn) with the tag inlocale; its fixture already usedzh_cn. Added in patch round r1 (claim surface amended 15:13Z).Tests
Tests ran on
33a1af012; headf308adfc4is that commit plus a merge oforigin/main(a485b5a3e) that touches none of these files.metadata-protocolprotocol.item-name-grammar.test.ts: 27/27 (25 existing + 2 new).specsrc/system/translation.test.ts: 182/182.coresrc/fallbacks: 67/67.service-i18nauthored-translations.test.ts: 16/16.metadata-protocolfull suite: 269 files passed, 3 skipped; 21582 tests passed, 19 skipped.ad3a211fe:objectqlprotocol-publish-canonical-fold.test.ts10/10.Acceptance notes
packages/spec/src/system/translation.test.ts(about line 757) parses a schema-level item namedzh-CN; the schema does not constrainname, so this stays valid at the schema and is not a door fixture. Left as is.Verification
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack: 106 derived families, run serially on33a1af012. 102 exited 0 on the first pass; 4 exited 3 (prerequisite: built output) and exited 0 after a fullpnpm turbo run build(check:skill-examples,check:dual-build-cjs-loads,check:i18n-walk-parity,check:lean-entry-closure).--ranreconciliation:106 derived famil(ies) accounted for — 106 run, 0 NOT-MEASURED. The derived list on headf308adfc4is byte-identical to the one on33a1af012.os-regen-merge.shmerge, onf308adfc4: spec build +gen:schema+gen:docsleft the tree clean;check:generated,check:docs,check:authorable-surfaceexit 0.ad3a211fe(comment + changeset only): the derived list grew to 107 (check-engine-split-ratio.mjs --self-testadded). The 23 families reading the changeset, objectql tests or repo-wide text were re-run onad3a211fe, all exit 0;--ranover the merged record:107 derived famil(ies) accounted for — 107 run, 0 NOT-MEASURED.!in the title, no narrowing arm).Generated by Claude Code