From 9963deac371d5a9209bb1d4566d29f56eb7ec8eb Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Sat, 15 Aug 2026 08:50:03 -0700 Subject: [PATCH] =?UTF-8?q?test(evals):=20opus-47=20discovery=20fixtures?= =?UTF-8?q?=20via=20extractSkillHead=20=E2=80=94=20~95%=20smaller?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Routing/fanout tests only read frontmatter + opening lines of the 14 installed skills (review 1871->54, office-hours 1706->80). Co-Authored-By: Claude Fable 5 --- test/skill-e2e-opus-47.test.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/skill-e2e-opus-47.test.ts b/test/skill-e2e-opus-47.test.ts index 14e8c8d39..328ebf42a 100644 --- a/test/skill-e2e-opus-47.test.ts +++ b/test/skill-e2e-opus-47.test.ts @@ -20,6 +20,7 @@ import { describe, test, expect, afterAll } from 'bun:test'; import { runSkillTest } from './helpers/session-runner'; import { EvalCollector } from './helpers/eval-store'; +import { extractSkillHead } from './helpers/skill-fixture'; import { spawnSync } from 'child_process'; import * as fs from 'fs'; import * as path from 'path'; @@ -72,14 +73,17 @@ function mkEvalRoot(suffix: string, includeOverlay: boolean): string { throw new Error(`gen-skill-docs failed: ${result.stderr}`); } - // Install per-skill SKILL.md files for Skill tool discovery. + // Install per-skill SKILL.md files for Skill tool discovery. Routing only + // reads the frontmatter (name + description), so install frontmatter + the + // first ~30 body lines instead of the full 1000-1900-line files + // (CLAUDE.md: "E2E test fixtures: extract, don't copy"). const skillsDir = path.join(tmp, '.claude', 'skills'); for (const skill of INSTALLED_SKILLS) { const src = path.join(ROOT, skill, 'SKILL.md'); if (!fs.existsSync(src)) continue; const destDir = path.join(skillsDir, skill); fs.mkdirSync(destDir, { recursive: true }); - fs.copyFileSync(src, path.join(destDir, 'SKILL.md')); + fs.writeFileSync(path.join(destDir, 'SKILL.md'), extractSkillHead(src)); } // Extract the opus-4-7 model-overlay content from the checked-in file