Adopt halos-docs-tools and the shared translation gate - #49
Conversation
The six checkers move out of scripts/ and into the halos-docs-tools package, pinned at v0.1.0. The workflow shrinks to the caller stanza for halos-org/shared-workflows, which runs the same commands and, unlike the advisory version it replaces, fails the run when a translation is stale, missing, unstamped or orphaned. One commit rather than a chain: the old workflow invokes the scripts by path, so deleting them and repointing CI cannot be separated without an intermediate commit whose CI is broken. Two glossaries told the translator to register their locale in the checker's GLOSSARIES dict first. The packaged check-glossary already carries all nine, verified by running it for it and nb here, so those instructions are removed rather than repointed. The caller carries no paths filter. A required check that never runs on a pull request touching none of the filtered paths leaves that pull request unmergeable forever. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The structure section still described a flat docs/ tree from before the locale directories existed, so every path in it was wrong. The build commands never mentioned the translation checkers at all. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Translation statusda — 20 current Every translation of the pages in scope is current. |
The documented pre-flight could not reproduce the gate. The Verifying block ran `translation-status`, which always exits 0; CI runs `translation-status --check`. A translator following the skill got a clean local run and a red check -- the same false green this migration exists to remove. Verified on sh-rpi, where the two disagree today: plain exits 0, --check exits 1. deploy.yml holds pages: write and id-token: write and ran plain `uv sync`, while the gate runs `uv sync --locked`. Now that a git dependency is in the graph, bumping the pin without re-locking made the two disagree: the gate refuses, the deploy resolves the new ref live and runs its build backend with the strongest token in the repository. Deleting the obsolete "register your locale in GLOSSARIES" instructions removed the only pointer to where that registration happens. The registries are still hardcoded, in the package, so a tenth locale needs an entry in each, a release, and a pin bump. The skill says so now. Also: the caller stanza states what the called workflow enforces, since the failing command lives in a repository this one does not contain; the Verifying block said four and listed five; CLAUDE.md described map-anchors as rewriting when that form only reports, claimed CI runs all six commands when it runs three, and omitted `unstamped` from the state list; the French, German and Swedish glossaries omitted the check-glossary step the other five carry; and the language-selector note named two repositories and a count of three where four carry the block. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Code review — 7 personasScope: Findings below are the merged set. Cross-reviewer agreement is noted; every claim I acted on was reproduced before acting. P1 — High
P2 — Moderate
P3 — Low
One the reviewers did not findThe mechanical rename mangled a path in sh-rpi: One reviewer claim I correctedTesting reports that the anchor re-raise path has never executed. It has — run 31699012592 during the shared-workflows work, a broken anchor with the gate passing and CoverageVerified before and after the fixes, in all four repos: Untracked and out of scope: Suppressed: findings below 0.60 confidence. Verdict: not ready to merge, pending two decisions that are yours, not mine. Everything mechanical is fixed and pushed. What remains is a single question the reviewers converged on from three directions (findings 1, 3, 4): the gate judges the whole repository while work happens one page at a time, and nothing currently requires the check. Three ways out:
Merging today gives option 3 by default, which is the one nobody chose. |
The six checkers under
scripts/were copied between four documentation repositories, and this repository was the one they were written in. They now come fromhalos-org/docs-toolspinned atv0.1.0, and the workflow is the caller stanza for the shared reusable workflow inhalos-org/shared-workflows.The behaviour change is that the run now goes red where the version it replaces always stayed green: it fails when any translation is stale, missing, unstamped or orphaned. It does not yet block a merge — this repository has no branch protection and no ruleset, so the red check sits next to an enabled merge button. Making it required is a separate decision, and it carries a real cost: the gate judges the whole repository, so an English-only edit cannot go green without its translations. See the review synthesis on this PR. It still posts the report as a pull request comment first, so a red run always carries its own explanation.
Verified locally on this branch before pushing:
mkdocs build --strictclean,check-anchors sitereports all anchors resolving,translation-status --checkexits 0 with all nine locales at 20 current pages, andcheck-glossary,check-typographyandmap-anchorsall run against this repository's own glossaries undersolutions/translation/.Two of those glossaries told the translator to register their locale in the checker's
GLOSSARIESdict before the glossary check could run. The packagedcheck-glossaryalready carries all nine locales — confirmed by runningitandnbhere — so those instructions are deleted rather than repointed.The caller deliberately carries no
pathsfilter. A required check that never runs on a pull request touching none of the filtered paths leaves that pull request unmergeable forever.Fly-by in its own commit, called out per policy:
CLAUDE.md's structure section still described a flatdocs/tree from before the locale directories existed, so every path in it was wrong. Corrected, and the checkers added to the command list.Part of halos-org/halos#147.