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: enhancement
Summary: An origin reservation whose owning process has died stays held until someone notices and releases it by hand. The host that took it can tell for certain that its owner is gone, so thirdshift should notice too.
Current behavior:
Reservations (refs/heads/thirdshift/pickup/<n>, refs/heads/thirdshift/pickup/ci-red, refs/thirdshift/reservations/<PR>) are commits whose message records Host:, Launch:, Process: and Started: (take_ref in src/reservation.rs). After a crash, docs/guide.md tells the Day shift to confirm the owner stopped, then delete the ref with an exact --force-with-lease. ADR 0017 and the guide say: "Never delete a live owner's reservation or remove one on a timer."
Nothing tells the Day shift that a reservation is orphaned. On 2026-11-10 the fleet had three:
thirdshift/pickup/ci-red: Hoststephens, Process 966509, Started 2026-10-30 14:21 UTC. The process was gone, andstephenshad been up since 2026-10-26, so the PID had not been reused. Held for 11 days, it skipped every Fix run Pass in the fleet and stopped Pickup filing CI-red Tickets.thirdshift/pickup/1821andthirdshift/pickup/1901, left by Commands that died.
Desired behavior:
The host named in a reservation's Host: can prove its owner stopped: no process with that PID, or a process with that PID that started after the reservation's Started: time (or the host booted after it). That is liveness evidence, not a timer, so it doesn't contradict ADR 0017.
Pick one response during triage (or both):
- Surface it: the Console shows an orphaned reservation in Needs you: the ref, its owner, how long it has been held, what it is blocking (e.g. "Fix run Passes on JacobStephens2/thirdshift skip while this is held"), and the exact release command with the observed SHA filled in.
- Release it: the owning host releases its own orphaned reservation with an exact lease on the observed SHA, and logs that it did. Other hosts never release a reservation they don't own.
Key interfaces:
src/reservation.rs: parse a reservation's owner fields; a liveness check that runs only on the owning host.- Console Needs you (option 1) and/or a Pass's startup (option 2).
- ADR 0017 and
docs/guide.md: say when a reservation counts as orphaned, and what thirdshift does about it.
Acceptance criteria:
- A reservation whose
Host:is this machine and whoseProcess:is not running, or is running but started after the reservation'sStarted:, is reported as orphaned. It is released only if option 2 is chosen. - A reservation owned by a live process is never reported or released.
- A reservation owned by another host, or with no
Host:field, is never released by this host. - Release uses
--force-with-leasewith the observed SHA, so a reservation retaken in between is left alone. - Covered for issue,
ci-redand PR reservations.
Out of scope:
- Timer-based expiry.
- The Fix run Pass skipping its PR search when
ci-redis held (separate issue).
Activity
JacobStephens2 commentedon Nov 11, 2026
Investigation summary
Investigated #1959 against selected Base branch main at 960513a. The recovery gap is confirmed; the historical fleet incidents remain supplied evidence, not independently verified observations.
Confirmed behavior
Recommended direction
Choose option 1 first: surface reservations with local evidence of a dead owner, their observed SHA, owner fields, age, blocked work and an exact release command. Keep automatic deletion, Claim recovery and continuation outside this change. ADR 0017 and docs/guide.md:3751 currently require human recovery; preserve the prohibition on timer-based release.
The requested certainty needs a defined ownership contract. src/host.rs records only the OS hostname, which does not establish uniqueness or a shared PID namespace. Started is wall-clock time. Command records already use boot ID plus native process-start ticks (src/logs/process_identity.rs:35), but reservations do not. Also, that helper returns None for read failures as well as dead processes, so None must not become proof of death. Missing, unknown, foreign or ambiguous ownership and unreadable process data must remain uncertain rather than be classified as orphaned.
Validation
All 10 tests selected by cargo test --test pickup_run reservation -- --test-threads=2 passed, including legacy-owner protection, uncertain-push retention, CI exclusion and changed-ref preservation. The PR test selected by cargo test --test fix_pass busy_origin_reservations_are_passed_over_and_all_busy_is_a_skip -- --exact passed. scripts/affected-tests main reported no changed files and no affected tests. Git status is clean.
No duplicate was found among open issues searched for reservation and orphan. #710 concerns dead Claims; #1960 concerns sustained Pass skips. Both are related but distinct. Keep this issue open for the ownership decision and proposed split below.
Questionnaire
For the Day shift shaping #1959:
The repository confirms that origin reservations survive their Command and have no dedicated Needs you observation. I recommend surfacing them first, with manual exact-lease recovery, while leaving automatic release out of scope.
JacobStephens2 commentedon Nov 11, 2026
Moved to
ready-for-humanfor a grill with the Day shift, not a machine triage. The brief in the body stands, but it leaves open decisions that need Day shift judgment:Started:) fits ADR 0017's "never remove one on a timer", or needs an ADR of its own.Host:field, or one from a host that has been retired, ever gets a path other than release by hand.JacobStephens2 commentedon Nov 17, 2026
Second occurrence:
ci-redheld 5 days, 2026-11-12 to 2026-11-17The same orphaned-reservation shape as the 2026-11-10 case in the brief, on a different host. A duplicate report was about to be filed; this comment adds that evidence here instead.
refs/heads/thirdshift/pickup/ci-redat340a954b3a2da98f4e0a4b26bd0c9248f56f6245("thirdshift Pickup reservation for CI-red Ticket filing").thirdshift, Launch/home/jacob/repos/thirdshift, Process201924, Started 2026-11-12 22:17:03 UTC.ps -p 201924found no process on 2026-11-17, and the host had been up since 2026-09-15, so the PID was not reused. This meets the brief's "provably gone" test.thirdshift fix base mainPass on JacobStephens2/thirdshift, on 4 hosts (every 10, 15, 15 and 20 minutes), loggedBase branch CI step skipped: Base branch CI is reserved on origin. Whenmainwent red atc58b4bfcon 2026-11-17 (CI run 44088645739; the flakyapi::release_url_keeps_api_openapi_and_cli_parity), no Pass gave it the one failed-jobs re-run or a CI-fix. It surfaced only because the maintainer saw redmainand asked why the crons weren't handling it.--force-with-lease=refs/heads/thirdshift/pickup/ci-red:340a954b…).For the open decision: this is the second fleet-wide stall from
ci-redalone, for 11 days and then 5. Both times the only sign was a skip line repeated in Activity logs. #1960 (show how long a Pass has been skipping, and why) would have surfaced it within hours under either option.JacobStephens2 commentedon Nov 17, 2026
Decisions (Day shift, 2026-11-17)
The three open questions from the
ready-for-humanmove are settled:Host:field, or one whose host can't check it (retired, or never runs a Pass on that repository). It is listed in Needs you with the release command filled in, and never removed automatically.Agent Brief
Category: enhancement
Summary: A host releases the origin reservations it took whose process has provably died, and the Console lists any reservation that can only be released by hand.
Current behavior:
Reservations (issue
refs/heads/thirdshift/pickup/<n>,refs/heads/thirdshift/pickup/ci-red, PRrefs/thirdshift/reservations/<n>, and the Release run'srefs/thirdshift/reservations/release) are empty-tree commits whose message recordsHost:,Launch:,Process:andStarted:. Only the holder's ownDropreleases one, with an exact lease on its token. When the holder dies without runningDrop, the reservation stays until the Day shift notices and deletes it by hand. Nothing reports it.ci-redhas stalled Base branch CI repair across the fleet twice: 11 days from 2026-10-30, and 5 days from 2026-11-12 (evidence in the comments above).Desired behavior:
Host:(the same name thirdshift records there). The reservation is orphaned when no process has itsProcess:ID, or that process started afterStarted:, or the host booted afterStarted:. Anything else, including a failure to read process or boot times, counts as alive.--force-with-lease=<ref>:<observed sha>. A release adds an Activity log line and a stderr line naming the ref, itsProcess:andStarted:, and what it had been blocking. A failed or lost lease (retaken in between) leaves the ref alone and logs a warning. The Pass then carries on normally, so a Pass that freesci-redcan go on to its Base branch CI step in the same run.Host:), and that reservation'sStarted:is more than 24 hours old, the Console shows a Needs you row for it. The row shows the ref, its owner fields, how long it has been held, what it is blocking (for example "Fix run Passes on skip their Base branch CI step"), and the exact release command with the observed SHA filled in. The row clears once the ref is gone or its SHA changes. The 24 hours only decides when to report; nothing is removed on a timer. Dismissing the row follows the usual Needs you rules.Key interfaces:
Host:,Process:andStarted:into an owner record. Old reservations missing a field still parse, as untestable./proc) and macOS, the platforms thirdshift runs Passes on.Acceptance criteria:
Process:doesn't exist, using the observed-SHA lease, and logs it. Covered for issue,ci-red, PR and Release reservations.Process:exists but started afterStarted:, and one taken before H's last boot.Started:is never released or reported.Host:, is never released by H, and an unreadable process or boot time counts as alive.ci-redproceeds to its Base branch CI step in the same run.Out of scope: