From 4699573a92d760dce7a8e4a430c6b446c55e7d9a Mon Sep 17 00:00:00 2001 From: garrytan Date: Mon, 26 Oct 2026 14:11:39 +0000 Subject: [PATCH] test: pin the pointer entry in the loader skip lists; drop a carve-safety tautology (ship review, run 4) A new INVOKE_SKILL test checks that plan-ceo-review's inline /office-hours skip list and autoplan's section skip list both name the shared-preamble pointer heading, and that office-hours and the four plan reviews carry it. The carve-safety "sanity" assertion repeated the predicate discoverSkills() now uses to set sectionsDir, so it could never fail; it is removed. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --- test/auq-format-always-loaded.test.ts | 2 -- test/gen-skill-docs.test.ts | 11 ++++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/test/auq-format-always-loaded.test.ts b/test/auq-format-always-loaded.test.ts index 4ee372853..e252cd752 100644 --- a/test/auq-format-always-loaded.test.ts +++ b/test/auq-format-always-loaded.test.ts @@ -183,8 +183,6 @@ describe('AUQ format is always-loaded (token-reduction safety net)', () => { expect(body).toMatch(/##\s*AskUserQuestion Format/i); expect(body).toMatch(/ELI10\s*:/i); expect(body).toMatch(/Recommendation\s*:/i); - // sanity: confirm there really is a section dir we're guarding against - expect(fs.readdirSync(sectionsDir!).some(f => f.endsWith('.md') && f !== SHARED_PREAMBLE_FILE)).toBe(true); }); } diff --git a/test/gen-skill-docs.test.ts b/test/gen-skill-docs.test.ts index 46140288f..e98d0d9c4 100644 --- a/test/gen-skill-docs.test.ts +++ b/test/gen-skill-docs.test.ts @@ -2157,6 +2157,15 @@ describe('INVOKE_SKILL resolver', () => { expect(ceoContent).toContain('AskUserQuestion Format'); }); + test('loader skip lists name the shared-preamble pointer that the loaded skills carry', () => { + const entry = `- ${SHARED_POINTER_HEADING.replace(/^## /, '')}\n`; + expect(ceoContent).toContain(entry); + expect(fs.readFileSync(path.join(ROOT, 'autoplan', 'SKILL.md'), 'utf-8')).toContain(entry); + for (const skill of ['office-hours', 'plan-ceo-review', 'plan-design-review', 'plan-devex-review', 'plan-eng-review']) { + expect(fs.readFileSync(path.join(ROOT, skill, 'SKILL.md'), 'utf-8'), skill).toContain(`\n${SHARED_POINTER_HEADING}\n`); + } + }); + test('INVOKE_SKILL output includes error handling', () => { expect(ceoContent).toContain('If unreadable'); expect(ceoContent).toContain('Could not load'); @@ -3405,7 +3414,7 @@ describe('Factory generation (--host factory)', () => { import { ALL_HOST_CONFIGS, getExternalHosts } from '../hosts/index'; import { sliceBetween } from './helpers/skill-fixture'; -import { readSkillStartup } from './helpers/skill-startup'; +import { readSkillStartup, SHARED_POINTER_HEADING } from './helpers/skill-startup'; describe('Parameterized host smoke tests', () => { // Every external host was rendered up front by the module-level