Skip to content

Decide the translation gate's scope, and whether to require it #150

Description

@mairas

Blocks merging hatlabs/halpi2#49, hatlabs/halmet#24, hatlabs/sh-esp32#20 and hatlabs/sh-rpi#29. Not a defect — a decision, surfaced by a 7-persona review that reached it from three directions (synthesis, findings 1, 3, 4).

What is actually true today

translation-status --check reads the whole repository. Its unit of judgement is the repo; the unit of work is one page in one language. So:

  • An English-only edit cannot go green. One typo fix in docs/en/ marks that page's nine translations stale and exits 1.
  • Every other open pull request inherits it. The paths filter was deliberately removed (a required check that never runs leaves a PR unmergeable forever), and actions/checkout builds the merge-with-main tree, so a PR touching only CI sees the same red.
  • Merge skew reddens main with nobody at fault. Two PRs edit different parts of one English page; both authors do the full nine-locale job and stamp against their own hash; the merged file hashes to neither, so all nine go stale. Deterministic — the stamp covers the whole file.
  • None of it blocks anything. No branch protection and no ruleset on main in any of the four repos (gh api repos/<r>/branches/main/protection → 404, rulesets[]). A red check sits beside an enabled merge button.

Three ways out

  1. Require the check and accept the coupling. Add a branch protection rule naming translation-status / translation-status, with "require branches to be up to date before merging" on — that last part is what removes the merge-skew case. Honest, and what the plan intended. Cost: a typo fix becomes a nine-locale task, and the first stale page reddens every open PR until it is drained.
  2. Rescope the gate. Block unconditionally on missing, unstamped and orphaned — structural, cheap to fix, no translation work implied. Block on stale only for English pages whose blob changed against the merge base. Keeps the whole-repository report and the whole-repository push-to-main check. Costs a change in halos-org/docs-tools and halos-org/shared-workflows.
  3. Leave it advisory. Merge as-is, add no protection. Then none of the above costs anything — and the migration has changed nothing either, since the previous check was also advisory.

Merging the four PRs today selects option 3 by default.

Two consequences that follow from the choice

  • Blocking creates the incentive for the one bypass the design cannot catch. A contributor blocked by a locale they cannot translate can re-stamp everything in seconds; the diff is one frontmatter line per file, indistinguishable from an honest re-stamp. The workflow header already assigns this to reviewers. A cheap CI assertion would catch the pure case: a translation whose translated_from changed must have at least one other changed line. Worth adding if option 1 is chosen.
  • The bot now comments on every pull request, including ones touching no documentation, because removing the paths filter also removed the old workflow's early exit when a PR touched no English page. Under option 3 this is noise on every PR for a check nobody must satisfy.

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