Repository navigation
fix(evals): stop preflight printing a sandbox glob that deletes other runs - #14807
Conversation
… runs Preflight printed a cleanup loop over every <tmp>/claude-eval-* directory. Two sessions sharing one TMPDIR each keep sandboxes there, so the loop deleted the other run's live or kept sandboxes. Preflight now reports count and size only and points at the removal by results file, which removes one run's sandboxes by literal path. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review Summary: ❌ FailedThis 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. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
claude-security-review reviewed Security review: PR #14807 (head df95a60)No security issues found. I read every hunk of all 3 changed files: What changed. Preflight in Instruction-surface lens. The diff deletes standing skill text, so I checked it against the register at Out of scope for this lens. No changed file matches a trusted-path glob. The change touches no trust control, plugin manifest, workflow, token or secret. Spend, not a finding. The PR description reports $8.25 of eval spend for the before/after runs. That came from prepaid API credit and the change adds no recurring cost. The PR context contains no embedded instructions aimed at this lane. This was the first review of this PR, so it was not limited to blocking findings. critical-findings: 0 |
|
claude-review reviewed Code review: no findingsI read every hunk of the 3 changed files: What changed. Preflight used to print a removal loop over Checks:
Not verified by me. The PR description's markdownlint result, its greps and its before/after eval (VALID on both sides, $8.25 of eval spend) are the author's claims. I had no shell, so I ran none of them. Prior findings: none; this is the lane's first review of this PR. The PR context contained no embedded instructions aimed at this lane. |
No related issue: hub lessons-ledger finding L473 (preflight cleanup glob deletes other runs' sandboxes in a shared TMPDIR)
session: GitHub Support
Summary
/evals:plugin-evalpreflight printedfor d in <tmp>/claude-eval-*; do chmod 700 "$d" "$d/sealed"; chmod -R u+rwx "$d"; rm -rf "$d"; donewhenever leftover sandboxes existed. That loop assumes the temp directory holds only one run's sandboxes. When two sessions shared oneTMPDIR, a peer ran the printed loop and deleted the other session's kept sandboxes. Two of them belonged to a run whose validity check had not finished, so that run went INVALID.Fix
Preflight now prints no removal command. It still reports the leftover count and size from the unchanged read-only probe, and points at the existing "Removing a read's sandboxes" section. That section removes only the sandboxes one results file's
tracePaths name, by literal path, through the guarded per-path loop. No second removal mechanism is added.plugins/evals/skills/plugin-eval/reference/sandboxes.md: the glob loop is replaced with why it is unsafe in a sharedTMPDIRand a pointer to the per-results-file removal. A run that wrote no results file keeps its sandboxes until the owning session names them by literal path. The Record note no longer says "the per-sandbox loop above".plugins/evals/skills/plugin-eval/SKILL.md: the preflight paragraph that repeated the glob loop now matches..changes/evals/: a patch fragment.Rejected option: printing a removal only for sandboxes with no matching
claude plugin evalprocess that are older than a stated age. A--keep-tempsandbox has no process by design while it waits for itsread, so that test selects exactly the kept sandboxes that must survive. It also adds a process scan and an age threshold.Verification
markdownlint-cli2on the three changed files: 0 issues.grep -rln -e 'claude-eval-\*; do' -e 'chmod 700 "$d"'over the repository finds no remaining copy of the glob loop.grep -rn -e 'for d in' -e leftover_sandboxes plugins/evals/evalsfinds nothing).Before/after eval (docs/review/skills-and-agents.md:6-8)
Cases: the 16 cases whose prompt names
evals:plugin-evalor whose Skill grader'sinput_matchincludesplugin-eval, plus the suite's control case. Before is main7e4d9081, after is this headdf95a607; the two plugin trees differ only inskills/plugin-eval/SKILL.mdandreference/sandboxes.md. Run locally withclaude plugin eval --scaffold --keep-temp --allow-tools Bash Edit Write, sonnet-5-5 judged by opus-5-5, Claude Code 2.1.319.pe-spot-read-before-promotehad a with-arm Read of the skill's ownreference/iterating.mddenied (a harness reach limit inside the plugin dir). main also had a deniedlsinva-unknown-timeout-key, andtrigger-wsl2-missing-socatwhere the skill did not fire. None of these is caused by this change.--runs 1 --scaffolded; warnings only: no skill-fired grader on the control case, and 3 cases already at 1.00 without the plugin). With-arm delta per case, head minus main:pe-scaffold-flag+0.33,va-typo-check-trigger-0.50 at runs 1, every other case 0.00.va-typo-check-triggerre-run with--runs 3: main VALID, scores 1.00, 1.00, 0.50 (mean 0.833); head VALID, scores 1.00, 1.00, 1.00 (mean 1.000). Mean delta +0.167. The runs-1 drop was the findings-by-tier judge's noise, which recurred on main.Result: no case scores lower on this head. Eval cost $8.25 in total.
Related
plugins/evals/skills/plugin-eval/reference/sandboxes.md, "Removing a read's sandboxes": the removal preflight now points at. It already forbade a glob over<tmp>/claude-eval-*for this reason.🤖 Generated with Claude Code