Files
msd-core/src
Tom Boucher 5867996a6a fix(#2200): scope phase-complete roadmap writes to the current milestone (#2230)
* fix(#2200): scope phase-complete roadmap writes to the current milestone

runPhaseCompleteTransaction's roadmap mutators ran unanchored / un-milestone-
scoped / first-match over the whole ROADMAP: the phase-checkbox flip could check
a bullet inside a backticked prose literal or an earlier Backlog entry instead of
the closing phase's bullet (a transposition), and the Plans-count writer could
bind to a same-numbered phase in a shipped milestone.

- Add currentMilestoneRawRanges(content, cwd) to roadmap-parser.cts: raw
  [start,end) offsets of the active milestone's region(s) (primary section + the
  optional Phase Details section), mirroring extractCurrentMilestone's selection.
- Line-anchor the phase checkbox pattern (^ + m flag) so an inline / backticked
  prose literal cannot match.
- Apply the phase-checkbox flip, the Plans-count write, and the per-plan checkbox
  flips ONLY within the current milestone window(s) via a mutateMilestonePhase
  helper (splice later windows first so offsets stay stable). Fall back to whole-
  content mutation when there is no versioned active milestone (prior behaviour).

The Progress-table writer stays as-is (already scoped to ## Progress, #2012).

Closes #2200

* docs(#2200): add changeset fragment

* docs(#2200): backfill PR number in changeset fragment
2026-07-13 00:24:50 -04:00
..