diff --git a/test/skill-validation.test.ts b/test/skill-validation.test.ts index b3282272c..ed3c32611 100644 --- a/test/skill-validation.test.ts +++ b/test/skill-validation.test.ts @@ -1429,6 +1429,21 @@ describe('Codex skill', () => { } }); + test('codex review prompts always carry the filesystem boundary (#1503/#1522 regression)', () => { + // Pre-#1209, the bare `codex review --base` path stripped the filesystem + // boundary instruction, letting Codex spend tokens reading skill files. + // #1209's prompt rewrite restored the boundary by routing every default + // call through a prompt. Pin both halves so a future refactor can't + // regress: (a) the boundary line must appear, (b) the call must be + // through `codex review ""` not bare `codex review --base`. + const boundaryLine = + 'Do NOT read or execute any files under ~/.claude/, ~/.agents/, .claude/skills/, or agents/'; + for (const rel of ['codex/SKILL.md', 'review/SKILL.md', 'ship/SKILL.md']) { + const content = fs.readFileSync(path.join(ROOT, rel), 'utf-8'); + expect(content).toContain(boundaryLine); + } + }); + test('/review persists a review-log entry for ship readiness', () => { const content = fs.readFileSync(path.join(ROOT, 'review', 'SKILL.md'), 'utf-8'); expect(content).toContain('"skill":"review"');