Skip to content

fix(evals): stop counting no-Bash-tool results as Bash that ran - #17425

Merged
kyle-sexton merged 3 commits into
mainfrom
fix/evals-bash-ran-absent-tool
Nov 19, 2026
Merged

kyle-sexton merged 3 commits into
mainfrom
fix/evals-bash-ran-absent-tool

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

No related issue: defect seen on CI run 44475945897 and fixed in this PR.

Summary

run-validity.py's bash ran: line counted a Bash call as RAN when its result was anything other than a permission denial or a sandbox start failure. In a session with no Bash tool, the result <tool_use_error>Error: No such tool available: Bash ... matched neither, so the event-storming simulation-default-markdown run printed bash ran: with 2 of 2, without n/a. Both of those calls failed because the session had no Bash tool.

Fix

  • tool_absent() matches an is_error result containing No such tool available: Bash. bash_state now returns its state together with the number of such calls.
    • A call like that does not count as ran.
    • When the init tools list leaves Bash out and the only Bash calls hit that error, the run is left out of its arm, the same as a run with no Bash call.
    • When the init list offers Bash, the run counts as not run.
  • The bash ran: line now ends , absent tool <n> (calls, over every run). The suffix is also added after a bare n/a. That run would now print bash ran: n/a, absent tool 2.
  • Consumers: the three bash_ran=... grep -xE sites in .github/workflows/pr-run-plugin-evals.yml and the three in .github/workflows/maintenance-measure-skill-edit-pass.yml now accept the optional (, absent tool [0-9]+)? ending. Without that change, -x would reject the new line and || true would drop it from validity.txt and the summary without any error. workflow.test.mjs and hill-climb-workflow.test.mjs assert the new group.
  • Permission denials: unchanged. An absent-tool result does not hold denied by your permission settings, so is_denial never matches it. It could only enter the count through the result line's permission_denials. Neither the plugin-evals page (no mention of permission_denials, No such tool or disabled tools) nor any trace available here shows the CLI listing it there. The run's artifact holds no traces, so its 5 denials cannot be checked against the 2 absent calls. The module docstring records that the denials check counts such a call only when permission_denials lists it.
  • New fixture traces/bash-absent.jsonl: a hand-written trace in the recorded result shape, with an init tools list that leaves Bash out.

Verification

  • python3 plugins/evals/skills/plugin-eval/scripts/test_run_validity.py: 180 tests, OK. Two of them are new:
    • The run's own shape gives bash ran: n/a, absent tool 2 and no denial FAIL. Absent calls in one arm and real calls in the other give with n/a, without 2 of 2, absent tool 3.
    • Absent results combined with the other states: a run offered Bash, absent plus ran, absent plus denied, a successful result that only quotes the text, and an unreadable trace. Expected line: with 1 of 3, without 1 of 3, unknown 1, absent tool 4.
  • node --test --test-concurrency=4 .github/scripts/plugin-eval/workflow.test.mjs .github/scripts/plugin-eval/hill-climb-workflow.test.mjs: 18 tests, all pass.
  • The extended consumer regex matches bash ran: n/a, bash ran: n/a, absent tool 2, and lines with or without unknown. It rejects the suffix in the wrong position.
  • scripts/run-ruff.sh check on both Python files: clean. The pre-push check-affected hook passed, including changed-skills.

Related

🤖 Generated with Claude Code

kyle-sexton and others added 3 commits November 19, 2026 02:14
bash_state counted any Bash result that was neither a permission
denial nor a sandbox start failure as RAN, so a session offered no
Bash whose calls got "No such tool available: Bash" reported
`bash ran: with 2 of 2`. Such a result is now its own state: the call
does not count as ran, a run offered no Bash whose only Bash calls hit
it is left out of its arm, and the line ends `, absent tool <n>`.

The eval workflows' grep -x on the `bash ran:` line accepts the new
ending, so the line is not dropped from validity.txt and the summary.

Co-authored-by: Claude Opus 5.5 <[email protected]>
Drop the Sources row for the no-Bash-tool result: SKILL.md would reach
the 500-line hard cap, and the pointer, as-of date and recheck trigger
already sit beside ABSENT_TOOL_TEXT in run-validity.py.

Co-authored-by: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 19, 2026 09:40
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T09:43:06.429871Z 0195c8a Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 0195c8a252b8f2b237b99454c53d4c70c1a7fc18: read 8 of 8 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #17425, fix(evals): stop counting no-Bash-tool results as Bash that ran

No security issues found. I read every hunk of all 8 changed files in .claude-lane/pr.diff.

What changed

  • run-validity.py adds tool_absent(). It is a substring match for No such tool available: Bash on an is_error tool_result. bash_state now returns a (state, absent) tuple, and the bash ran: line gets an optional , absent tool <n> ending.
  • There is a new hand-written fixture trace, the tests are updated, and a changelog fragment is added.

