fix(#416): return null when active milestone has no archive; tighten **Milestone:** regex (#419)

* fix(#416): return null when active milestone has no archive (no fall-through to prior milestone's archive)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(#416): handle bold-formatted Milestone: field in archive dir resolver

The STATE.md regex in getActiveMilestoneArchiveDir failed to extract the
version from **Milestone:** vX.Y format (bold wraps the label+colon).
The old pattern captured '**' instead of the version, causing the
milestone→archive lookup to produce a false candidate path, then return
null (post-fix behavior) instead of falling through to the version-sort
fallback — breaking the #3164 consistency scanner tests.

Fix: extend the regex to skip optional trailing '**' after the colon so
both 'milestone: vX.Y' and '**Milestone:** vX.Y' parse correctly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Tom Boucher
2026-05-27 22:57:42 -04:00
committed by GitHub
parent ec0a32ea07
commit e4aca8dab0
3 changed files with 236 additions and 5 deletions

View File

@@ -0,0 +1,5 @@
---
type: Fixed
pr: 416
---
`getActiveMilestoneArchiveDir` no longer falls back to the newest archive directory when the active milestone has no archive yet — returns `null` so the verifier no longer reports prior-milestone phases as "active" (eliminates W007 false positives during the flat→archive transition).