Repository navigation
Description
Summary
A builder whose PR is merged but whose porch pr gate is still status: pending does not appear in the dashboard's Needs Attention view — or anywhere in the Work surface. It silently vanishes.
Reproduction (real instance)
shannon builder spir-2019, project 2019-admin-dash-rename-ops-dashboar, PR #2030:
- PR #2030 is MERGED (base
ci; issue [Spec 1647] Post-merge porch state and thread #2019 auto-closed). porch recordedmerged: true/merged_at: 2026-06-02T15:14:34Zin the projectstatus.yaml. - Yet
gates.pr.statusis stillpending(itsrequested_atwas stamped ~25s after the merge — an out-of-band GitHub merge plus a resume after the recent Tower restart scrambled the ordering). - The live overview reports
prReady: truefor builder 2019. - It shows in neither Needs Attention nor the open-PR list.
Root cause
derivePrReady in packages/codev/src/agent-farm/servers/overview.ts:
return parsed.gates['pr'] === 'pending' && !!parsed.gateRequestedAt['pr'];This does not consider that the PR has already merged, so a merged-but-gate-still-pending builder reads as prReady: true.
NeedsAttentionList.buildItems in packages/dashboard/src/components/NeedsAttentionList.tsx then:
- suppresses the builder row for any
prReadybuilder (if (b.prReady) continue;), on the assumption the PR will surface via the open-PR (pendingPRs) path; and - only emits a PR row for PRs present in
pendingPRs(open PRs only).
A merged PR lives in recentlyClosed, not pendingPRs, so neither path emits it. A code comment in buildItems even notes this ("(merged), nothing is emitted here; the next refresh surfaces it once pendingPRs includes the open PR") — but an already-merged PR never re-enters pendingPRs, so it stays hidden permanently.
Prescribed fix
- Ensure the overview status-parser captures the
mergedboolean fromstatus.yaml(add it if it isn't already parsed alongsidegates/gateRequestedAt/prReadyForHuman). - Make
derivePrReadyreturnfalseonce the PR is merged, e.g.:Rationale: once merged, the builder is no longer a "PR awaiting human review", so it must neither reportreturn parsed.gates['pr'] === 'pending' && !!parsed.gateRequestedAt['pr'] && !parsed.merged;
prReadynor have its builder row suppressed under the (now-false) expectation of an open PR. - Add unit tests in the overview tests: a parsed status with
prgatepending+requested_at+merged: true→derivePrReadyreturnsfalse; keep the existing pending +requested_at(not merged) →truecase green. - Confirm with the repro shape that the builder no longer vanishes (no
NeedsAttentionListchange should be required — fixing the source flag is sufficient — but verify).
Scope / notes
- Isolated change in
overview.ts(+ its status-parser) + unit tests. Small, no architectural change. - Out of scope (separate concern): porch leaving the
prgatependingafter a merge — it recordedmerged: truebut never advanced the gate or requestedverify-approval. That porch state-machine inconsistency (worsened by out-of-band GitHub merges and the recent terminal-extinction resumes) deserves its own issue; this bug is only the surfacing false-positive. - Distinct from the earlier "missing
requested_at" Needs-Attention misses ([PIR #1919] Windows: hide child-process console windows; throttle Team view refresh #1932 / Fix #1982: codev update no longer reports unedited CLAUDE.md / AGENTS.md as conflicts; dry run matches the real run #1984): this variant ismerged-but-gate-pending.
Activity
waleedkadous commentedon Jun 2, 2026
On it! Working on a fix now.
waleedkadous commentedon Jun 2, 2026
On it! Investigated: root cause confirmed in
derivePrReady(overview.ts) — it ignores the merged flag inpr_history, so a merged-but-pr-gate-still-pending builder reads asprReady: trueand gets suppressed in NeedsAttentionList. Implementing the prescribed fix (parsemerged, gate it inderivePrReady) now.[Bugfix #966] Fix: derivePrReady ignores merged → merged-but-gate-pen…
[Bugfix #966] Chore: bump better-sqlite3 ^12.5.0 → ^12.10.0 (node 26 …
[Bugfix #966] Test: scrub external-adopter name from repro comment
[Bugfix #966] Thread: CMAP approved, PR #980 ready, awaiting pr gate
Merge pull request #980 from cluesmith/builder/bugfix-966
release notes: catch-up entries for #971 (web terminal fast-path), #966…
Fix #1759: address review — worktree-first dedupe via listAllProjects…