Skip to content

fix(evals): count only silent Bash failures as no working shell in run-validity - #11297

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-11290-41079243621-1
Oct 30, 2026
Merged

melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-11290-41079243621-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #11290

Summary

Opened by the work-resolve-issue lane. The run's own summary:

run-validity's session-started check failed any run of 2 or more Bash calls in which every call returned is_error, even when the commands printed real output (ls on a missing path, cat of an absent file). shell_failure now counts a failed Bash result toward 'all N Bash calls failed' only when it holds no output past a leading 'Exit code N' line. The sandbox-start failure text still fails the run at once, and denied calls still count toward neither side. Tests cover the new stay-quiet case and the still-INVALID silent-failure case.

Not verified

  • python3 -I plugins/evals/skills/plugin-eval/scripts/test_run_validity.py was not run: this lane's Bash runs only the named wrappers and no interpreter. Left to the PR's CI.
  • The ai-slop deterministic detector (detect.sh) could not run in this lane, so the tidy ai-slop pass was a by-hand rubric read only
  • The 'Exit code N' header that EXIT_LINE strips matches the shape the existing tests and the issue's traces use; no upstream doc of Claude Code's failed-Bash result format was read. If the format differs, the strip does nothing and only empty results count as failed.
  • The refinement comment's criterion expected 'all 2 Bash calls failed' in the rewritten test; it uses 3 results (adding a bare 'Exit code 1' case), so it expects 'all 3 Bash calls failed'

Fix

  • plugins/evals/skills/plugin-eval/scripts/run-validity.py: new has_output() and EXIT_LINE; shell_failure adds a failed Bash result to failed_ids only when has_output is false; module docstring, MIN_BASH_CALLS comment and shell_failure docstring describe the new rule
  • plugins/evals/skills/plugin-eval/scripts/test_run_validity.py: the all-failed test now uses results with no output (empty string, a bare 'Exit code 1', a blank text block) and expects INVALID with 'all 3 Bash calls failed'; new test_failed_bash_calls_that_printed_output_pass covers 2 and 3 calls tha
  • .changes/evals/fix-11290-run-validity-bash-output-3f9c2a71.md: patch changelog fragment (Fixed), including that a read-only /tmp run whose commands still print output now passes this check

Verification

The runner ran each check from the base copy against 01ccdfd:

  • scripts/check-changelog-fragments.sh --check: passed

The run reports:

  • check-changelog-fragments (run before and after review fixes): All 200 changelog fragment(s) under .changes/ are valid
  • check-affected (run before and after review fixes): 12 passed, 6 skipped over 3 changed files; skips were tools not installed or checks that run checked-tree code
  • fresh-context review subagent over the whole diff: traced each new and existing shell_failure test by hand as passing; flagged that a bare 'Exit code 1' result counted as output (fixed with EXIT_LINE and covered in the INVALID test), that plain-string list items counted as no output (fixed), and tha
  • tidy-diff over the changed lines: simplify and comment passes found nothing to change; write-for-humans and the ai-slop rubric read of the fragment found nothing to change
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/41079243621

Left out: the items under Not verified.

Related

#11290

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 01ccdfdcad23632f5295b895935c973e087d70a8: 0 finding(s), 0 as inline comments.

No security findings.

I read the whole diff (3 files). It changes the eval validity checker plugins/evals/skills/plugin-eval/scripts/run-validity.py, its unit test, and a changelog fragment. None of them match a trusted path. No trust control, token scope, kill switch, merge hold, workflow, plugin manifest or standing instruction is touched.

  • Reachable surface: has_output() and EXIT_LINE only classify trace JSON that the eval harness already reads. There is no command execution, path handling, secret handling or network call. The \AExit code -?\d+\s* regex is linear, so it has no ReDoS risk. A None or non-string text value returns False and does not raise.
  • Effect on the check: A failed Bash call that printed output no longer counts toward "all N Bash calls failed". The check is a run-quality gate for eval measurements. It does not gate merges, credentials or billing. The sandbox-failure string still fails the run at once, and denied calls still count toward neither side, so the permission-denials check is unchanged.
  • Spend: none.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed 01ccdfdcad23632f5295b895935c973e087d70a8: 0 finding(s), 0 as inline comments.

No blocking findings. I read the three changed files and the closing issue #11290, and ran nothing. The author's claim that the tests pass is unverified.

Issue criteria. The issue asks that a run count as "no working shell" only when the Bash results show a shell that never ran, and that a non-zero exit with command output not count. It also asks for a stay-quiet test from a trace whose Bash calls exit 1 with output. All three are met:

  • shell_failure (plugins/evals/skills/plugin-eval/scripts/run-validity.py:387-390) still returns at once on the sandbox-start text.
  • A failed call is counted only when has_output is false.
  • test_failed_bash_calls_that_printed_output_pass is the stay-quiet test. It covers 2 and 3 calls, including a list-content result. The rewritten ..._with_no_output_is_invalid test covers an empty string, a bare Exit code 1, and a blank text block.

Code check. has_output handles string content, list content with text or non-text blocks, and plain strings inside a list. Content of None or any other type returns False, which counts as failed. That is the conservative direction. EXIT_LINE is applied to the stripped text and anchored at the start, so Exit code 1\nREADME.md has output and bare Exit code 1 does not. The docstring, comment and module header match the new rule.

Tradeoff, not a finding. The old test was named "whatever the wording". It caught a broken shell whose failure text was new, so long as every call failed. After this change, a broken shell whose error text isn't the known sandbox string now passes if every call printed an error line. This follows the issue's stated direction, which names an empty result or a known sandbox text. The changelog fragment says so for the read-only /tmp case. plugins/evals/skills/plugin-eval/reference/records.md records that case as a degraded environment where a call can report exit 1 though the command succeeded. That reference says the sandbox is read-only there, so a person may want the validity gate to say so some other way. I left it as a note.

Manifest and paved paths. The diff touches no plugin.json or marketplace.json. The changelog fragment is a patch bump under ### Fixed, which fits a bug fix.

Cost. No hold. The change spends no money.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head 01ccdfdcad23632f5295b895935c973e087d70a8.

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit e9d2ee1 Oct 30, 2026
46 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-11290-41079243621-1 branch October 30, 2026 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(evals): run-validity's session-started check fails runs whose Bash calls exit non-zero with output

0 participants