Skip to content

mutants: split each night between new code and a durable backlog - #919

Merged
reardencode merged 2 commits into
masterfrom
ci/mutants-nightly-split
Oct 5, 2026
Merged

reardencode merged 2 commits into
masterfrom
ci/mutants-nightly-split

Conversation

@rearden-grok

@rearden-grok rearden-grok Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The nightly mutants workflow starts at 00:47 UTC (47 0 * * *) and runs for 8 hours as two 4-hour jobs. A GitHub-hosted job dies at 6 hours, so one job cannot hold the whole budget. Each job's timeout is 270 minutes (30 minutes of slack, under the 6-hour cap). The per-mutant timeout stays 20 minutes. MISSED still does not fail the run, and mutants stay off the required PR checks.
  • While both new mutants and backlog mutants remain, a job starts new batches only until half of its own budget has elapsed, then walks the backlog. Time the new queue does not use goes to the backlog. An empty side does not block the other. The second job resumes the saved cursor and does not open another new window after that half is already used.
  • The cursor (including the next backlog mutant name) and the MISSED lines are pushed to the mutants-state branch after each job. The next run resumes from that branch even when the 14-day artifact is gone. A name that is still in the regenerated list is the resume point; a missing name uses the saved index modulo the current backlog length. The branch wins when it disagrees with the artifact. A failed push fails the workflow. Two nights cannot overwrite each other: cancel-in-progress is false.

Test plan

  • ./scripts/mutants-queue.test.sh (fake elapsed clock, name and index resume, cron, 8-hour budgets, state-branch publish to a local remote, artifact fallback)
  • MUTANTS_STATE_DRY_RUN=1 ./scripts/publish-mutants-state.sh
  • bash -n on the nightly script, the publisher, and the restore helper
  • CI qc (runs the queue self-test), test, windows, macos, coverage

The nightly job spent its whole budget on new mutants, and the backlog
cursor lived only in a 14-day artifact. The run now starts at 00:47 UTC
and keeps going for 8 hours as two jobs, because a hosted runner dies
at 6. New batches stop once half of the first job's budget has elapsed
when both queues still have work. The rest of the night walks the
backlog, and the second job does not open another new window. The
cursor and MISSED lines are pushed to the mutants-state branch.
A saved new_skip past the current new-mutant list dropped those names
and then never moved new_base, so later diffs stayed hidden behind the
old skip. Split now closes that phase the way advance() did when
new_skip >= n_new, and a backlog step does the same if it is still set.
@reardencode
reardencode merged commit a2b2258 into master Oct 5, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant