From 48254d78303ff70b11fb9b82565293a4b16c5607 Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Wed, 24 Jun 2026 07:44:49 -0700 Subject: [PATCH] fix(test): repoint bws skillmd-* setup-block assertions to browse/SKILL.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- test/skill-e2e-bws.test.ts | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/test/skill-e2e-bws.test.ts b/test/skill-e2e-bws.test.ts index af002b471..2a991faf5 100644 --- a/test/skill-e2e-bws.test.ts +++ b/test/skill-e2e-bws.test.ts @@ -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({