fix(#3033): resolve zero-plan split-parent phase as complete when roadmap checkbox is checked (#3114)

* fix(#3033): resolve zero-plan split-parent phase as complete when roadmap checkbox is checked

A phase split into sub-phases (parent kept as shared context, zero plans
by design) was permanently stuck as 'researched' because the roadmap-
checkbox override at line 2266 required completion.phase_complete (derived
from plan/summary counts), which is always false for zero-plan phases.
The parent was permanently eligible for current-phase selection and
re-planning recommendations.

The override now fires when roadmapComplete AND planCount === 0 (the
split-parent shape), treating it as complete regardless of the plan-count
derivation. A zero-plan phase whose checkbox is still unchecked stays
in-progress (researched). Ordinary phases with plans are unchanged.

* chore(#3033): backfill changeset PR number 3114

---------

Co-authored-by: sim <sim@local>
This commit is contained in:
Tom Boucher
2026-08-06 06:44:28 -04:00
committed by GitHub
parent 2061919b1a
commit fb3ee56651
2 changed files with 14 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
---
type: Fixed
pr: 3114
---
**A split-parent phase marked complete in the ROADMAP is no longer permanently reported as `current_phase`** — a phase split into sub-phases (parent kept as shared context, zero plans by design) was stuck as `researched` because the roadmap-checkbox override required `completion.phase_complete` (always false for zero-plan phases). The override now fires for zero-plan phases when the roadmap checkbox is checked. (#3033)

View File

@@ -2263,7 +2263,15 @@ function cmdInitManager(cwd: string, raw: boolean): void {
}
const roadmapComplete = _checkboxStates.get(phaseNum) || false;
if (roadmapComplete && completion.phase_complete && diskStatus !== 'complete') {
// #3033: a zero-plan phase (split parent — intentionally plan-less, holds
// shared context for sub-phases) whose roadmap checkbox is marked complete
// must resolve as complete. The original gate required completion.phase_complete
// (derived from plan/summary counts), which is always false for zero-plan
// phases — so the checkbox override never fired and the parent was permanently
// stuck as 'researched' (an in-progress state eligible for current-phase
// selection). Now: when the roadmap marks it complete AND it has zero plans,
// treat it as complete regardless of the plan-count derivation.
if (roadmapComplete && (completion.phase_complete || planCount === 0) && diskStatus !== 'complete') {
diskStatus = 'complete';
}