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>
This commit is contained in:
garrytanandcapy-ai[bot] committed 2026-10-26 14:11:39 +00:00
1 parent 5c29dac287
commit 4699573a92
2 files changed
+10 -3

No files matched your search

-2
View File
@@ -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);
});
}
+10 -1
View File
@@ -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