Skip to content

Commit 1d038a3

Browse files
authored
fix(test-classifier): give the agent an ABSOLUTE skill path (first-pass Read hit) (#69)
The prompt told the agent the skill was at '.skills/test-classifier/SKILL.md' — a path relative to the bundle root (testing/classifier/), not the repo root. But the agent's CWD is the repo root, so the first Read always 404'd and the agent burned a recovery 'find' on every run. Set SKILL_PATH_CANONICAL to the absolute ${SKILLS_ROOT}/test-classifier/SKILL.md (SKILLS_ROOT is already resolved by walking up from this script), which resolves regardless of the agent's CWD or where the bundle is vendored. Also fix the second stale 'test-classifier/SKILL.md' reference later in the prompt to point at the path above.
1 parent 2f07ff3 commit 1d038a3

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

testing/classifier/.skills/test-classifier/scripts/test-classifier-dispatcher.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,12 @@ SKILL_HUMAN_NAME="AI Test Classifier (application-bug / test-bug / flaky / envir
7575
# Skill text lives in-repo and is the canonical source of truth (this bundle owns
7676
# its skill — no external fetch).
7777
BUNDLE_ROOT="$(cd "${SKILLS_ROOT}/.." && pwd)" # .skills → classifier (bundle root)
78-
SKILL_PATH_CANONICAL=".skills/test-classifier/SKILL.md"
78+
# Absolute path to the skill file. MUST be absolute: the agent's CWD is the repo
79+
# root, but the bundle lives under testing/classifier/ (and can be vendored at any
80+
# depth), so a path relative to the bundle root would not resolve from the agent's
81+
# CWD — it would 404 on the first Read and force a recovery `find`. Absolute always
82+
# resolves regardless of where the bundle sits or where the agent is invoked.
83+
SKILL_PATH_CANONICAL="${SKILLS_ROOT}/test-classifier/SKILL.md"
7984

8085
# ── Classifier-specific arg parsing ────────────────────────────────────────
8186
# We intercept our own flags first, then pass the remainder to the shared
@@ -369,7 +374,7 @@ the AI_REVIEW_DIFF_RANGE env var (base→HEAD normally; base→index, i.e. commi
369374
git diff \$AI_REVIEW_DIFF_RANGE --unified=5
370375
git diff \$AI_REVIEW_DIFF_RANGE --name-only
371376
372-
Follow the skill instructions in test-classifier/SKILL.md exactly:
377+
Follow the skill instructions in that SKILL.md file (path above) exactly:
373378
374379
${SIGNAL_STEP}
375380
2. Collect the change-under-test diff (above).

0 commit comments

Comments
 (0)