Problem
Needs Attention has accreted a builder-state-derived model that is fragile and wrong. It surfaces builder rows (not just PRs), keeps merged PRs showing, and hides ready PRs — three faces of one root cause: bugfix attention is derived from porch terminal/builder state (derivePrReady's bugfix && phase==='verified' fallback, the pr_ready_for_human field, and the defensive builder-emit branch in NeedsAttentionList.buildItems) instead of from the PR.
Key finding: the universal signal already exists
Every PR-producing protocol already has a pr gate — bugfix, air (on the pr phase), spir, aspir, pir (on the review phase). The pr gate going pending (set by porch after the PR phase / CMAP completes) is the uniform "PR ready for human, after CMAP" signal across all protocols. No new marker/abstraction is needed.
The entire mess traces to one deviation: a gateless bugfix variant (observed on an external adopter, codev 3.1.4, 4-phase investigate/fix/verify/pr with no pr gate). With no pr gate, the dashboard fell back to the fragile bugfix && verified derivation + builder-emit. The gated path never broke (it self-heals through rollback by re-requesting the pr gate).
Desired behavior
Needs Attention = (A) open PRs whose linked builder has a pending pr gate, surfaced as PR rows ∪ (B) genuine pre-PR/post-merge human gate rows (spec-approval, plan-approval, dev-approval, verify-approval). Never a builder standing in for a PR.
Direction (spec to flesh this out)
- Surface open PRs whose builder's
pr gate is pending (the universal post-CMAP signal). Emit PR rows only — find the open PR; if not found (cache miss), do not emit a builder row.
- Delete the
bugfix && phase==='verified' fallback in derivePrReady and the builder-emit branch in NeedsAttentionList.buildItems. These exist only to cope with the gateless case.
- Keep the gate-row path for spec/plan/dev/verify-approval, and the unaffiliated/human-PR
reviewDecision === REVIEW_REQUIRED fallback.
- A protocol must carry a
pr gate for its PR to surface (the universal contract). Gateless PR-producing variants won't surface PR rows by design — adopters use the pr-gated protocol.
- EXPERIMENT/MAINTAIN don't follow the CMAP-PR pattern (they have
experiment-complete/maintain-complete gates) — they surface via those completion gates, not PR rows. State this explicitly.
Relationships
Out of scope
- Per-protocol bespoke markers (the
pr gate is the universal signal).
- Changing pre-PR gate semantics.
Problem
Needs Attention has accreted a builder-state-derived model that is fragile and wrong. It surfaces builder rows (not just PRs), keeps merged PRs showing, and hides ready PRs — three faces of one root cause: bugfix attention is derived from porch terminal/builder state (
derivePrReady'sbugfix && phase==='verified'fallback, thepr_ready_for_humanfield, and the defensive builder-emit branch inNeedsAttentionList.buildItems) instead of from the PR.Key finding: the universal signal already exists
Every PR-producing protocol already has a
prgate — bugfix, air (on theprphase), spir, aspir, pir (on thereviewphase). Theprgate going pending (set by porch after the PR phase / CMAP completes) is the uniform "PR ready for human, after CMAP" signal across all protocols. No new marker/abstraction is needed.The entire mess traces to one deviation: a gateless bugfix variant (observed on an external adopter, codev 3.1.4, 4-phase
investigate/fix/verify/prwith noprgate). With noprgate, the dashboard fell back to the fragilebugfix && verifiedderivation + builder-emit. The gated path never broke (it self-heals through rollback by re-requesting theprgate).Desired behavior
Needs Attention = (A) open PRs whose linked builder has a pending
prgate, surfaced as PR rows ∪ (B) genuine pre-PR/post-merge human gate rows (spec-approval, plan-approval, dev-approval, verify-approval). Never a builder standing in for a PR.Direction (spec to flesh this out)
prgate ispending(the universal post-CMAP signal). Emit PR rows only — find the open PR; if not found (cache miss), do not emit a builder row.bugfix && phase==='verified'fallback inderivePrReadyand the builder-emit branch inNeedsAttentionList.buildItems. These exist only to cope with the gateless case.reviewDecision === REVIEW_REQUIREDfallback.prgate for its PR to surface (the universal contract). Gateless PR-producing variants won't surface PR rows by design — adopters use the pr-gated protocol.experiment-complete/maintain-completegates) — they surface via those completion gates, not PR rows. State this explicitly.Relationships
recentlyMergedIssueIds): becomes far less load-bearing once merged PRs drop via open-only + no builder-emit; the spec should assess whether it's still needed or removable.verified→completerename): its Needs-Attention parts (req 8pr_readyre-derivation,derivePrReadyrework) become unnecessary under this model. The terminal-state rename stands on its own as honesty work; reconcile/descope Terminal state 'verified' over-promises: split back into 'complete' (phases done) vs 'verified' (verify-approval passed) #919 accordingly.Out of scope
prgate is the universal signal).