Repository navigation
Commit 751312f
committed
ci(translations): enforce the output checklist as a validator
The pre-PR checklist in docs/TRANSLATION.md was prose: code fences
byte-identical to English, URL set a subset, frontmatter keys matching,
MDX components unchanged, no <script / javascript: / on*=, length within
±40%. A prose list is checked by the same agent that just decided the
link was broken.
Adds .github/scripts/check-translation-output.mjs, a third zero-dependency
check alongside the freshness and ownership gates. It answers the question
a provenance stamp cannot: a file can carry a current source_sha and still
have had its code samples repaired or half its body dropped. Measured on
main: 83 of the 84 files with fidelity findings are NOT stale.
Scope: the whole corpus is always scanned; what is scoped to the PR diff
is what blocks, mirroring the blocking/reported split check-translations.mjs
already makes. `unsafe` blocks anywhere, on English sources too — it is a
security rule and the corpus is clean of it today.
Also fixes both gate steps swallowing their exit status: the default `run:`
shell is `bash -e {0}` with no pipefail, so `node ... | tee` reported tee's
status and the freshness gate could not fail the job.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CJPxtTxoxTUnjNdTbiEaRa1 parent a132376 commit 751312f
3 files changed
Lines changed: 801 additions & 18 deletions
0 commit comments