Skip to content

fix: premature milestone complete when phases lack directories (#754)#801

Open
ethan-hurst wants to merge 1 commit intogsd-build:mainfrom
ethan-hurst:fix/premature-milestone-complete
Open

fix: premature milestone complete when phases lack directories (#754)#801
ethan-hurst wants to merge 1 commit intogsd-build:mainfrom
ethan-hurst:fix/premature-milestone-complete

Conversation

@ethan-hurst
Copy link
Contributor

What

Fix phase complete and init milestone-op to check ROADMAP.md for phases that haven't been planned yet (no directories), preventing premature "milestone complete" status.

Why

Phases defined in the ROADMAP but not yet planned have no .planning/phases/ directory. Both commands only counted directories, so completing phase 9 of a 13-phase milestone would report "milestone complete" because phases 10-13 had no directories yet. Fixes #754.

Testing

  • Tested on macOS
  • Tested on Windows
  • Tested on Linux

Regression tests added:

  • phase complete: 4-phase ROADMAP with only 2 directories — completing phase 9 correctly reports is_last_phase: false and next_phase: 10
  • init milestone-op: 4-phase ROADMAP with 2 completed directories — correctly reports phase_count: 4, all_phases_complete: false

Full suite: 434/434 passing (432 existing + 2 new)

Checklist

  • Follows GSD style (no enterprise patterns, no filler)
  • Updates CHANGELOG.md for user-facing changes
  • No unnecessary dependencies added
  • Works on Windows (backslash paths tested)

Breaking Changes

None

…mplete (gsd-build#754)

phase complete and init milestone-op only counted phase directories,
missing phases defined in the ROADMAP that hadn't been planned yet.
This caused premature "milestone complete" status after executing
earlier phases when later phases had no directories.

Now falls back to parsing ROADMAP.md headings when no next directory
is found, correctly detecting remaining unplanned phases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Milestone reported as complete but still phases to go

1 participant