Problem
When a pr-fix item exhausts its budget and goes BLOCKED (or lands in NEEDS_HUMAN), that state lives only in dispatch's queue. The PR itself looks like any other open PR with red CI — nothing on GitHub says "the loop has given up on this; a human must act." The operator discovers abandoned PRs by noticing them, or by asking an agent to query the queue. PRs can sit dead for days.
Proposal
When an item transitions to BLOCKED / NEEDS_HUMAN, dispatch should make the PR self-announcing:
- Comment on the PR with a short, structured hand-off: how many fix attempts ran (per lane), the final failure signature, links to the failing runs, and — most valuable — what the last coder attempt said it tried (available from the fix Workload's result summary via the bridge's tombstone). One comment per block-transition, edited in place on re-blocks, so it never spams.
- Label it (
loop/needs-human or similar) so abandoned PRs are one filter away: is:open label:loop/needs-human across the org is the complete "unstick me" worklist.
- Optional: clear comment + label automatically if the item is later re-queued (human pushed a commit, new feedback arrived) so state never goes stale.
Why
The loop's failure mode should never be silent abandonment. A BLOCKED PR that explains itself — what was tried, what kept failing, where to look — is unstickable by the human directly from GitHub, without querying dispatch or reconstructing the attempt history. Complements foreman-dispatch-bridge#133 (signature-aware budgets reduce how often we get here; this covers the times we still do).
Files: src/lib/pr-fix-surfacing.ts (surfaces queue state onto the PR), src/lib/pr-fix-queue.ts (the BLOCKED/NEEDS_HUMAN transition that triggers it).
Problem
When a pr-fix item exhausts its budget and goes
BLOCKED(or lands inNEEDS_HUMAN), that state lives only in dispatch's queue. The PR itself looks like any other open PR with red CI — nothing on GitHub says "the loop has given up on this; a human must act." The operator discovers abandoned PRs by noticing them, or by asking an agent to query the queue. PRs can sit dead for days.Proposal
When an item transitions to
BLOCKED/NEEDS_HUMAN, dispatch should make the PR self-announcing:loop/needs-humanor similar) so abandoned PRs are one filter away:is:open label:loop/needs-humanacross the org is the complete "unstick me" worklist.Why
The loop's failure mode should never be silent abandonment. A BLOCKED PR that explains itself — what was tried, what kept failing, where to look — is unstickable by the human directly from GitHub, without querying dispatch or reconstructing the attempt history. Complements foreman-dispatch-bridge#133 (signature-aware budgets reduce how often we get here; this covers the times we still do).
Files:
src/lib/pr-fix-surfacing.ts(surfaces queue state onto the PR),src/lib/pr-fix-queue.ts(theBLOCKED/NEEDS_HUMANtransition that triggers it).