Skip to content

Needs Attention filter excludes BUGFIX PRs (regression from #844 fix shipped in v3.1.3) #873

@waleedkadous

Description

@waleedkadous

Symptom

Every open BUGFIX PR is silently invisible in the dashboard's Needs Attention list — the architect doesn't see it even after CMAP completes. Repro: spawn any BUGFIX builder, let it complete CMAP and reach phase: verified with an open PR, observe the Needs Attention list does not include that PR.

Confirmed today on Shannon workspace (PR 1846, bugfix-1845 builder) — and the same condition would have applied to bugfix-844 / PR #845 in the Codev workspace, except the builder pinged me directly via afx send so I noticed the PR anyway.

Root cause

PR #844's filter (NeedsAttentionList.tsx:42-100, shipped in v3.1.3) gates PR inclusion on b.blocked === 'PR review'. This is the gate label for the porch pr gate, which SPIR/ASPIR/PIR/AIR all have. BUGFIX does not have a pr gatecodev-skeleton/protocols/bugfix/protocol.json's pr phase has no gate field, so the builder transitions cleanly from pr to verified after CMAP without ever blocking.

For BUGFIX builders post-CMAP:

  • b.blocked is null (no gate held)
  • b.phase is verified
  • An open PR is linked to the builder's issue

Neither condition in the current filter fires:

  • Condition A (builder at pr gate) → fails (blocked is null)
  • Condition B (no builder + reviewStatus === 'REVIEW_REQUIRED') → fails on both (builder exists; fresh-PR reviewDecision is "", not "REVIEW_REQUIRED")

Fix (the B path — fast, filter-only)

In NeedsAttentionList.tsx's buildItems (or upstream in overview.ts), replace blocked === 'PR review' with a derived "CMAP-done" check that handles both gated and gateless protocols:

const prReady = builder
  ? builder.blocked === 'PR review' || (builder.phase === 'verified' && hasOpenLinkedPR)
  : (pr.reviewStatus === 'REVIEW_REQUIRED' || pr.reviewStatus === '');
if (!prReady) continue;

Rename the derivation prReady (not blocked === 'PR review') so the intent is in the code, not just the head of whoever wrote it.

Acceptance criteria

  • BUGFIX builder reaches phase: verified with open PR → PR appears in Needs Attention.
  • SPIR/ASPIR/PIR/AIR builder at pr gate with open PR → PR appears in Needs Attention (existing behavior preserved).
  • Mid-CMAP builder (still running consultation, not yet at gate or verified) → PR does NOT appear (original Needs Attention surfaces PRs before CMAP reviews finish #844 invariant preserved).
  • Human-authored PR with no builder → falls back to GitHub's review-decision signal (existing behavior preserved).
  • Regression test for the BUGFIX case (builder phase = verified, no gate, open PR → included).

Out of scope

[Linked issue for the A path] tracks the canonical-porch-signal version of this fix — adding pr_ready_for_human to status.yaml so consumers don't have to derive. This issue is the immediate filter patch.

References

  • packages/dashboard/src/components/NeedsAttentionList.tsx:42-100 — the regression site
  • packages/codev/src/agent-farm/servers/overview.ts — where OverviewBuilder is shaped
  • codev-skeleton/protocols/bugfix/protocol.json — BUGFIX's gateless pr phase
  • v3.1.3 release notes — for context on what shipped
  • Live evidence: Shannon workspace PR 1846 (today)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions