Repository navigation
fix(evals): count sandbox network denials in run-validity - #13005
Conversation
A with-arm trace whose Bash tool result reported a sandbox violation, `deny network-outbound <host>:<port>` inside a <sandbox_violations> block, passed the permission denials check, so the run's score measured a blocked request rather than the skill. The result is not an is_error denial, so is_denial never saw it. check_denials now takes these as a new denial source, read only from tool_result blocks (string or text-block content), with the hosts named in each detail line and in the summary. In an invocation-probe or control case (is_probe, is_control) the denial is set aside as a warning. Elsewhere it counts: a with-arm one is a FAIL that neither the same-score nor the every-run exception can turn into a warning, and a without-arm one takes the ordinary denial rules, as an ordinary permission denial does. The skill and reading-results.md describe the new source. Tests, on a synthetic trace in the real result's shape: - a with-arm network denial scoring like its clean sibling is a FAIL naming example.org:443 - the same denial in every run of both arms is still a FAIL - a without-arm one scoring like its clean sibling is a warning - one in an invocation-probe case and one in a control-tagged case warn - the report quoted in user, assistant or result text, or a non-network sandbox violation in a tool result, leaves the check PASS Refs: #12988 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015te8Cs4gtBwNShf5j6Qg1o
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
claude-security-review reviewed Security review (incremental, f38ba65..b83eefa): no security issues foundThis review covers only the changes since f38ba65. I read every hunk of all 6 files listed in What changed since the last review. In Surfaces checked.
Settled threads: the three owner-resolved threads (the Prior findings: this lane's earlier summary had 0 findings, so nothing carries over. Spend: none. The change only alters how a finished eval run is judged and starts no runs. critical-findings: 0 |
|
claude-review reviewed Code review (incremental, f38ba65..b83eefa): no new findingsRead: every hunk of all 6 changed files in Earlier findings: all three are fixed and settledEach was resolved with a decision from the owner, and the job marked none of them
New code checked, nothing to report
Not checked by me: the author says Manifest: no I found no embedded instructions in the PR context, the settled threads or the prior findings. The change spends nothing beyond prepaid usage. |
|
The pr-verify verifier failed head What it wrote (30 lines)This pull request leaves the merge queue, and ci-status holds it out while it carries |
Bring the sandbox network denial source in run-validity to the issue's recorded checklist and the PR's review findings: - A case whose prompt.md tags include `no-network` (NO_NETWORK_TAG, beside PROBE_TAG) is a third opt-out: its with-arm network denial warns, like an invocation probe's or a control's. - Only with-arm Bash results are read, so a without-arm network denial changes nothing (inline review 4462164946). - The fixture trace now holds `deny network-outbound xtomd.com:443`, with a made-up command and no identifying detail. - SKILL.md and reading-results.md no longer restate the sandbox's report text; a Sources row points at the sandboxing page's unsandboxed retry section, records that no page documents the report format (seen on Claude Code 2.1.317), and names its recheck trigger (advisory 4462164951). The regex constants' comment cites that row. Tests: a with-arm denial is a FAIL naming xtomd.com:443; a probe, a control and a no-network case each warn; a without-arm denial in one or both runs leaves the check PASS; the report quoted in user, assistant or result text, in a Read result, or a non-network violation in a Bash result leaves it PASS. Refs: #12988 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015te8Cs4gtBwNShf5j6Qg1o
Every case this branch scaffolds is built to need no network: the converter response is saved before the run, and the eval sandbox blocks the agent's outbound requests. run-validity (after #13005) counts a with-arm sandbox network denial as a FAIL unless the case declares `no-network`, the opt-out #12988 created for this case shape. Both smokes of this branch hold such denials: a with-arm re-fetch in read-spool-path-is-single-quoted-at-shell-sites, which by design reaches its delete path through a failed curl, and the trimmed-URL fetch in read-url-from-fetched-content-re-enters-the-gate, which no-trimmed-command already fails. Neither moved a score. The tag is prompt frontmatter, which the run never shows the model, so the measured runs stand as they are: re-judged with the tag, both are VALID with the denials as warnings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015te8Cs4gtBwNShf5j6Qg1o
Closes #12988
Summary
run-validity.pypassed eval runs whose fetch the sandbox's network block had denied, so a score that measured a blocked request looked like a valid measurement of the skill. A tool result whose<sandbox_violations>block holds adeny network-outbound <host>:<port>line now counts as a denial, and the summary names the denied hosts.Fix
check_denials, read only fromtool_resultblocks, so a prompt or answer that quotes the report text is not counted. Most real violations arrive withis_error: false, so the existing permission-denial reader never saw them.SKILL.md,reference/reading-results.mdand the script docstring describe the new source.Verification
run-validity.test.sh: 156 tests OK, 5 of them new (with-arm FAIL naming the host, the every-run case still FAILs, a same-score without-arm WARN, probe and control WARN, quoted report text and a non-network violation stay PASS).FAIL (9 denials in 9 runs; 9 sandbox network denials, outbound to publish.twitter.com:443, x.com:443, xtomd.com:443). Before this change it printed PASS.scripts/run-ruff.sh checkpasses on both Python files.Related
🤖 Generated with Claude Code
https://claude.ai/code/session_015te8Cs4gtBwNShf5j6Qg1o