Skip to content

ci: evidence refresh lanes so a push run cannot supersede the nightly/dispatched Db2 run - #4745

Merged
squid-protocol merged 1 commit into
mainfrom
ci/4743-bot-full-run
Oct 9, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
ci/4743-bot-full-run

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Fixes #4743

Problem

One concurrency group evidence-refresh: GitHub keeps one pending run per group and a newer run cancels the older pending one even with cancel-in-progress: false. The nightly / dispatched Db2 run waited behind a running push refresh and was cancelled by the next push's run (37874905643 by #4742's).

Design (Option A plus a hand-over, no new workflow file)

  • Two lanes, concurrency group evidence-refresh-push (push) vs evidence-refresh-full (schedule, dispatch). A push run can no longer replace a full run.
  • Two bot branches: auto/evidence-refresh (push) and auto/evidence-refresh-full. Neither lane force-pushes over the other's PR.
  • No conflicting PRs: new cheap lane job.
    • Full runs close the push lane's open bot PR first (a full run re-proves everything the push run does, plus Db2).
    • Push runs stand down entirely while a full run is queued or running, and re-check right before opening their PR (a push run already under way when the full one started). The full PR's merge is itself a push to main, so the push lane then refreshes whatever moved meanwhile.
  • Ledger / records not reverted: both lanes start from the current main. det_coverage_ledger.py update rewrites only the cases a sweep proved (build() keeps the rest), so a push run keeps main's Db2 entries; --skip-db2 / --only-db2 keep the record sets disjoint.
  • Auto-merge unchanged (same step and conditions, per lane PR).
  • Why not Option B alone: it still needs the separate group (a pending full run is cancelled before it can check anything) and leaves the same-branch overwrite.

Residual: a push PR that merged in the narrow window between the full run's start and its PR could leave the full PR dirty; it then waits for the next nightly. Accepted over regenerating mid-run.

Duration (measured, completed runs 37859714260 / 37866635888)

step time
det sweep 2111-2753 s
stale-record re-proofs 2002-2579 s
checkout ~50 s
report rebuild ~40 s

The two dominate equally and run sequentially; stale records are re-proved again in every run until the previous bot PR merges. No cheap safe speed-up, so follow-up #4744 (parallel jobs, skip duplicate re-proofs). Lane separation also removes most of the starvation that made runs look longer.

Checks

actionlint clean; zizmor clean (it caught an unsound '' || ternary in my first branch expression, fixed); evidence + proof_sweep tests pass; pr_gates.py --fast 5/5.

Verify after merge (orchestrator)

  1. Dispatch Evidence Refresh on main with db2=true; while it runs, merge any PR: the push run's lane job should log "stands down" and its refresh job be skipped; the full run must complete.
  2. Confirm PR from auto/evidence-refresh-full opens with auto-merge, carrying Db2 ledger entries and records.
  3. After it merges, the next push run opens/updates auto/evidence-refresh and must not drop the Db2 ledger entries.

🤖 Generated with Claude Code

@squid-protocol squid-protocol added bug Unintended behavior or logic failure in the engine ci-cd Continuous integration, delivery, and automated runners labels Oct 9, 2026
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol marked this pull request as ready for review October 9, 2026 03:42
@squid-protocol
squid-protocol merged commit 5abdf0c into main Oct 9, 2026
18 checks passed
@squid-protocol
squid-protocol deleted the ci/4743-bot-full-run branch October 9, 2026 03:42
squid-protocol added a commit that referenced this pull request Oct 9, 2026
…hecks register (#4757)

The first full (Db2) refresh (run after #4745) opened bot PR #4756 but failed at
'Enable squash auto-merge': GitHub refuses auto-merge on a PR in clean status, which a
freshly opened PR is until its checks register. Retry for up to 10 minutes; never merge
before CI runs; leave the PR open with a warning if the checks never appear.


Claude-Session: https://claude.ai/code/session_01MQNoe4wPJgr7dbUvs3DG6D

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Unintended behavior or logic failure in the engine ci-cd Continuous integration, delivery, and automated runners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

evidence-refresh: a scheduled or dispatched Db2 run is superseded while pending by any push-triggered refresh, so the Db2 sweep never runs on busy days

1 participant