Skip to content

fix(evals): refuse a deep eval TMPDIR before spend and report a sandbox that never started as a harness failure - #11746

Merged
melodic-automation-lanes[bot] merged 2 commits into
mainfrom
work-resolve-issue/issue-11740-41252803077-1
Nov 1, 2026
Merged

melodic-automation-lanes[bot] merged 2 commits into
mainfrom
work-resolve-issue/issue-11740-41252803077-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #11740

Summary

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

plugin-eval preflight now prints an eval_tmpdir field and refuses before any spend when the TMPDIR directory the run will use is longer than 24 characters and a case requests Bash or PowerShell. 24 is the longest length measured to work: the sandbox-runtime bridge socket names sit some undocumented depth below <dir> inside the claude-eval-* sandbox, so the measured bound is used rather than a derived one. The validity gate already failed a run whose trace showed 'Sandbox is required but failed to initialize'. Its verdict reason now says 'harness failure: ... so the score measures the harness, not the skill', and the read step tells the agent to report that as a harness failure, not as the skill's result, whatever the CLI's exit code. sandboxes.md's Docker link swap and Sandbox start sections now state the 24-character bound, the socket names, and the measurements behind it.

Not verified

  • test_run_validity.py and the run-validity.test.sh suite were not executed: the lane allows no interpreter or test runner, so the suite is left to the PR's CI
  • The 24-character bound is the longest length measured to work (#11740), not a derived failure point. The claude-eval-* name length and the exact directory the sockets land in are undocumented, so lengths from 25 to 62 characters are untested and refused conservatively
  • The sandbox-runtime and unix(7) pages were read with WebFetch, not /discovery:read-docs, which is not available in this lane
  • tidy: passes 1-4 ran with no edits. Pass 5 (/ai-slop:audit fix) could not run its detect.sh because lane Bash runs only the named wrappers, so it was replaced by a Grep for em dashes and catalog vocabulary plus a manual rubric read, with no findings. tidy is recorded as skipped
  • check-affected skipped typos (not installed), shellcheck (no shell changed), changed-skills and three validate-plugins sub-checks (they run code from the checked tree); its CI-only checks are left to the PR's CI
  • Changes are left uncommitted in the working tree per the lane's runner instructions, which override the skill's commit step

Fix

  • plugins/evals/skills/plugin-eval/SKILL.md: new eval_tmpdir preflight field with a before-spend refusal over 24 characters; the run step's <dir> is bounded to 24 characters; the read step reports a 'harness failure:' gate reason as a harness failure; new Sources row for the bound
  • plugins/evals/skills/plugin-eval/reference/sandboxes.md: Sandbox start explains the 24-character bound (socket names, the 107-byte sun_path limit, the nesting, the 63/24 measurements) and updates its pointer, as-of date and recheck triggers; Docker link swap states how short <dir> must be
  • plugins/evals/skills/plugin-eval/scripts/run-validity.py: the session started check's INVALID reason is labeled 'harness failure: ... so the score measures the harness, not the skill'
  • plugins/evals/skills/plugin-eval/scripts/test_run_validity.py: the sandbox-failure test asserts the new harness-failure reason on the verdict line
  • .changes/evals/work-resolve-issue-issue-11740-7c3e1a95.md: patch changelog fragment for the evals plugin

Verification

The runner ran each check from the base copy against fcf59b1:

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

The run reports:

  • read https: //raw.githubusercontent.com/anthropic-experimental/sandbox-runtime/main/src/sandbox/linux-sandbox-utils.ts: initializeLinuxNetworkBridge builds join(tmpdir(), claude-http-${socketId}.sock) and claude-socks-${socketId}.sock with socketId = randomBytes(8) hex (16 chars), polls 5 times,
  • read https: //man7.org/linux/man-pages/man7/unix.7.html: sun_path is 108 bytes on Linux, and the pathname including the terminating null must not exceed it
  • read https: //github.com/melodic-software/claude-code-plugins/issues /9514: a probe saw the session temp directory at <sandbox>/tmp/claude-1000/ inside the claude-eval-* sandbox; a short TMPDIR /run/user/1000/ev worked
  • read https: //code.claude.com/docs/en/plugin-evals: it documents --keep-temp's per-run sandbox directory but says nothing about TMPDIR, the sandbox directory's name or location, or socket paths
  • /home/runner/work/claude-code-plugins/claude-code-plugins/.lane/checks/bin/check-changelog-fragments: all 6 fragments valid (run after the final edit)
  • /home/runner/work/claude-code-plugins/claude-code-plugins/.lane/checks/bin/check-affected: 12 passed, 6 skipped over 5 changed files (run after the final edit)
  • fresh-context review subagent over the whole diff: no code or test bugs; it confirmed that the new test assertion matches the verdict line's format and that no existing test asserts the old reason string. Its documentation findings (an overstated failure threshold, an unproven socket location, the e
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/41252803077

Left out: the items under Not verified.

Related

#11740

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

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 7d65b0c4753206c11c43221649f6f45510fca044: read 1 of 1 changed file(s); 0 finding(s), 0 as inline comments.

Security review (incremental, fcf59b1 → 7d65b0c)

Scope: plugins/evals/skills/plugin-eval/SKILL.md. I read every hunk in .claude-lane/incremental.diff and used the PR context for background.

Result: I found no security issues.

The change only shortens existing prose. I checked each hunk with the instruction-surface lens, looking for any rule that was deleted, narrowed or softened:

  • TMPDIR refusal (L55-57): The rule is still there and still applies before any spend. It still triggers when eval_tmpdir is over 24 characters and a case requests Bash/PowerShell. The socket-path reasoning now lives in reference/sandboxes.md#sandbox-start and the SKILL.md text links to it. The workaround now points to Run step 3, which still gives the at-most-24-character <dir> example (SKILL.md:247).
  • Worktree refusal routes (L120-129): "Never retry, wrap, reroute, or otherwise bypass a refusal" is unchanged. The instruction to read the --json file back after a run moved into the lead-in sentence; its meaning is the same.
  • Cost-anchor re-derivation (L193): The trigger list was replaced with a link to records.md#cost-anchors. The spend ceiling (max_cost_usd / unlimited_cost) and its fallback defaults of 5 USD and false are unchanged.
  • PowerShell fallback for the bare eval word (L266-267): Shortened only. The fallback still applies only when a guard other than the worktree refusal blocks the command, and the "never bypass a refusal" rule above still governs that refusal.
  • Harness-failure reporting (L284-287): The rule to report the run as a harness failure, never as the skill's result or a null delta, is kept. Only the explanation of what the reason means was dropped.
  • Remaining hunks: Line rewrapping only.

None of these hunks changes what the skill forbids, so I report no instruction-surface finding. I did not consult the protected-class list in docs/contracts/instruction-exception-register/README.md, because no removed rule needed a register check.

The changed file touches no trusted path, plugin manifest, workflow, token or trust control.

critical-findings: 0

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on fcf59b1a519b9392c12d3ad0c57517c0fb69d929; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 7d65b0c4753206c11c43221649f6f45510fca044: read 1 of 1 changed file(s); 0 finding(s), 0 as inline comments.

Incremental review: plugins/evals/skills/plugin-eval/SKILL.md (since fcf59b1)

No findings.

All the changes since the last review condense the wording or move text. None of them changes behavior.

  • Preflight eval_tmpdir: the refusal still applies before any spend, under the same conditions: longer than 24 characters and a case requests Bash or PowerShell. The detail about socket length and the run still exiting 0 is no longer in SKILL.md. It now lives behind a link to reference/sandboxes.md#sandbox-start, and that anchor exists. The "as in Run step 3" pointer is also correct: step 3 (SKILL.md#L247) gives the short <dir> route.
  • Cost anchors: the inline re-derive conditions became a link. records.md#L151-L152 states the same three triggers and the same "last three passes" rule, so nothing was lost.
  • Worktree isolation: "after a run, read the --json file back" moved into the sentence that introduces the routes. It applies unconditionally, as before.
  • Read step: the harness failure: instruction keeps its meaning: report it as a harness failure whatever the exit code, then rerun by Sandbox start.
  • The remaining hunks only rejoin wrapped lines.

Closing issue #11740: the incremental change keeps all three Done-when criteria as they were at the last review. The preflight refusal and the run-step bound stay; the harness-failure reporting stays; and sandboxes.md still states the bound for "Docker link swap", untouched by this change. The other files were reviewed at fcf59b1 and are unchanged.

I ran no tests. The PR body says the run-validity tests were not executed in the lane, and its verification lines are the author's claims, which I did not confirm.

@melodic-automation-lanes

melodic-automation-lanes Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head 7d65b0c4753206c11c43221649f6f45510fca044. The lanes clear this reason on their own; the next scheduled run judges it again.

a pr-unblock lane stopped its head (pr-unblock/address-feedback is failure), which ci-status fails
  in the merge queue

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

pr-unblock / address-feedback finished round 1 of max 4 on fcf59b1.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The pr-unblock lane stopped address-feedback on this pull request: the pull request has an unresolved review thread the lane does not take (a reviewer it does not act on, a review of an older head, or a thread it already answered), so nothing will resolve it. The lane sets no label: the run ends in a failing pr-unblock/address-feedback status on the head the lane gated.

When a retry on this head can change the outcome, the lane runs one on its own, up to its per-head cap, and edits this comment if it stops again; a run that does not stop clears the status. When no retry can (a review thread the lane does not take or settle, or a failing check after the retries are spent), a person resolves the threads or gets the checks green, then dispatches the workflow below: that run finds the cause gone and clears the status. On a pull request the lanes App opened, the dispatchers start that run once per stop; on any other, a person does. A new commit to the branch starts clean.

To run it again on this head now, dispatch the pr-unblock workflow:

gh workflow run pr-unblock.yml -R melodic-software/claude-code-plugins -f pr-number=11746 -f activity=address-feedback

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head 7d65b0c4753206c11c43221649f6f45510fca044.

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 1, 2026
Merged via the queue into main with commit 3a15fc1 Nov 1, 2026
72 of 73 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-11740-41252803077-1 branch November 1, 2026 03:06
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 3a15fc15bcc45082433a63b2f5eb510882bf6410; later checks count it verified from this comment.

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): a deep TMPDIR stops the eval sandbox from starting, and the run still scores

1 participant