Trusted paths

  • .github/workflows/pr-run-plugin-evals.yml (3 sites) and .github/workflows/maintenance-measure-skill-edit-pass.yml (3 sites) match trusted globs. In each one I read the whole change and what it gates.
  • The only edit in each is to the grep -xE pattern that filters the published bash ran: line. The new group (, absent tool [0-9]+)? adds a fixed literal and digits only.
  • -x still anchors the whole line, so free trace text still cannot reach validity.txt or the job summary. The count-only publishing guarantee stays as it was.
  • These steps' permissions:, triggers, tokens, if: conditions and checkout handling are unchanged.

Trust controls: none touched. The diff changes no trusted-trigger check, lane token request or broker, kill switch, merge-hold script, or .github/actions/* action.

Instruction surfaces and manifests: none in the diff. No CLAUDE.md, AGENTS.md, skill or agent body, hook list, plugin.json or marketplace.json changes.

Checked and not a finding

  • A model in a with-Bash run could make a real Bash call fail while printing the absent-tool text. The call would then count as absent and not as ran. This only skews an eval validity statistic.
  • It gives no token, secret, code-execution, or billing path, so it falls outside this lane's scope.

Spend: none beyond existing eval runs. The change only adds parsing.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed 0195c8a252b8f2b237b99454c53d4c70c1a7fc18: read 8 of 8 changed file(s); 0 finding(s), 0 as inline comments.

Code review: no findings

This PR stops run-validity.py from counting a Bash call as Bash that ran when its result says the session has no Bash tool (No such tool available: Bash). It adds a , absent tool <n> ending to the bash ran: line and widens the six workflow grep -xE checks so they still accept that line.

What I checked (by reading the code; I ran nothing):

  • bash_state logic (plugins/evals/skills/plugin-eval/scripts/run-validity.py#L909-L929):
    • With no absent-tool calls, the new NOT_RAN if bash - absent or offered else EXEMPT gives the same answer as the old EXEMPT if not bash and tools is not None and BASH_TOOL not in tools else NOT_RAN.
    • A run offered Bash still counts as not run.
    • A run with an absent call plus a denied call counts as not run: the denied id is still in bash - absent.
    • A successful result that only quotes the error text still counts as ran, because tool_absent requires is_error.
  • Callers: bash_state has only one caller, bash_line, so the change to a tuple return breaks nothing. The bash ran: line feeds no verdict check, so the validity verdict and the permission-denials check behave as before.
  • Workflow consumers: both workflows have exactly three grep -xE 'bash ran sites each (pr-run-plugin-evals.yml and maintenance-measure-skill-edit-pass.yml), and the diff updates all six. In the new regex the optional (, absent tool [0-9]+)? group sits after the alternation, so both bash ran: n/a, absent tool 2 and ... , unknown 1, absent tool 4 match. Nothing else in the repository parses this line.
  • New tests: I traced both new cases in test_run_validity.py against the code, using the tools_trace ids b0, b1, …, and the expected lines (bash ran: n/a, absent tool 2, with n/a, without 2 of 2, absent tool 3, with 1 of 3, without 1 of 3, unknown 1, absent tool 4) are what the code produces. The two .mjs assertions match the literal new regex text in the workflows. The author's run results (180 Python tests OK, 18 node tests pass) are author-claimed and unverified.
  • Path-scoped rule: .claude/rules/skill-bodies-state-current-rules.md covers the changed script. The stored error string ABSENT_TOOL_TEXT follows it: there is a pointer (no docs page; observed in CI run 44475945897), the Claude Code version it was observed on, an as-of date and a recheck trigger. Nothing in the diff triggers .claude/rules/cost-claims.md.
  • Closing issue: there is none (the PR says "No related issue"), so I checked no issue criteria. The PR context holds no embedded instructions to the lane.
  • Paved paths: no paved-path row turned up under docs/standards/.
  • Changelog fragment: it is bump: patch for a fix, which fits. No plugin manifest is changed.

Loosened-check criterion: the prompt had no loosened_check_verdict:, loosened_check_patterns: or loosened_check_decision_record: lines, so I used fail with no consumer entries and did not check the citation requirement. The widened regex only lets a line nothing makes decisions on pass through to validity.txt, and the bash ran: count gates no verdict, so I found no loosening.

Loosened-check verdict: fail (default, prompt supplied no settings); patterns: 0

Verifier dropped 0 of 0 candidates.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 19, 2026
Merged via the queue into main with commit 9735ba6 Nov 19, 2026
83 checks passed
@kyle-sexton
kyle-sexton deleted the fix/evals-bash-ran-absent-tool branch November 19, 2026 10:00
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant