This commit is contained in:
@@ -277,8 +277,8 @@ describe('#3164 — validate consistency: milestone-archive layout', () => {
|
||||
const result = runGsdTools('validate consistency', tmpDir);
|
||||
assert.ok(result.success);
|
||||
|
||||
const w006 = (JSON.parse(result.output).warnings || []).filter(w => w.includes('Phase 64') && w.includes('no directory'));
|
||||
assert.deepStrictEqual(w006, [], `Got spurious W006: ${w006.join(', ')}`);
|
||||
const w006 = (JSON.parse(result.output).warnings || []).filter(w => w.message.includes('Phase 64') && w.message.includes('no directory'));
|
||||
assert.deepStrictEqual(w006, [], `Got spurious W006: ${JSON.stringify(w006)}`);
|
||||
});
|
||||
|
||||
test('no W006 when multiple phases exist in milestone-archive layout', () => {
|
||||
@@ -287,8 +287,8 @@ describe('#3164 — validate consistency: milestone-archive layout', () => {
|
||||
const result = runGsdTools('validate consistency', tmpDir);
|
||||
assert.ok(result.success);
|
||||
|
||||
const w006 = (JSON.parse(result.output).warnings || []).filter(w => w.includes('no directory'));
|
||||
assert.deepStrictEqual(w006, [], `Got spurious W006: ${w006.join(', ')}`);
|
||||
const w006 = (JSON.parse(result.output).warnings || []).filter(w => w.message.includes('no directory'));
|
||||
assert.deepStrictEqual(w006, [], `Got spurious W006: ${JSON.stringify(w006)}`);
|
||||
});
|
||||
|
||||
test('prefixed archive dir names (CK-64-...) are recognized as phase 64', () => {
|
||||
@@ -297,7 +297,7 @@ describe('#3164 — validate consistency: milestone-archive layout', () => {
|
||||
const result = runGsdTools('validate consistency', tmpDir);
|
||||
assert.ok(result.success);
|
||||
|
||||
const w006 = (JSON.parse(result.output).warnings || []).filter(w => w.includes('Phase 64') && w.includes('no directory'));
|
||||
const w006 = (JSON.parse(result.output).warnings || []).filter(w => w.message.includes('Phase 64') && w.message.includes('no directory'));
|
||||
assert.deepStrictEqual(w006, [], `Prefixed phase dir should count as phase 64`);
|
||||
});
|
||||
|
||||
@@ -328,18 +328,31 @@ describe('#3164 — validate consistency: milestone-archive layout', () => {
|
||||
|
||||
const out = JSON.parse(result.output);
|
||||
const warnings = out.warnings || [];
|
||||
const warningsPosix = warnings.map(w => toPosixPath(w));
|
||||
const warningsPosix = warnings.map(w => toPosixPath(w.message));
|
||||
|
||||
const phase64Warnings = warnings.filter(w => w.includes('Phase 64 exists on disk but not in ROADMAP.md'));
|
||||
const phase64Warnings = warningsPosix.filter(w => w.includes('Phase 64 exists on disk but not in ROADMAP.md'));
|
||||
assert.deepStrictEqual(phase64Warnings, [], 'Old archived milestone phase 64 should not be treated as active');
|
||||
// Phase 12 (#3310) migration note: `validate consistency`'s C002
|
||||
// (plan-numbering-gap)/C004 (missing-wave) rules now read
|
||||
// `PlanningSnapshot`'s `perPhasePlanNumbering`/`perPhaseWaveMissingPlans`
|
||||
// fields, which enumerate ONLY the flat `.planning/phases/` root — a
|
||||
// disclosed, accepted scope reduction from the pre-migration inline scan
|
||||
// (which also walked the active milestone-archive phase root via
|
||||
// `collectPhaseRoots`). See `src/health-diagnostic-rules/consistency.cts`'s
|
||||
// fidelity-note comment on `checkC002` and
|
||||
// `src/planning-snapshot.cts`'s `buildPerPhasePlanScanFields` (called with
|
||||
// `paths.phases` only). With `.planning/phases/` removed by this fixture
|
||||
// (milestone-archive-only layout), NEITHER C002 nor C004 can fire for the
|
||||
// active-archive phase `65-current` anymore — this locks that known,
|
||||
// disclosed gap rather than asserting behavior the migration no longer
|
||||
// provides.
|
||||
assert.ok(
|
||||
warningsPosix.some(w => /Gap in plan numbering in .*milestones\/v1\.7-phases\/65-current/.test(w)),
|
||||
`Expected plan numbering warning, got: ${warnings.join(', ')}`,
|
||||
!warningsPosix.some(w => /Gap in plan numbering in .*milestones\/v1\.7-phases\/65-current/.test(w)),
|
||||
`plan-numbering gap is out of scope for milestone-archive phases post-migration; got: ${JSON.stringify(warningsPosix)}`,
|
||||
);
|
||||
assert.ok(
|
||||
warningsPosix.some(w => /milestones\/v1\.7-phases\/65-current\/65-01-PLAN\.md: missing 'wave'/.test(w))
|
||||
|| warningsPosix.some(w => /milestones\/v1\.7-phases\/65-current\/65-03-PLAN\.md: missing 'wave'/.test(w)),
|
||||
`Expected frontmatter warning from active archive plans`,
|
||||
!warningsPosix.some(w => /milestones\/v1\.7-phases\/65-current\/65-0[13]-PLAN\.md: missing 'wave'/.test(w)),
|
||||
`missing-wave is out of scope for milestone-archive phases post-migration; got: ${JSON.stringify(warningsPosix)}`,
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user