Repository navigation
Stop triage sessions from waiting hours for a macOS run - #5327
Conversation
`running-tend` told a session fixing a failure only `test-macos` shows to dispatch `ci` on the fix's branch and read that run's `test-macos` job. A triage session takes that as evidence it must collect before it finishes, so it polls the run for its whole length, four to five hours, while it holds the only triage lane. Two Claude triage sessions did so in their first day: #5174's waited 4 h 10 min and #5184's 4 h 46 min, and in both the PR had merged within 20 minutes of the wait starting, so the result changed nothing. The second dispatched run ended red after its PR had merged. Leaf already chose not to have Tend sessions wait on CI (`await_ci: false`, #2455), and Tend tells every triage session so. This instruction, added in #3939, asked for a wait the setting doesn't govern, since the dispatched run is outside the PR's checks. Now the next scheduled run on main is the evidence after a macOS fix: if it still fails, its CI report brings the failure back to triage.
leaf-agent
left a comment
There was a problem hiding this comment.
The new paragraph says to merge on the evidence your runner gives, but the merge rule it depends on is unchanged. Fixing a CI failure's cause still says to merge "once each test it claims to fix failed before the change and passes after it (a skipped or deleted test has not passed)". For a failure only test-macos shows, the Linux runner can't meet that rule: the test already passes there before the fix, and later-tier tests may not run on the PR at all. So a triage session that follows the merge rule still lacks the "passes after" evidence and may keep waiting for it, which is the behavior this PR is meant to stop.
Put the exception in that rule, next to "passes after it". For example: "for a test only test-macos runs, the checks Linux can run suffice, and the next scheduled run settles the rest". Then the two paragraphs say the same thing. That sentence is outside this diff, so I can't attach a suggestion to it.
#5315 (the bot's PR) edits the same paragraph to fix the same stall, and it does amend the merge rule. It differs in one way: it still dispatches the macOS run and leaves the cause issue open until a later session reads the result, where this PR relies on the next scheduled run. Only one of the two should land. Close the other once that's decided.
…it (#5789) Sessions that fix a failing test have been polling their own pull request's CI. With Leaf's `await_ci: false`, tend-land owns that wait. In one case the polling session also repaired the PR in parallel with tend-land's own repair job. This change rewords the one `running-tend` sentence that reads as an order to wait. It now points at `monitor-ci`, **Which heads to poll**, which says which session waits, instead of reading as an order to poll. Under Leaf's config, that section hands the wait to tend-land and tells the session that pushed to record the push and not poll. The overlay doesn't repeat that rule because the rule depends on `await_ci`, and a copy here would override the bundled skill if that setting changed. The merge condition itself is unchanged: CI must still reach a terminal result on the exact head before the merge. **Why this sentence.** **Fixing a CI failure's cause** is written as instructions to whoever merges: "Merge a pull request that fixes tests … The pull request's CI must reach a terminal result on the exact head (`monitor-ci`)." It dates from #2379, when the session fixing a test also merged it. A triage session that opens a test fix reads that pointer as its own job. Tend's `monitor-ci`, **Which heads to poll**, says the reverse: after a push to a PR with no human author, record it and don't poll. #5327 removed a similar instruction from this overlay, one that made triage sessions wait hours on a dispatched macOS run. **Effect.** In triage batch 42582881973 (2026-11-09), 8 of the 11 sessions that opened a PR polled its checks, each after loading `monitor-ci`. The #5710 session spent about 38 of its 125 minutes polling. While it diagnosed its red CI, tend-land's `repair #5749` job (42592804291) fixed the same failure and pushed first, and the triage session then dropped its own work. The 2026-11-08 sweep recorded the same 12–15 minutes of polling in four other triage sessions (#5641, #5658, #5657, #5463). Those runs and their analysis are in the monthly tracker, #5067. **What remains uncertain.** The session logs redact the reasoning behind each poll, so the link from this sentence to the polling is inferred from where it points and from the #5327 precedent. If polling continues after this lands, the next step is the bundled skill. This touches agent instructions, so it needs the control-plane owner's approval before it lands. --------- Co-authored-by: leaf-agent <[email protected]>
running-tendtold a session fixing a failure onlytest-macosshows to dispatchcion the fix's branch and read that run'stest-macosjob. A triage session takes that as evidence it must collect before it finishes, so it polls the run for its whole length, four to five hours, while it holds the only triage lane. Two Claude triage sessions did so in their first day: #5174's waited 4 h 10 min and #5184's 4 h 46 min. In both, the PR (#5218, #5267) merged within 20 minutes of the wait starting, so the result changed nothing, and #5184's dispatched run ended red after its PR had merged.Leaf already chose not to have Tend sessions wait on CI (
await_ci: false, #2455), and Tend tells every triage session so. This instruction, added in #3939, asked for a wait the setting doesn't govern, since the dispatched run is outside the PR's checks. It also supplied the "passes after" evidence the merge rule in Fixing a CI failure's cause asks for. Now the merge rule says that for a failure onlytest-macosshows, the checks the Linux runner can run suffice, and the macOS paragraph names the next scheduled run on main, after the merge, as the evidence after the fix. The landing sessions already worked that way: both PRs merged before their dispatched runs ended. If the scheduled run still fails, its CI report brings the failure back to triage.Supersedes #5315, which makes the same merge-rule change but still dispatches the macOS run and leaves the cause issue open until a later session reads it. That costs a macOS run and another triage session per fix to learn what the next scheduled run reports anyway.