Repository navigation
refactor(app-shell): retire the designer string table and its parity gate - #27136
Conversation
…gate The metadata-admin designer table, empty since the previous slice, is deleted with its table-first lookup: t() and tOptional() resolve every designer string from the studio namespace of @object-ui/i18n alone. The paired-table gate check:i18n-designer-parity, its test, its ui script and its root ci.yml step are retired. Its pair reader moves into the shared extractor in check-i18n-dead-keys.mjs, where the drift gate and two Studio tests already read it, and the pair parity it enforced for the type and domain label tables is held by a real-tree pin in check-i18n-dead-keys.test.ts. The namespace's own parity stays in studio-namespace.test.ts; the zh-only family reasons move into the studio namespace pin test with their citation anchors checked. Readers of the deleted declarations (block-config-i18n, the zh base census) now read the namespace catalogues. Claude-Session: https://claude.ai/code/session_01JQwxbX3S5QrD29Ghii633f Co-authored-by: Claude <noreply@anthropic.com>
The CI/CD guide page this branch edited was retired on main; the page stays deleted. Claude-Session: https://claude.ai/code/session_01JQwxbX3S5QrD29Ghii633f Co-authored-by: Claude <noreply@anthropic.com>
Restores the root ci.yml step that runs check:i18n-designer-parity, so the pull opens with no governed path; the next commit reverts this. Claude-Session: https://claude.ai/code/session_01JQwxbX3S5QrD29Ghii633f Co-authored-by: Claude <noreply@anthropic.com>
The pull is open, so the ci.yml step retirement goes back in and the head carries the whole change again. Claude-Session: https://claude.ai/code/session_01JQwxbX3S5QrD29Ghii633f Co-authored-by: Claude <noreply@anthropic.com>
Seat note · contract review owed · seat
|
|
triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U Contract-review-claim: Triage seat, taking the hand-off that names this head ( Generated by Claude Code |
Contract reviewServed-tier: Inputs read: card #25922 body and all 45 comments (rulings 6431032267 and 6431234244, S7 order 6461796872, claim 6461806458, os-dev report 6463510492); PR #27136 body, 19-file list, net diff against ① Derived judgments
② Semver level
③ Boundary flagsDev report 6463510492:
Ruling bounds held: Q3 (6431032267, kept by 6431234244) approved exactly this one ④ Design judgment
CI reachability of the replacement (the step's one property the tests had to inherit). The old step ran in Breaking attempts, each caught on the head's tree: an The cited code (read, not reviewed). Findings.
Implemented-by: VERDICT: PASS Generated by Claude Code |
维护者速读(席位终稿)
席位意见:契约复核 PASS(6469007202, 席位核对ACCEPT · seat
Generated by Claude Code |
Requested by Warren · project thread
Part of #25922
Clause-②: no
Metadata-protocol: none
维护者速读
ENGINE_STRINGS_EN/ENGINE_STRINGS_ZH(S6b 起已为空)和「先查表、再查命名空间」的查找,t()/tOptional()现在只从@object-ui/i18n的studio命名空间取字;退役check:i18n-designer-parity(脚本、测试、ui/package.json脚本行、根ci.yml的一个步骤)。.github/workflows/ci.yml的一个步骤,因此是 Tier H,需审批人批准后落地;回滚即 revert 本 PR。ui/packages/app-shell/src/views/metadata-admin/i18n.ts的lookupString,再看inspectorStrings.studioNamespace-25922.test.ts末尾新增的「the namespace is the only home」一组,以及check-i18n-dead-keys.test.ts末尾接手类型与领域标签配对校验的 pin。cd ui && pnpm exec vitest run packages/app-shell/src/views/metadata-admin/inspectors/inspectorStrings.studioNamespace-25922.test.ts scripts/__tests__/check-i18n-dead-keys.test.ts,应全绿。What changes
ENGINE_STRINGS_*declarations inui/packages/app-shell/src/views/metadata-admin/i18n.tsare deleted, andlookupStringreturnsstudioString(key, locale)alone.pickTablekeepsTYPE_LABELS/DOMAIN_LABELS;FLOW_FIELD_ZHnever read the table and is untouched.ui/scripts/check-i18n-designer-table-parity.mjs, its test, thecheck:i18n-designer-parityline inui/package.json, and the root.github/workflows/ci.ymlstep "Verify the metadata-admin designer string tables stay paired" (one step; no other.github/**line).DESIGNER_TABLE_PAIRSandreadDesignerPairsmove into the shared extractorui/scripts/check-i18n-dead-keys.mjs, wherecheck-i18n-en-drift.mjs(CI'scheck:i18n-drift) and two Studio tests now import them. The extractor treats a table the module no longer declares as its namespace home alone. What the gate enforced is held by tests:ENGINE_STRINGSparity (en ⊆ zh,{placeholder}parity, zh-only rows in documented families):ui/packages/i18n/src/__tests__/studio-namespace.test.ts, describe "studio namespace — scoped parity", which already covered every moved key.TYPE_LABELS/DOMAIN_LABELSparity: a new describe "the real designer pairs stay paired" inui/scripts/__tests__/check-i18n-dead-keys.test.ts, on the real tree, with floors per pair.ZH_ONLY_REASONSin the namespace pin, which checks each anchor still occurs exactly once.previews/__tests__/block-config-i18n.test.tsreads its key sets from the namespace catalogues and assertsi18n.tsdeclares noENGINE_STRINGS_constant (it had asserted both tables empty).zh-base-term.i18n-13131.test.tsruns its census over the loadedzhcatalogue.check-i18n-dead-keys.test.tsandcheck-i18n-en-drift.test.tsgain fixtures for a module without the table.ui/packages/i18n/README.md, the namespace'sindex.ts/zh.tsheaders, and the extractor and drift-gate docs. The CI/CD guide page that listed the gate (ui/content/docs/guide/ci-cd-pipeline.md) was retired onmainby docs(ui): retire the CI/CD guide page and repoint its readers at the root workflows #27071 while this branch was open; the merge keeps it deleted..changeset/25922-studio-i18n-table-retired.md,@object-ui/i18npatch (its README ships).Why
Ruling 6431032267 Q2 = A (upheld by 6431234244): the designer table becomes one lazy
@object-ui/i18nnamespace, moved in slices. S7 is the last slice, deleting the empty table and the gate that paired its two homes.Tests
inspectors/inspectorStrings.studioNamespace-25922.test.tsgains describe "the namespace is the only home (objectstack#25922 slice S7)":en) throught()andtOptional()inen-US,en,de-DE, no locale,zh-CN,zhandzh-TWequals its catalogue value;undefinedthroughtOptional()in the four others;i18n.tsset back to its base blob at5fe0b967(the table-first lookup over the empty tables). So every lookup resolves the same before and after.scripts/ablation-replace.mjs, each landed by anchor count and blob, restored to theHEADblob withgit diff HEADempty):lookupString: pin red, 92 of 182, including both new S7 cases.engine.translationPreview.coverage): pin red, 2 (that family'st()case and the every-key case).TYPE_LABELS_ZHrows deleted: the new real-tree pair pin red ("TYPE_LABELS: every en key has a zh row with the same {placeholders}").engine.packages.form.help.citation anchor reworded inpackage-schema.ts: that citation case red.The sweep
The
zhloader innamespaces/studio/index.tswas delayed by 4,000 ms (ablation-replace.mjs --hold, restored to theHEADblob). Under the delay, 312 test files ran: every app-shell test naming a zh locale or a moved family, the i18n tests namingstudio, and the dead-keys and en-drift script tests. 3,826 of 3,827 tests passed. The one red isi18n/src/__tests__/studio-namespace-lazy.test.tsx, red by construction (itsfindByTextwaits 1 s against a 4 s delay), as in S6b. No racer.Acceptance notes
ENGINE_STRINGS,TYPE_LABELSandDOMAIN_LABELS(notFLOW_FIELD_ZH); all three keep a check, listed above.TYPE_LABELS,DOMAIN_LABELSandFLOW_FIELD_ZHstay, since none reads the deleted tables. The zh-only producer rows are 54 and stay optional lookups throughtOptional()..github/workflows/ci.ymlis the register rowworkflows(glob: '.github/workflows/**', tier: GOVERNED_TIER_Hinscripts/pm/check-governed-merges.mjs).dispatch-gates --tierderives no model-tier mandate: "Model tier — no path-derived mandate: the surface hits none of the 4 declared glob(s)". Changed lines 1,286 (+370 / −916) against the 3,000 threshold: under. This PR stays draft; no reviewers requested. The ci.yml step was re-applied after create, so pr_create's governed follow-up (fleet-write: relay pr_create asks the governed approvers to review a Tier H draft before any contract review exists, so an approver can approve and merge it unreviewed (#26566, #26570) #26617) did not request approvers before the contract review:f8e5fa25restored the step so the pull opened with no governed path, and the next commit reverts it, so the head carries the full S7 diff (its tree equalsd40b118a's). CI onf8e5fa25may be red for those minutes, since that step names a script this PR retires.Build & E2E UImeasures it.Verification
At
d40b118a(the head's tree after the revert above), which mergesorigin/maina98daf75(21 commits past the branch point5fe0b967; the one conflict was the retired CI/CD guide page). The pin, ablations and sweep ran at7c7a23e1, before the merge; the merged commits touch the ten locale packs but not the namespace, the app-shell string module or an i18n gate script, and the focused set and every gate re-ran on the merged head.Tests and gates
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack: 88 commands atd40b118a, each exit 0 (captured before any pipe), includingpnpm --dir ui exec vitest run scripts/(Test Files 174 passed | 2 skipped (176)).--ran: "88 derived famil(ies) accounted for — 88 run, 0 NOT-MEASURED (a DERIVED zero — all 88 recorded an exit code and none of them is 3)". The same 88 were also all exit 0 at7c7a23e1, before the merge.pnpm --filter @object-ui/i18n --filter @object-ui/app-shell run type-check: exit 0.pnpm --dir ui run type-check:scripts: exit 0.check:i18n-dead-keys,check:i18n-drift,check:i18n-keys: exit 0.check:new-line-citations: exit 0.node scripts/check-nul-bytes.mjs: exit 0. (check:i18n-designer-parityis retired here.)studio-namespace,block-config-i18n,zh-base-term, the two Studio tests, the dead-keys and en-drift script tests):Tests 487 passed (487).Human Minimum
packages/specchange.DESIGNER_TABLE_PAIRS/readDesignerPairsexports and the changeset.pnpm lintis CI's.main, one pull request.Generated by Claude Code