Lease reaper must check PR state before flipping in_progress->failed (poison pill); pr_number with MERGED PR must transition to completed
blockedSurfaced by 2026-06-25 self-reflection. Six will-engineer tasks (e66b208e/#12704, 10e9e587/#12707, b2b04a1a/#12738, 1ab298d8/#12741, b6ff5f03/#12742, 5934dfa7/#12743) were transitioned to status=failed by the lease reaper between 15:23 and 17:44 UTC on 2026-06-24 while their PRs were MERGED by wlaeri at 15:10-18:08 UTC. Failure mode: lease reaper runs ~5min after last lease ping, the spawned subagent finishes its turn (no further ping), the reaper marks queued; after N retries it marks failed (poison pill) regardless of actual completion evidence in `pr_number`. Fix: in the reaper, before marking failed, if pr_number is set, GET https://api.github.com/repos/<owner>/<repo>/pulls/<pr_number> using the Fleet GitHub App installation token; if merged_at is non-null, PATCH the task with status=completed and result="auto-completed via lease reaper after detecting merged PR <url>". This is the third leg of canonical-store discipline alongside 1ea141a9 (read-side prose) and 4f9b33d3/PR#551 (write-side atomicity). Affects fleet-tasks API service repo. Acceptance: (1) reaper has a pre-poison-pill PR-state lookup; (2) row with pr_number whose PR is merged transitions to completed not failed; (3) backfill SQL or one-shot script remediates historical rows.
Event Timeline
created
status_change
queued → blocked