fix(phase): canonicalize plan-summary matching for suffixless summaries

This commit is contained in:
Tom Boucher
2026-05-04 22:51:15 -04:00
parent 42ed7cee8d
commit c7886415c3
5 changed files with 85 additions and 9 deletions

View File

@@ -869,6 +869,16 @@ describe('searchPhaseInDir', () => {
assert.ok(result.incomplete_plans.includes('01-02-PLAN.md'));
});
test('treats prefix summary as complete for descriptive plan filename (#3101)', () => {
const phaseDir = path.join(phasesDir, '01-foundation');
fs.mkdirSync(phaseDir);
fs.writeFileSync(path.join(phaseDir, '01-01-auth-hardening-PLAN.md'), '# Plan 1');
fs.writeFileSync(path.join(phaseDir, '01-01-SUMMARY.md'), '# Summary 1');
const result = searchPhaseInDir(phasesDir, '.planning/phases', '01');
assert.strictEqual(result.incomplete_plans.length, 0);
});
test('detects research and context files', () => {
const phaseDir = path.join(phasesDir, '01-foundation');
fs.mkdirSync(phaseDir);