Skip to content

Commit 52e0791

Browse files
committed
Tune test-assistants.sh smoke verdicts
Three fixes so a healthy run scores green: Smoke mode is now an explicit lightweight load-check. The appended instruction said 'begin authoring the YAML', which led Claude to attempt the full build and never stop to report before the cap (both prior runs), while the assistants that ran ~2 discovery scripts and reported passed. It now says: run one or two discovery commands to confirm the skill and its scripts work, then STOP and report — do not author YAML or deploy. classify() no longer treats a fusion script's argparse error (e.g. 'action_search.py: error: unrecognized arguments') as a decisive terminal flag failure — that is recoverable, and an assistant that fixes the args and reports a successful command now passes. Only an assistant-CLI launch-flag rejection ('Error: unknown flag ...') is decisive. An account/quota exhaustion (e.g. Antigravity's 'Individual quota reached — upgrade your subscription') is now an environment SKIP, like a missing CLI, rather than a FAIL: it is not a skills or harness fault and cannot be fixed by re-running. SKIPs are not counted among tested assistants and never fail the run; the summary reports them separately. test-assistants-classify.sh covers all three (24 cases): a recovered script-argparse run passes, a true launch-flag rejection is decisive flag, and a quota message is SKIP|account. shellcheck clean; prompt-consistency gate still holds (PROMPT is unchanged; only the appended report instructions changed).
1 parent 140b908 commit 52e0791

2 files changed

Lines changed: 60 additions & 24 deletions

File tree

test-assistants-classify.sh

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,26 @@ SKILLS: skills/deployment/SKILL.md
7575
COMMANDS: query_workflows.py => FAIL: 401
7676
BLOCKER: 401 Unauthorized"
7777

78-
expect_verdict "rejected flag is flag" 0 "FAIL|flag" \
79-
"validate.py: error: unrecognized arguments: --bogus
78+
expect_verdict "an assistant-CLI launch-flag rejection is decisive flag" 0 "FAIL|flag" \
79+
"Error: unknown flag: --bogus-launch-flag
80+
See 'claude --help' for usage."
81+
82+
# A fusion SCRIPT's argparse error is recoverable, not terminal: if the assistant fixes
83+
# the args and reports a successful command, the run passes. The decisive log-scan must
84+
# NOT treat it like an assistant-CLI launch-flag rejection.
85+
expect_verdict "a recovered script argparse error is not terminal" 0 "PASS|ok" \
86+
"action_search.py: error: unrecognized arguments: event query
87+
Let me fix that and re-run with the --search flag.
8088
FUSION-REPORT
81-
STATUS: BLOCKED
82-
SKILLS: NONE
83-
COMMANDS: validate.py => FAIL: bad flag
84-
BLOCKER: unrecognized arguments"
89+
STATUS: WORKING
90+
SKILLS: skills/authoring/SKILL.md
91+
COMMANDS: action_search.py => OK
92+
BLOCKER: NONE"
93+
94+
# An account/quota exhaustion is an environment SKIP, not a failure — it cannot be
95+
# fixed by re-running and is not a skills or harness fault.
96+
expect_verdict "account quota exhaustion is an environment skip" 1 "SKIP|account" \
97+
"Error: Individual quota reached. Please upgrade your subscription to increase your limits. Resets in 75h."
8598

8699
expect_verdict "self-reported blocker wins even with a script OK" 0 "FAIL|auth" \
87100
"FUSION-REPORT

test-assistants.sh

