Repository navigation
fix(cli): os i18n check reads inlineHelpText as the default-locale source of a field help key - #25720
Conversation
…urce of a field's help key Claude-Session: https://claude.ai/code/session_01R1q2xdtYgU6FKrZ7LgjPCC Co-authored-by: Claude <noreply@anthropic.com>
…nce inlineHelpText seeds the default-locale help Claude-Session: https://claude.ai/code/session_01R1q2xdtYgU6FKrZ7LgjPCC Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check1 anchor(s) derived from 1 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 — 31 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 7b00fbb692ab82f72c1cdb11be9c50630a8006f4 && git checkout 7b00fbb692ab82f72c1cdb11be9c50630a8006f4
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin f6ba1343ba41cb173baadfc36e6069123d3f2cfd 8c1cdf8bfb29788cd9f83727ef7b7caf93180f9f && git checkout -B drift-repro f6ba1343ba41cb173baadfc36e6069123d3f2cfd && git merge --no-ff 8c1cdf8bfb29788cd9f83727ef7b7caf93180f9f
node scripts/docs-audit/affected-docs.mjs --json f6ba1343ba41cb173baadfc36e6069123d3f2cfd |
席位核对 · ACCEPT ·
|
| item | reading |
|---|---|
| Shape | draft, base main, first body line Fixes #25683; Clause-②: no and Metadata-protocol: none line-initial in the body and the changeset. |
| Premise, measured | origin/main reads field.help ?? field.description at the help key; the diff makes it field.help ?? field.inlineHelpText ?? field.description, the triage route 6387595193 verbatim. |
| Files (4, +85/−2) | packages/cli/src/utils/i18n-extract.ts, a new unit test, the changeset 25683-inline-help-default-locale.md (@objectstack/cli patch), and examples/app-showcase/src/system/translations/index.ts. The last is outside the claim's surface: it is the fix's own consequence (showcase contact.lead_score authors inlineHelpText, so check:i18n-coverage gained one expected key) and the report declares it. The package is private: true, so it owes no changeset. |
| Changeset sentence check | it states the old source (help then description), the new order, and that a non-default locale without help stays a gap; each matches the diff. |
| Tests | six cases: inline emission, source order, default locale not reported, non-default still reported, description-only and no-source cases unchanged. Ablation reported: three of six turn red with the fix removed, restored to HEAD. |
| Gates | dev union at 8c1cdf8b = this head: 72 derived, 71 exit 0, check:dual-build-cjs-loads exit 3 declared NOT MEASURED. Not governed (check-governed-merges --pr 25720), 87 changed lines. CI at this act: 14 success, 7 opt-in skipped, 17 in progress, 0 failed. Lint & Repo Gates and Type Check are owed success before ready. |
| Accepted deviation | the example translation string, above. |
| Out of scope | the field.help leg reads a key FieldSchema refuses on a field: kept because the ruling names it; Acceptance note, not filed (no class reach). |
| Landing | ready + auto-merge through the relay once every check on this head is green or an expected skip. |
Generated by Claude Code
Fixes #25683
Clause-②: no
Metadata-protocol: none
What changed
The inline source of a field's help key (
objects.OBJECT.fields.FIELD.help) inpackages/cli/src/utils/i18n-extract.tsis nowfield.help ?? field.inlineHelpText ?? field.description, per the triage route:inlineHelpTextis the default-locale source, afterhelpand beforedescription, the same way an authored label is (#15711, ruled A). A field that authorsinlineHelpTextand translateshelpinto one locale no longer has its default locale reported as missing; a non-default locale with nohelpis still reported.Mechanism measured
That call is the only site where the field help key takes default-locale text (
git grepforhelp ??inpackages/**/srcfinds only it). Other help-key sites, each with a verdict:flows.FLOW.screens.NODE.fields.FIELD.inlineHelpText): already readinlineHelpTextdirectly, no fallback chain. No change._sections.SECTION.fields.FIELD.helpText): read the entry's ownhelpTextonly, nohelp ?? description. No change.params.PARAM.help) and action params (params.PARAM.helpText): read their own single key. No change.metadataForms.TYPE.fields.PATH.helpText: own single key. No change.Landing differs from the claim's file surface (one file added)
The claim named the extractor, its tests and one changeset. The change makes the showcase example's
contact.lead_scorefield (it authorsinlineHelpText) owe a zh-CN help, sopnpm check:i18n-coveragewent red (320 to 321 untranslated declared strings). Fixed by translating it inexamples/app-showcase/src/system/translations/index.ts(one zh-CNhelpstring), not by raising the baseline. Gate green again at 320.Tests
New
packages/cli/test/i18n-extract-inline-help-text.test.ts(6 cases): inlineHelpText emitted as the inline text; source order help, inlineHelpText, description; inlineHelpText-only field plus anenbundle withhelpleaves the default locale unreported; a non-default locale missinghelpis still reported; description-only case unchanged; no-inline-source case unchanged.field.help ?? field.descriptionthroughscripts/ablation-replace.mjs, anchor 1 to 0, blob changed): 3 of 6 fail (the inline emission, source-order and default-locale cases), then restored, blob equal to HEAD andgit diff HEADempty. The tests import../src, so no rebuild leg applies.pnpm --filter @objectstack/cli exec vitest run --project unit test/i18n: 31 files, 341 tests pass.@objectstack/example-showcasetest: 39 files, 484 tests pass.@objectstack/cli typecheck: exit 0.Gates (local subset, final head 8c1cdf8)
All 72 derived families run and reconciled with
dispatch-gates --ran(72 derived, 72 run, 0 NOT-MEASURED). Every one exits 0 on the final tree after prerequisite builds, exceptcheck:dual-build-cjs-loads: exit 3, PREREQUISITE NOT MET (needs a fullpnpm build), NOT MEASURED locally; CI runs it. Scoped eslint over the touched files: exit 0.Acceptance
hotsrm's case (inlineHelpText plus an
enhelp, no zh-CN entry) passes the strict coverage check: pinned by the third test case. hotsrm can drop its temporary zh-CN bundle.Generated by Claude Code