fix(3559): preserve phase suffixes in W006/W007 normalization

This commit is contained in:
Tom Boucher
2026-05-15 14:46:11 -04:00
parent 2ce2685b42
commit 9052ed309c
2 changed files with 46 additions and 7 deletions

View File

@@ -667,6 +667,29 @@ describe('validateHealth', () => {
expect(w006s.some(w => String(w.message).includes('Phase 22'))).toBe(false);
});
it('does not alias 22A to 22 when suppressing W006 (#3565)', async () => {
await createHealthyPlanning();
await writeFile(join(tmpDir, '.planning', 'ROADMAP.md'), [
'# Roadmap',
'',
'## v1.1: Current',
'',
'- [x] **Phase 22: Started phase**',
'- [ ] **Phase 22A: Future variant**',
'',
'### Phase 22: Started phase',
'',
'### Phase 22A: Future variant',
'',
].join('\n'));
const result = await validateHealth([], tmpDir);
const data = result.data as Record<string, unknown>;
const warnings = data.warnings as Array<Record<string, unknown>>;
const w006s = warnings.filter(w => w.code === 'W006');
expect(w006s.some(w => String(w.message).includes('Phase 22 in ROADMAP.md'))).toBe(true);
});
it('does not emit I001 when plan file has descriptor but summary uses canonical stem (#3473)', async () => {
await createHealthyPlanning();
await mkdir(join(tmpDir, '.planning', 'phases', '68-bug-surface'), { recursive: true });