Lines changed: 41 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -130,21 +130,22 @@ report_instructions() {
130130
131131
Two more things, because this is a timed test harness rather than a real build.
132132
133-
Do not import or deploy the workflow — discover the actions you need and begin
134-
authoring the YAML, no further. You have about ${REPORT_AT} seconds of wall clock; run \`date\`
135-
if you need to know where you are. When that is up, stop wherever you have got to and
136-
report. Report early — right away — if something blocks you, if you find yourself
137-
about to ask me a question, or if you sense you are about to be interrupted.
138-
Running out of the time budget is expected and is not a failure — report what you
139-
have done so far with BLOCKER: NONE. The report is worth more to me than the extra
140-
progress.
133+
This is a lightweight smoke test of the SKILL, not a real build. Your ONLY goal is
134+
to confirm the skill loaded and its scripts run: run one or two discovery commands
135+
(for example action_search.py or trigger_search.py, or this skill's own script such
136+
as query_workflows.py --list), then STOP and report. Do NOT author workflow YAML,
137+
and do NOT import or deploy anything.
138+
139+
Report within about ${REPORT_AT} seconds — run \`date\` to check where you are. Report
140+
immediately if something blocks you or you find yourself about to ask a question.
141+
Running out of the time budget is not a failure; report what you have with BLOCKER: NONE.
141142
142143
To report, end your reply with these five lines, in this order, each starting a line
143144
of plain text. No code fence, no blockquote, no bullets, no bold, and no angle
144145
brackets in anything you write:
145146
146147
FUSION-REPORT
147-
STATUS: <one word — WORKING if the scripts are doing real work, BLOCKED only if a real problem stopped you, DONE if the workflow is authored. Running out of the time budget is NOT blocked; that is WORKING>
148+
STATUS: <one word — WORKING or DONE if the skill's scripts ran, BLOCKED only if a real problem stopped you. Running out of the time budget is NOT blocked; that is WORKING>
148149
SKILLS: <comma-separated paths of the skill files you loaded, or NONE>
149150
COMMANDS: <comma-separated, every fusion-skills script you ran (action_search.py, validate.py, etc.), each written as the script followed by => OK or => FAIL: reason. NONE if you ran none>
150151
BLOCKER: <one line naming a real problem, quoting the error verbatim if there was one. NONE if nothing did. The time budget is not a blocker — if you simply ran out of time and nothing failed, write NONE>
@@ -549,14 +550,24 @@ classify() {
549550
body=$(sed -e 's/\\n/\
550551
/g' -e 's/"[]}].*$//' "$log" 2>/dev/null | grep -v '^[[:space:]]*>')
551552

553+
# An account-level block — quota or subscription exhausted — is not a skills or
554+
# harness fault and cannot be fixed by re-running, so treat it as an environment SKIP
555+
# (like a missing CLI), not a failure. Anchored on assistant billing phrasing so it
556+
# cannot match a skill doc's own "rate limit" guidance.
557+
grep -qiE "quota reached|quota exceeded|upgrade your subscription|subscription (required|expired|to increase)|insufficient (credits|quota)|out of (credits|quota)" <<< "$body" && { echo "SKIP|account|account quota/subscription limit reached||"; return; }
558+
552559
# A Python traceback for a missing dependency is decisive: the venv was never built
553560
# (the SessionStart hook is Claude-only) or the script was run outside python.sh.
554561
grep -qiE "ModuleNotFoundError|No module named '(falconpy|yaml|tomli)'" <<< "$body" && { echo "FAIL|deps|missing Python dependency (venv not built?)||"; return; }
555562
# An unresolved ${CLAUDE_PLUGIN_ROOT} means the skill's own invocation path expanded
556563
# empty — the env var is set only by Claude Code, so this is the classic non-Claude
557564
# failure. Anchored on the shell's own "No such file"/"not found" for that path.
558565
grep -qiE '(^|/)scripts/python\.sh: (No such file|command not found)|\$\{?CLAUDE_PLUGIN_ROOT\}?/' <<< "$body" && { echo "FAIL|root|CLAUDE_PLUGIN_ROOT unset — script path did not resolve||"; return; }
559-
grep -qiE "^[[:space:]]*(❌[[:space:]]*)?(Error|error):.*(unknown|unrecognized) (flag|option|argument)|: error: unrecognized arguments" <<< "$body" && { echo "FAIL|flag|rejected a CLI flag||"; return; }
566+
# A launch-flag rejection by the ASSISTANT CLI itself is decisive. A fusion *script's*
567+
# argparse error (e.g. "action_search.py: error: unrecognized arguments") is NOT — the
568+
# assistant can fix the args and retry — so it is deliberately not matched here; it
569+
# flows through to the report/OK-FAIL logic below.
570+
grep -qiE "^[[:space:]]*(❌[[:space:]]*)?(Error|error): (unknown|unrecognized|unsupported) (flag|option)" <<< "$body" && { echo "FAIL|flag|the assistant CLI rejected a launch flag||"; return; }
560571
grep -qiE "401 Unauthorized|403 Forbidden|\"?errors\"?.*invalid_client|access denied|Failed to authenticate|Could not authenticate" <<< "$body" && { echo "FAIL|auth|credentials rejected by the tenant||"; return; }
561572
grep -qiE "^[[:space:]]*(❌[[:space:]]*)?Error: no TTY available|^[[:space:]]*(❌[[:space:]]*)?could not open a new TTY|/dev/tty: device not configured" <<< "$body" && { echo "FAIL|tty|CLI demanded a TTY||"; return; }
562573
grep -qiE "Not inside a trusted directory" <<< "$body" && { echo "FAIL|trust|refused to run in this directory||"; return; }
@@ -671,7 +682,7 @@ else
671682
fi
672683
printf '\n'
673684

674-
RESULTS=(); CATEGORIES=(); FAILURES=0; TESTED=0
685+
RESULTS=(); CATEGORIES=(); FAILURES=0; TESTED=0; SKIPPED=0
675686

676687
# Two groups, because they need OPPOSITE filesystem state and cannot overlap:
677688
# --plugin-dir assistants run with this repo's symlinks stashed away, while Codex and
@@ -724,6 +735,9 @@ report_one() { # name bin source rc elapsed
724735
case "$status" in
725736
PASS) printf ' %s%-16s%s %s✔ PASS%s %-43s %s%4ss%s\n' \
726737
"$BOLD" "$name" "$RESET" "$GREEN$BOLD" "$RESET" "$detail" "$DIM" "$elapsed" "$RESET" ;;
738+
SKIP) printf ' %s%-16s%s %s⊘ SKIP%s %-43s %s%4ss%s\n' \
739+
"$BOLD" "$name" "$RESET" "$YELLOW" "$RESET" "$detail" "$DIM" "$elapsed" "$RESET"
740+
SKIPPED=$((SKIPPED+1)) ;;
727741
TIMEOUT) printf ' %s%-16s%s %s◷ SLOW%s %-43s %s%4ss%s\n' \
728742
"$BOLD" "$name" "$RESET" "$YELLOW$BOLD" "$RESET" "$detail" "$DIM" "$elapsed" "$RESET"
729743
FAILURES=$((FAILURES+1)) ;;
@@ -736,7 +750,8 @@ report_one() { # name bin source rc elapsed
736750
# log, and the pair that shows a pass came from the working tree.
737751
[ -n "$rskills" ] && info "skills: $rskills"
738752
[ -n "$rcmds" ] && info "ran: $rcmds"
739-
[ "$status" != "PASS" ] && CATEGORIES+=("$category")
753+
# Only real failures contribute a failure-cause; an environment SKIP or a PASS does not.
754+
[ "$status" != "PASS" ] && [ "$status" != "SKIP" ] && CATEGORIES+=("$category")
740755
# --e2e records the two claims a judging pass needs as their own fields, not buried
741756
# in the display string: --judge has to look them up on the tenant.
742757
local rwf="" rdef=""
@@ -746,7 +761,9 @@ report_one() { # name bin source rc elapsed
746761
rdef=$(clean "$(report_field DEFINITION <<< "$ebody")" 60)
747762
fi
748763
RESULTS+=("$name|$status|$category|$detail|$elapsed|$source|$rskills|$rwf|$rdef")
749-
TESTED=$((TESTED+1))
764+
# An environment SKIP (account/quota) is "could not test", like a missing CLI — it is
765+
# not counted among the tested assistants and never fails the run.
766+
[ "$status" = "SKIP" ] || TESTED=$((TESTED+1))
750767
return 0
751768
}
752769

@@ -947,16 +964,22 @@ if [ "$JUDGE" -eq 1 ]; then
947964
fi
948965

949966
head2 "Summary"
967+
skipnote=""
968+
[ "$SKIPPED" -gt 0 ] && skipnote=" ${DIM}· ${SKIPPED} skipped (environment)${RESET}"
950969
if [ "$TESTED" -eq 0 ]; then
951-
printf ' no assistants tested\n'
970+
if [ "$SKIPPED" -gt 0 ]; then
971+
printf ' no assistants tested (%s skipped: account/quota)\n' "$SKIPPED"
972+
else
973+
printf ' no assistants tested\n'
974+
fi
952975
elif [ "$FAILURES" -eq 0 ]; then
953-
printf ' %s%s✔ %s of %s%s reached the tenant%s\n' \
954-
"$GREEN" "$BOLD" "$TESTED" "$TESTED" "$RESET$GREEN" "$RESET"
976+
printf ' %s%s✔ %s of %s%s reached the tenant%s%s\n' \
977+
"$GREEN" "$BOLD" "$TESTED" "$TESTED" "$RESET$GREEN" "$RESET" "$skipnote"
955978
printf ' %s%ss wall clock · %ss if run one at a time%s\n' "$DIM" "$WALL" "$SEQ" "$RESET"
956979
else
957-
printf ' %s%s%s of %s%s reached the tenant%s %s│%s %s%s✘ %s failed%s\n' \
980+
printf ' %s%s%s of %s%s reached the tenant%s %s│%s %s%s✘ %s failed%s%s\n' \
958981
"$GREEN" "$BOLD" "$((TESTED-FAILURES))" "$TESTED" "$RESET$GREEN" "$RESET" \
959-
"$DIM" "$RESET" "$RED" "$BOLD" "$FAILURES" "$RESET"
982+
"$DIM" "$RESET" "$RED" "$BOLD" "$FAILURES" "$RESET" "$skipnote"
960983
printf ' %s%ss wall clock · %ss if run one at a time%s\n' "$DIM" "$WALL" "$SEQ" "$RESET"
961984
printf '\n %sfailures by cause%s\n' "$BOLD" "$RESET"
962985
# Counts per known failure mode, worth tracking run to run.

0 commit comments

Comments
 (0)