You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(cli,spec,i18n): default-locale bundle tracks the source; promote approval labels into the contract (#8597)
* fix(cli,spec,i18n): default-locale bundle tracks the source; promote approval labels into the contract
The i18n extractor's merge branch ran for every locale including the default
one, so an existing en entry always beat the source seed: an author's edit to
a label/description/help never reached the committed en bundle and the drift
gate stayed green (53 stale entries across 6 packages at branch time). The
default locale is now rewritten from the source on every extract; translated
locales keep merge semantics exactly as before (30 translated bundles verified
byte-identical through a fixed regeneration).
Contract-first (#8543 ruling, variant C): the five humanized
sys_approval_request.status labels lived only in the generated en bundle, so a
source-tracking en channel would have regressed them to raw machine values.
They are promoted into packages/spec as APPROVAL_STATUS_LABELS beside
APPROVAL_STATUSES, and the column derives its options from both — never
re-typed at the column (#3786). Same treatment for the sibling
sys_approval_action.action (#8580): APPROVAL_ACTION_KIND_LABELS, whose twelve
entries previously shipped raw (submit / request_info / ...) because the #7232
humanization missed the field.
Guard rail (variant B's axis): bare-string / label-less select options —
including the {value, label: value} shape Field.select normalizes bare strings
into — now seed through the extractor's derived channel: the value still seeds
the skeleton, but inline stays unset, so the coverage gate no longer demands
translations of machine identifiers and a copied value cannot masquerade as
authored display text. In-repo coverage-ratchet blast radius: zero (12
configs, no count moved).
Fixes#8543Fixes#8580
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jqe56GnYFddggeAyfkZFVz
* docs(agents): state the default-locale bundle lesson self-contained, no issue-ID citation
The corrected Documentation Guardrails row cited the card's issue number in
operative text, which check-skill-id-lint rejects: a lesson there must stand
on its own (failure mode + discipline + boundary) because a reader hitting
the rule cannot go read the issue. The row now says what went wrong (a merged
default locale let a stale bundle entry beat an edited source string, drifting
silently under a green gate), what to do (edit the source metadata, not the
generated en file), and where the boundary sits (translated-locale values stay
hand-written and merge-protected) — number dropped.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jqe56GnYFddggeAyfkZFVz
* test(cli): annotate the three new test-layer params the TEST_DEBT ratchet caught
The two i18n test files live in the package's hidden test layer (tsconfig
includes only src), where a frozen TS2835 relative-import cascade makes every
bare arrow parameter an implicit any. The three parameters the #8543 tests
added (one map in i18n-extract.test.ts, one filter+map pair in
i18n-coverage.test.ts) each cost +1 raw tsc error against the shrink-only
TEST_DEBT entry (188 -> 191). Structural annotations bring the measurement
back to exactly 188; the ledger itself is untouched.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jqe56GnYFddggeAyfkZFVz
* regen(i18n): regenerate plugin-security en bundle from the merged source
Discharges the merge commit's placeholder: node scripts/check-i18n-bundles.mjs
--write over the merged tree. The result carries both sides — main's #8599
source wording and this branch's source-tracking rewrites — as the extractor's
own output, not a hand-picked side. Only the en file changed; the 30
translated-locale bundles were rewritten in place and came back byte-identical.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jqe56GnYFddggeAyfkZFVz
---------
Co-authored-by: Claude <noreply@anthropic.com>
The i18n extractor's default locale now tracks the source instead of merging (#8543), and the approval vocabularies carry authored English labels in the contract (#8580).
13
+
14
+
-`os i18n extract` merge mode no longer applies to the default locale: `en` is a copy of the source, not a translation, so an edited label/description/help now reaches the regenerated `en` bundle instead of being silently shadowed by the stale entry forever (53 stale entries had accumulated across 6 packages under the old behavior; all rewritten here). Translated locales (`zh-CN` / `ja-JP` / `es-ES`) keep merge semantics exactly as before — no existing translation is overwritten.
15
+
- Bare-string and label-less select options now seed through the extractor's derived channel: the machine value still seeds the skeleton, but the coverage gate no longer demands "translations" of machine identifiers, and a copied value can no longer masquerade as authored display text.
16
+
- New `@objectstack/spec/contracts` exports `APPROVAL_STATUS_LABELS` and `APPROVAL_ACTION_KIND_LABELS`: the authored English for `sys_approval_request.status` (previously living only in the generated `en` bundle) and `sys_approval_action.action` (previously shipping raw machine values such as `submit` / `request_info` — the #7232 humanization missed this sibling field). Both columns derive their option labels from these maps; the regenerated `en` bundles copy them verbatim.
|`content/docs/references/`|**AUTO-GEN**| ❌ Never hand-edit. Regenerated by `packages/spec/scripts/build-docs.ts`. |
480
480
|`content/docs/releases/`|**RELEASE-OWNED**| ❌ Never edit in a code PR. Release notes are written **centrally at release time**, compiled from changesets + the ADR-0087 registries — not accreted a row per PR. Per-PR appends made `releases/v<major>.mdx` the repo's hottest conflict magnet (three PRs raced the same table inside one afternoon), and every manual resolution risks dropping someone else's row. Your PR's input is its **changeset**; for spec removals also the D2/D3 registry entries. Factual error on a releases page → dedicated docs-only PR or an issue, never a rider on code changes. |
481
-
|`**/translations/*.generated.ts` (nine packages — `platform-objects`, five plugins, three services) |**AUTO-GEN**| ❌ Never hand-edit the file *structure*. Run `node scripts/check-i18n-bundles.mjs --write` to regenerate all nine (merge mode — every existing translation is preserved); `pnpm i18n:extract` still covers `platform-objects` alone. Translation *values* are hand-written and expected to be: the gate compares against a merge-mode extract, so editing a string is fine, while adding or dropping keys is drift. `pnpm check:i18n` gates all nine in CI, and `pnpm check:i18n-coverage` ratchets untranslated declared labels. |
481
+
| `**/translations/*.generated.ts` (nine packages — `platform-objects`, five plugins, three services) | **AUTO-GEN** | ❌ Never hand-edit the file *structure*. Run `node scripts/check-i18n-bundles.mjs --write` to regenerate all nine (merge mode preserves every existing **translated-locale** value; the default locale `en` is rewritten from the source on every run — it is a copy of the source, not a translation: when the extractor merged `en` too, a stale bundle entry always beat an edited source string, so the served text drifted from the source silently under a green gate. Hand-edits to `en.*.generated.ts` therefore do not survive and belong in the source metadata instead); `pnpm i18n:extract` still covers `platform-objects` alone. Translated-locale *values* (`zh-CN` / `ja-JP` / `es-ES`) are hand-written and expected to be: the gate compares against a merge-mode extract, so editing one of those strings is fine, while adding or dropping keys is drift. `pnpm check:i18n` gates all nine in CI, and `pnpm check:i18n-coverage` ratchets untranslated declared labels. |
482
482
|`content/docs/guides/`| hand-written | ✅ Update `meta.json` when adding pages. |
0 commit comments