Repository navigation
Description
This was generated by AI during triage.
From a 2026-11-10 investigation of why the Fix run Pass never repaired the Merge conflicts on #1823 and #1935.
Agent Brief
Category: bug
Summary: A held CI-red reservation (refs/heads/thirdshift/pickup/ci-red) skips the unscoped Fix run Pass entirely, before the PR search. Pickup only skips its CI actions on the same lock, then carries on. A Fix run Pass should do the same.
Current behavior:
In src/fix.rs:54, an unscoped Fix run Pass (no --author) calls base_ci::run first. If Reservation::ci_red can't take the lock, src/fix/base_ci.rs:22 returns Some(skipped("Base branch CI is reserved on origin")), and src/fix.rs:56 returns that ending. fix_candidates is never read.
A Pickup run whose crashed owner was process 966509 on stephens took ci-red on 2026-10-30 10:21 EDT and never released it. For the next 11 days every Fix run Pass in the fleet (cron on thirdshift.app, and on test from 2026-11-10) either hit the Command limit or skipped with Fix run skipped: Base branch CI is reserved on origin. #1823 and #1935 sat in Ready for review with a Merge conflict, eligible but never taken. The lock was released by hand on 2026-11-10.
docs/guide.md (section "When the Base branch stays red") already says, for Pickup: "An occupied reservation skips only these CI actions."
Desired behavior:
When the CI-red reservation is held, the Fix run Pass skips only its Base branch CI maintenance (reading the tip's CI, re-running, the fix-<base>-<sha> repair) and goes on to the PR search, reserving and fixing the first eligible PR as usual. The Activity log and stderr still say the Base branch CI step was skipped because the reservation is held.
Pending or re-running Base branch CI, and an existing repair branch or PR, still skip only that step as well, unless there's a reason they must hold back PR fixes. If there is, record it in the docs.
Key interfaces:
base_ci::runinsrc/fix/base_ci.rs: distinguishes "Base branch maintenance skipped" from "this Pass ends".src/fix.rsPass path: continues tofix_candidatesafter a maintenance skip.docs/guide.md, Fix runs section: says a held CI-red reservation skips only the Base branch CI step, as for Pickup.
Acceptance criteria:
- With
refs/heads/thirdshift/pickup/ci-redheld by another owner and an open PR with a Merge conflict,thirdshift fix base mainreserves that PR and starts a Fix run. - stderr and the Activity log record that the Base branch CI step was skipped, with the reason.
- With the reservation free, Base branch CI maintenance behaves as now, including starting a CI-fix session for persistent red CI.
-
--authorPasses are unchanged. - Tests run through the CLI against the fake
gh.
Out of scope:
- Detecting or releasing a reservation whose owner has died (separate issue).
- The Command limit starving the Fix run Pass behind Pickup runs.
Activity
JacobStephens2 commentedon Nov 11, 2026
Agent Brief
Confirmed against main at 74b072d. This is one bounded Ticket; no split is needed.
Diagnosis: src/fix/base_ci.rs:22-56 returns Some(Ending::Skipped) for an occupied CI-red reservation, pending or re-running Base branch CI, and an existing repair branch or PR. src/fix.rs:53-58 returns that ending before calling fix_candidates. These maintenance skips therefore prevent unrelated eligible PR repairs.
Reproduction: an isolated scratch harness under target/triage-1958 reused tests/support::Scenario, real fixture Git repositories and fake gh. Each case supplied an open Trusted-account PR with a real Merge conflict and ran thirdshift fix base main no-merge no-base-fix no-email. Held reservation, pending Base checks, a newly requested re-run, an existing repair branch, and an existing repair PR each produced zero candidate queries and zero sessions. The re-run case requested exactly one re-run. With Base CI clear and the reservation free, the same PR was selected, reserved, repaired and left ready for review. With the CI reservation held, adding --author acme also repaired the PR. Both held-reservation cases preserved the owner's exact ref SHA. Current skip reasons appeared on stderr and in the Activity log as whole-Fix-run skips.
Implementation requirements:
Validation: cargo test --test fix_base_ci --test fix_pass -- --test-threads=3 passed: 20 tests passed, two subprocess entry points ignored. After implementation, run the focused tests, generated-doc checks and scripts/affected-tests main.
Out of scope: dead-owner detection/recovery, separately covered by #1959, and Command-limit scheduling starvation.
Update the earlier pending Base CI regression for #1958