Repository navigation
fix(platform-objects): translate sys_user.role help text away from the retired Set Platform Role action - #19914
Conversation
…e retired Set Platform Role action zh-CN, ja-JP and es-ES help text for objects.sys_user.fields.role.help still told a Setup administrator to press the "Set Platform Role" action that was retired. Translate the leaf into each locale as a faithful rendering of the current en text: it names OS_PLATFORM_OWNER_EMAIL and the single-posture admin_full_access grant, with code spans kept verbatim. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TEhopqrWQYBycZzyJHpAZr
…ation fix Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TEhopqrWQYBycZzyJHpAZr
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 1 changed package(s)), so this run has no opinion about the docs. What this run could not see
Coarse fallback — 3 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
Contract reviewServed-tier: Head verified (PR ① Derived judgments(a) Faithful in all three locales. The
(b) Each locale file changes exactly one line (the (c) The refutation holds on the code. (d) Every checkable claim in the changeset and PR body is true: the ② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS Generated by Claude Code |
Fixes #19897
Clause-②: no
What changed
The
zh-CN,ja-JPandes-EShelp text forobjects.sys_user.fields.role.help(packages/platform-objects/src/apps/translations/{zh-CN,ja-JP,es-ES}.objects.generated.ts) still told a Setup administrator to press the "Set Platform Role" action retired in #9968. Theentext had already moved on twice (#17102, then #19892/#19875) to nameOS_PLATFORM_OWNER_EMAILand thesingle-postureadmin_full_accessgrant, but the three translations were never brought forward, and no i18n gate could see the drift because the leaf carries no source-hash entry.Retranslated the leaf in all three locales as a faithful rendering of the CURRENT
entext (per dispatch Zone 1), keeping code spans verbatim:OS_PLATFORM_OWNER_EMAIL,single,admin_full_access,sys_user_permission_set.A repo-wide grep for the retired action's name/label across every locale's
objects/metadata-formsbundles (en included) now returns 0 hits — nothing else still references it.The source-hash half of the suggested fix — measured, not done, and why
The issue's suggested shape (also in Zone 2 A2) is to also give the leaf a source-hash entry so a future
enchange is caught. Traced and measured, and it does not hold for a leaf that carries a genuine translation:collectFilledFromHashes(packages/platform-objects/src/apps/translations/source-hash.ts) — the functionos i18n extract --source-hashescalls to populate<locale>.source-hashes.generated.ts— records a hash for a leaf only whenvalue === currentSource(it's still a literal, untranslated copy ofen) orprevious[path] === hash(value)(it was already such a copy on a prior run). A leaf holding a real translation satisfies neither, by the mechanism's own documented design (ruling [Decision] 把 #8765 的 source-hash sidecar 扩展到生成的 i18n bundle —— #9672 写明的升级条件已满足 #12069 Option A): "a leaf someone actually TRANSLATED … gets no record and stays legacy-trusted."pnpm i18n:extractafter writing the three translations: it rewrote nothing else (git statusshowed only the 3 hand-edited lines — A3 satisfied), and it did not add a hash entry for this leaf, exactly as the trace predicts.sys_user.rolefield'sdescriptioninsys-user.object.ts, regeneratedenviapnpm i18n:extract, and ranpnpm check:i18nandpnpm check:i18n-stale-fill. Both report nothing for this leaf — 0 findings, 0 stale fills — both before and after this fix. Mutation and regeneration were fully reverted (git checkout HEAD --, blob hashes re-verified equal toHEAD).So the leaf remains legacy-trusted going forward — not a regression this PR introduces, but the pre-existing, ruled status quo for every hand-translated leaf in the
objectsbundle (measured: 1203 in zh-CN, 1182 in ja-JP, 1173 in es-ES carry no hash and are not byte-copies ofen). Extending protection to genuinely-translated generated leaves would need a new ruling in the shape of #8765/#12069, which is out of this card's scope — full measurement and a recommendation are in the dev report.Tests
pnpm --filter @objectstack/platform-objects build— clean.pnpm --filter @objectstack/platform-objects test— 883/883 passed.pnpm --filter @objectstack/platform-objects typecheck— clean (pre-existing shrink-only test-typecheck-debt entry untouched).pnpm check:i18n— OK (9/9 packages in sync).pnpm check:i18n-stale-fill— OK (0 stale fills, 0 baselined).node scripts/pm/dispatch-gates.mjs --commands, re-derived on the final commit,origin/mainfetched first): 54 families, 53 ran clean, 1 (pnpm check:dual-build-cjs-loads) NOT MEASURED — exits 3 PREREQUISITE NOT MET, needs a full whole-workspacepnpm buildunrelated to this diff's closure; CI'sBuild Corecovers it.node scripts/check-issue-citations.mjs(the live command, since the derivation only reaches its--self-test) run by hand: exit 0.Generated by Claude Code