- Import `extractCurrentMilestone` from `./core.cjs` into `state.cjs` - Replace `getMilestonePhaseFilter.phaseCount` usage in `buildStateFrontmatter` with a direct ROADMAP parse using the same digit-anchored pattern as `roadmap.analyze` — single source of truth for `total_phases` (#549) - Apply the same replacement in `cmdStateSync` for consistency - Add regression test: bug-549-total-phases-overcounts-with-phase-section-heading.test.cjs - Add changeset fragment: .changeset/549-total-phases-decimal-overcounting.md Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
413 B
413 B
type, pr
| type | pr |
|---|---|
| Fixed | 549 |
State progress writer no longer over-counts total_phases by 1 when the ROADMAP contains a non-phase section heading (e.g. ## Phase Overview:) that matched the looser regex in getMilestonePhaseFilter. Both buildStateFrontmatter and cmdStateSync now source total_phases from the same digit-anchored phase-heading pattern used by roadmap.analyze — single source of truth.