fix(test): repoint bws skillmd-* setup-block assertions to browse/SKILL.md

The skillmd-setup-discovery / -no-local-binary / -outside-git E2E tests extracted
the `## SETUP`→`## IMPORTANT` browse binary-discovery block from the root SKILL.md.
P2 moved that block to browse/SKILL.md (end anchor is now `## Core QA Patterns`),
so the slice came back empty and the `browse/dist/browse` guard failed. Repoint to
browse/SKILL.md. Verified: 7/7 e2e-browse pass locally.
This commit is contained in:
Garry Tan 2026-06-24 07:44:49 -07:00
parent 22882c913b
commit 48254d7830
No known key found for this signature in database
GPG Key ID: C1F69E85C74EFE1D
1 changed files with 12 additions and 6 deletions

View File

@ -84,9 +84,11 @@ Report what each command returned.`,
}, 90_000);
testConcurrentIfSelected('skillmd-setup-discovery', async () => {
const skillMd = fs.readFileSync(path.join(ROOT, 'SKILL.md'), 'utf-8');
// P2 (v1.2.0): the browse SETUP/binary-discovery block moved from the root
// router to browse/SKILL.md (end anchor is now ## Core QA Patterns).
const skillMd = fs.readFileSync(path.join(ROOT, 'browse', 'SKILL.md'), 'utf-8');
const setupStart = skillMd.indexOf('## SETUP');
const setupEnd = skillMd.indexOf('## IMPORTANT');
const setupEnd = skillMd.indexOf('## Core QA Patterns');
const setupBlock = skillMd.slice(setupStart, setupEnd);
// Guard: verify we extracted a valid setup block
@ -116,9 +118,11 @@ Report whether it worked.`,
// Create a tmpdir with no browse binary — no local .claude/skills/gstack/browse/dist/browse
const emptyDir = fs.mkdtempSync(path.join(os.tmpdir(), 'skill-e2e-empty-'));
const skillMd = fs.readFileSync(path.join(ROOT, 'SKILL.md'), 'utf-8');
// P2 (v1.2.0): the browse SETUP/binary-discovery block moved from the root
// router to browse/SKILL.md (end anchor is now ## Core QA Patterns).
const skillMd = fs.readFileSync(path.join(ROOT, 'browse', 'SKILL.md'), 'utf-8');
const setupStart = skillMd.indexOf('## SETUP');
const setupEnd = skillMd.indexOf('## IMPORTANT');
const setupEnd = skillMd.indexOf('## Core QA Patterns');
const setupBlock = skillMd.slice(setupStart, setupEnd);
const result = await runSkillTest({
@ -151,9 +155,11 @@ Report the exact output. Do NOT try to fix or install anything — just report w
// Create a tmpdir outside any git repo
const nonGitDir = fs.mkdtempSync(path.join(os.tmpdir(), 'skill-e2e-nogit-'));
const skillMd = fs.readFileSync(path.join(ROOT, 'SKILL.md'), 'utf-8');
// P2 (v1.2.0): the browse SETUP/binary-discovery block moved from the root
// router to browse/SKILL.md (end anchor is now ## Core QA Patterns).
const skillMd = fs.readFileSync(path.join(ROOT, 'browse', 'SKILL.md'), 'utf-8');
const setupStart = skillMd.indexOf('## SETUP');
const setupEnd = skillMd.indexOf('## IMPORTANT');
const setupEnd = skillMd.indexOf('## Core QA Patterns');
const setupBlock = skillMd.slice(setupStart, setupEnd);
const result = await runSkillTest({