fix(3560): ignore archived phases for W007 warnings
This commit is contained in:
@@ -643,6 +643,26 @@ describe('validateHealth', () => {
|
||||
expect(w006s.some(w => String(w.message).includes('Phase 7'))).toBe(false);
|
||||
});
|
||||
|
||||
it('does not emit W007 for archived milestone-only phase dirs (#3560)', async () => {
|
||||
await createHealthyPlanning();
|
||||
await writeFile(join(tmpDir, '.planning', 'ROADMAP.md'), [
|
||||
'# Roadmap',
|
||||
'',
|
||||
'## v1.1: Current',
|
||||
'',
|
||||
'### Phase 21: Active',
|
||||
'',
|
||||
].join('\n'));
|
||||
await mkdir(join(tmpDir, '.planning', 'phases', '21-active'), { recursive: true });
|
||||
await mkdir(join(tmpDir, '.planning', 'milestones', 'v1.0-phases', '02-old-shipped-phase'), { recursive: true });
|
||||
|
||||
const result = await validateHealth([], tmpDir);
|
||||
const data = result.data as Record<string, unknown>;
|
||||
const warnings = data.warnings as Array<Record<string, unknown>>;
|
||||
const w007s = warnings.filter(w => w.code === 'W007');
|
||||
expect(w007s.some(w => String(w.message).includes('Phase 02'))).toBe(false);
|
||||
});
|
||||
|
||||
it('does not emit W006 for unchecked future phases with no directory (#3559)', async () => {
|
||||
await createHealthyPlanning();
|
||||
await writeFile(join(tmpDir, '.planning', 'ROADMAP.md'), [
|
||||
|
||||
Reference in New Issue
Block a user