Expand description
Watches every open release-bump pull request until it lands.
crate::bump opens a chore/release-vX.Y.Z pull request with auto-merge
armed and then stops looking. A required check that goes red (a flaky
windows or browser job) leaves auto-merge waiting forever, and nothing
pages anybody because the notices there only fire when the pull request
cannot be opened. This module is the part that keeps looking.
It runs inside magi serve as its own task, like crate::waiter, and is
tied to no run: a pending bump is coalesced across runs and outlives the
one that opened it. The forge is the source of truth (every open pull
request whose head branch starts with chore/release-v, in every checkout
magi knows); the pending marker is not consulted, so a missing one changes
nothing.
- The decision is pure. [
decide] maps a checks snapshot and the recorded [WatchState] to one [Step]. A forge answer that cannot be read isUnknown: nothing moves, not even the stall clock. - A failed run is rerun once, durably. The run id is written to the
state file before
gh run rerun <id> --failedis called, so a restart never reruns twice; if the call then fails, the cost is one escalation to a human, never a rerun loop. - Escalation is a notice plus a question (
crate::bump::NOTICE_NODE, nocwd, no run). Nothing is ever merged, closed or pushed: the watcher only reruns jobs. Silence is a hold. The owner’s choice is applied by the watcher itself on its next lap, recorded inWatchState::appliedso an answer is applied once. - Notice wording is fixed per stage and carries only the pull request, so a repeated poll never relights it; everything that varies (job names, links) rides in the question.
Constants§
- HOLD
- Choice: stay quiet until a check or the head changes.
- LEAVE_
IT - Choice: stop watching this pull request.
- RERUN_
AGAIN - Choice: rerun the failed jobs once more. The three choices are matched verbatim when applied.