mirror of
https://github.com/bitbaum/fleet.git
synced 2026-12-05 00:38:19 +01:00
I put the commit-index cross-check in the reconciler only, reasoning that a wrong STALE there costs a real deploy while this gate merely reports. That was the wrong call, and it took about an hour to prove: the first audit run after the aoz rename went RED on evig, whose tip had a successful deploy-selfhost.yml run sitting in `actions/runs?head_sha=...` the entire time. A gate that cries wolf gets muted, and this one guards the single mechanism between "merged" and "live". "It only reports" is not a reason to tolerate a false positive in it — reporting is the whole job. So `deployedByShaIndex` and `runsForSha` move OUT of the reconciler and into this module, and the reconciler imports them. One definition, not two: the thing that reports a stall and the thing that repairs one already share deployFreshness, and splitting the confirmation across both files is exactly the drift those imports exist to prevent. Their eight assertions move with them. The audit now asks the commit index before calling anything stale, and says which index answered when they disagree. Live run after the change: 21 repos, all deployed, exit 0 — evig included. Worth being precise: evig resolved through the NORMAL path this time, because the flake is intermittent, so this run did not exercise the new branch. What covers it is the moved unit tests and the reconciler's own evig incident. 33 + 25 assertions, none lost in the move (was 24 + 34). Claude-Session: https://claude.ai/code/session_01NLZ6vs1jsWw2kKbpWTZHf2 Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>