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
feat(platform-objects,cli): record which source revision a generated translation leaf was filled from (#12557)
* feat(platform-objects,cli): record which source revision a generated translation leaf was filled from
Extends the #8765 Option B source-hash mechanism to the generated bundles, per
maintainer ruling #12069 Option A, and corrects the false "this hole cannot
occur there" note that kept them out of it.
`os i18n extract --source-hashes` emits <locale>.source-hashes.generated.ts —
per leaf, the digest of the source revision that leaf is still a byte copy of.
withSourceFallback takes it as a fourth argument and judges objects /
metadataForms alongside the hand-authored sections.
Records are written only where a leaf is currently a copy of the CURRENT
source, so day-one stale count is 0 by construction: 9030 translated leaves
measured, 1543 recorded, 7487 left legacy-trusted. No committed bundle moved a
byte.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W6HFzyH98W1YaQXhJUJt6o
* test(platform-objects): pin single-locale stale-fill detection — the property the ruling turns on
The suite pinned per-locale RECOVERY for the hand-authored half but had no
analogue for the generated half's per-locale DETECTION, which is the whole of
what maintainer ruling #12069 Option A buys over the gate that shipped first.
`check:i18n-stale-fill` infers provenance from two locales holding byte-identical
text, so a leaf stranded in exactly one locale has no second witness and is
invisible to it by construction. A recorded hash needs no witness. Measured on
this tree: 18 generated leaves are recorded in exactly one locale (zh-CN 2,
ja-JP 3, es-ES 13) — English-looking terms one locale left as a fill while the
others translated them.
Verified falsifiable: deleting the third conjunct of findStaleFills turns these
3 tests into 1 failure among 3 total, predicted in writing before the run.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W6HFzyH98W1YaQXhJUJt6o
---------
Co-authored-by: Claude <noreply@anthropic.com>
'Also write <locale>.source-hashes.generated.ts — the provenance companion that lets a stale fill be told from a translation (#11671). Off by default: it is a format addition, so a bundle set opts in by documenting the flag in its extract config.',
101
+
default: false,
102
+
allowNo: true,
103
+
}),
92
104
'dry-run': Flags.boolean({
93
105
description: 'Print to stdout instead of writing to --out',
0 commit comments