Skip to content

check-translation-drift.mjs cannot exit 0: generated EN changelog has no RU source #499

Description

@explosivebit

Finding

node website/scripts/check-translation-drift.mjs exits 1 with stale: 0 | missing: 1, and cannot exit 0 without one of the two changes below. Measured after the humanize+link-fix pass (commit on chore/activate-evidence-backlog).

The single missing entry is docs/changelog.md. That page is generated at prebuild by scripts/copy-changelog.mjs from the root CHANGELOG.md; it has no hand-written RU source (git log on website/src/content/docs/ru/docs/changelog.md is empty). The Starlight sidebar declares the page with translations: { ru: 'История изменений' }, so Starlight renders the RU route from the EN fallback — the page works, the checker just does not know about fallback translations.

Numbers: EN files 171, RU up-to-date 170, stale: 0, missing: 1.

Options considered

  1. Author ru/docs/changelog.md by hand. Rejected: it would add a second manually-maintained file that must track a generated one — the exact drift the checker exists to catch. It also breaks the single-source invariant (root CHANGELOG.md is canonical).
  2. Teach the checker about Starlight fallback pages. Correct fix, but it is a change to the checker's model, not a content gap, and is out of scope for the text pass.

Nothing was changed in the working tree for this; the checker's exit 1 is reported, not silently patched.

Trigger to revisit

Reopen if either becomes true:

  • the sidebar stops declaring translations: { ru: ... } for a generated page (then the missing RU file is a real gap, not a fallback), or
  • check-translation-drift.mjs is added to a CI gate that requires exit 0.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions