Repository navigation
Description
Raised after running the full cross-repo choreography end-to-end for Batch B.3 (gitgalaxy#2681 + keyword-rosetta#35). Three separate things went wrong in one day, and they share a root cause.
The choreography is circular by construction
- Corpus expected values depend on engine code → the corpus PR needs
ENGINE_REF=pull/N/head - The engine PR's
rosetta-auditdepends on the corpus SHA → needs the corpus PR merged - But
ENGINE_REFmust be back tomainbefore the corpus PR merges — and withmain, the corpus gates fail, because enginemaindoes not yet contain the fixes
No ordering satisfies all three. docs/GATING.md's step 2 in keyword-rosetta showed the strain directly — it trailed off mid-sentence: "engine PR must merge before the reset lands... in practice:". I rewrote that paragraph to read cleanly earlier today, which made a procedure that does not close sound like it does. That edit should be revisited.
In practice the deadlock is broken by merging the corpus PR with a knowingly-wrong ENGINE_REF, which is what happened: keyword-rosetta#35 merged with ENGINE_REF=pull/2681/head, so corpus main is now pinned to an engine branch and owes a reset that nothing enforces.
The dance is not necessary
Neither repo requires any status check to merge:
gitgalaxy main: required_status_checks.contexts: [] checks: []
keyword-rosetta main: "Branch not protected"
So rosetta-audit is advisory. The entire ENGINE_REF mechanism exists to make an advisory check green before merge. A simpler order has always been available:
- Merge the engine PR —
rosetta-auditred, advisory, harmless - Merge the corpus PR —
ENGINE_REFnever leavesmain; its gates pass because enginemainnow has the fixes - Bump
KEYWORD_ROSETTA_REF
No ENGINE_REF edit, no reset debt, no deadlock, one fewer thing to forget.
ENGINE_REF's real value — verifying corpus numbers against unmerged engine code before committing to them — does not require a committed file. It is already achievable locally, and was: pointing GALAXYSCOPE_BIN at the engine working tree ran all 46 gates green before anything was pushed.
Everything that went wrong today failed GREEN
| failure | how it presented |
|---|---|
KEYWORD_ROSETTA_REF set to a 7-char SHA (#2680) |
actions/checkout resolved it as a ref name, job died at checkout — indistinguishable from a real gate failure, red for hours on main |
ENGINE_REF left at pull/N/head on corpus main |
nothing fails; future corpus PRs would silently build against a frozen ref |
tree_sitter_accuracy_audit.py / tri_comparison_chart.py without galaxyscope on PATH (#2680) |
skipped every language, printed all OK, exit 0 |
Three cross-repo references that were wrong, none of which announced itself. Documentation caught none of them — including the documentation written the same day.
Proposals, cheapest first
- Drop
ENGINE_REFfrom the normal flow. Document merge-engine-then-corpus-then-pin as the default, and keepENGINE_REFonly for the rare case where the corpus genuinely must be verified in CI against unmerged engine code. Removes the deadlock and the reset step entirely. - Assert the invariant on push to corpus main. A one-step workflow that fails (or opens an issue) when
ENGINE_REF != mainonmain. Catches the forgotten reset automatically instead of relying on a person. - Make the pin format machine-checked. A step in
rosetta-audit.ymlthat fails loudly whenKEYWORD_ROSETTA_REFis not 40 hex characters, before the checkout step swallows it as a ref name. - Make "did it actually run?" explicit. Every audit that can no-op should assert a plausible unit count and fail otherwise —
0 languages checked, all OKmust be a failure, not a pass.
(2) and (3) are each a handful of YAML lines and would have caught two of today's three incidents outright.
Activity
ci: rosetta-audit without pins -- baseline-classified, refuses to no-…