Skip to content

Commit 894efc7

Browse files
committed
fix: cover the gitignored clawhub SKILL.md in dispatch tests only when present
clawhub-upload/SKILL.md is gitignored and absent on a fresh clone, so the five Stop-scalar shape tests raised FileNotFoundError on every CI leg while passing locally. Same present-only convention as test_skill_frontmatter_valid.py. The scalar behavior tests passed on all three legs, including the first macOS run, so the v3.8.0 dispatch fix itself is verified on every platform.
1 parent 9911a64 commit 894efc7

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

tests/test_stop_hook_dispatch.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
SKILL_DIR = REPO_ROOT / "skills" / "planning-with-files"
4040

4141
# Every SKILL.md that carries a Stop scalar (canonical + language variants +
42-
# IDE mirrors + clawhub upload copy). Kept in sync with the parity surfaces.
42+
# IDE mirrors). Kept in sync with the parity surfaces.
4343
ALL_STOP_SKILL_FILES = [
4444
REPO_ROOT / "skills" / "planning-with-files" / "SKILL.md",
4545
REPO_ROOT / "skills" / "planning-with-files-ar" / "SKILL.md",
@@ -54,8 +54,13 @@
5454
REPO_ROOT / ".factory" / "skills" / "planning-with-files" / "SKILL.md",
5555
REPO_ROOT / ".mastracode" / "skills" / "planning-with-files" / "SKILL.md",
5656
REPO_ROOT / ".opencode" / "skills" / "planning-with-files" / "SKILL.md",
57-
REPO_ROOT / "clawhub-upload" / "SKILL.md",
5857
]
58+
# clawhub-upload/SKILL.md is gitignored and may be absent on a fresh clone
59+
# (same convention as test_skill_frontmatter_valid.py); cover it only when
60+
# present so CI and local runs agree.
61+
_CLAWHUB_SKILL = REPO_ROOT / "clawhub-upload" / "SKILL.md"
62+
if _CLAWHUB_SKILL.is_file():
63+
ALL_STOP_SKILL_FILES.append(_CLAWHUB_SKILL)
5964

6065
HOOK_RE = r'Stop:\n(?:.*?\n)*?\s*command: "((?:[^"\\]|\\.)*)"'
6166

0 commit comments

Comments
 (0)