Skip to content

v2.2.0 — multiple batches per dispatch pass & finalization hardening (no more stranded green PRs)

Latest

Choose a tag to compare

@cgbarlow cgbarlow released this 30 Jun 08:57
· 471 commits to main since this release
18abe74

[2.2.0] - 2026-06-30

Changed

  • Multiple batches per dispatch pass, prefer batches over singletons (ADR-113 / SPEC-113-A, amends ADR-107). The queue dispatcher now opens as many batch PRs as the Gate-A budget allows before any singleton (new dispatch_batch_passes loops dispatch_batch_pass until the governor pauses or fewer than 2 batchable branches remain), instead of one batch per pass then singletons filling every other slot. So a homogeneous backlog drains almost entirely via K-proof batches — amortising the dominant ~12–20 GB mathlib env-load over K proofs per slot instead of spending it per proof — without raising the in-flight cap. A pass-scoped exclude guards the loop against GitHub read-after-write lag re-selecting a just-batched goal; UNSORRY_MAX_BATCHES_PER_PASS (default 8) is a runaway backstop. Soundness, batch selection, the governor caps, and the UNSORRY_BATCH_SIZE=1 default are unchanged. Refs #6751 (A1/A2).

Fixed

  • Fix: prove PRs with a backlog/ note are no longer stranded un-merged (ADR-105 / ADR-068). Queued / seedkit prove branches add a backlog/<goal>.md tracking note alongside the proof, but the auto-arm allow-list (finalization_recovery.py / fork_automerge.py) only permitted library/ goals/ proof-runs/. So within_allow rejected every such PR (should_arm/is_admissible → false), the finalization-recovery janitor found 0 arm candidates, and 40 green-and-mergeable prove PRs stranded for ~11 h — saturating the open-PR budget, which paused the submission governor and halted all new dispatch (no singletons, no batches). backlog/ (benign markdown, not CODEOWNERS-gated) is now an allowed prove-PR path, so the janitor arms and merges these again. Refs #6751.
  • The flaked-gate retry janitor (ADR-112) now falls back to update-branch when a rerun is rejected. GitHub refuses to re-run a workflow run older than a few days, so a queued proof branch that flaked days ago and only now got dispatched as a PR could never be rerun ("This workflow run cannot be retried") — it sat BLOCKED despite a sound proof. The janitor now rebases such a PR onto current main (fresh synchronize → gates re-dispatch on a current SHA), the same recovery the dropped-gate janitor uses. Needs the admin REFRESH_TOKEN for the synchronize to re-trigger; --no-rebase keeps it rerun-only otherwise.
  • Harden PR auto-merge arming so green prove PRs can't strand (ADR-005 / ADR-105 / ADR-107). Two defence-in-depth fixes for the finalization gap that stranded 40 green PRs: (1) creation-time arm — the dispatcher's gh pr create && gh pr merge --auto … chain silently left a PR un-armed whenever --auto was rejected ("PR already in clean status" race) or hit a transient error, and treated that as a hard dispatch failure. It now goes through arm_or_merge_pr, which arms auto-merge, falls back to a direct merge when the PR is already mergeable, and never fails the dispatch (a created PR is left for the recovery janitor on a transient error). Used by all three sites (same-repo + queued singletons → --squash, batches → --merge). (2) batch recovery net — a green-but-unarmed batch PR previously had no backstop (finalization-recovery's should_arm only matches prove(, not prove-batch(); batch-recovery-janitor only handled failures). The batch-recovery-janitor now also arms green-but-unarmed batch PRs with --merge. Refs #6751.
  • The queued-proofs board now refreshes on a proof merge (a push to main under library/index), not just the */15 cron — GitHub throttles the schedule under load, so the board could show a pre-drain count for hours after proofs landed (e.g. a solver stuck at 141 waiting while their solves were already on main). It also stamps generated_at (keyed to the latest board-source commit, deterministic — no timestamp-only churn) so a frozen board is visible as stale rather than mistaken for a quiet queue (ADR-066).