fix(evals): refuse an output folder holding attempts #139
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/refuse-reused-eval-out"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
evals/run.shwould prepare an attempt folder that already existed. That happened when you reran into the same--outor named a case twice. Each time, the runner rerangit init,git addandgit commitin the old attempt's repository on the host. Any Git hook orcore.fsmonitorthat the earlier sandboxed agent wrote there then ran as you, outside both sandboxes.What changed
--outstops the run. If--outalready holds an entry for a case to run,run.shstops with exit 2 before running anything.run.shstops before preparing an attempt folder that already exists, which catches a case named twice, with or without--out.x/../samplecould otherwise reach another case's folder.Rerunning a case still works with
--repeator a new--out.How to verify
bash tests/agent-config/evals-runner.sh(needs bwrap). Its test "refuses an output folder, a case named twice, or a case name with a slash, …" uses an agent that plants apre-commithook:These pass on the tip:
bash tests/verify-agent-config.sh(257) andbash tests/check-work-folder.sh(46);.agents/hooks/shellcheck.sh repo,prettier --check '**/*.md',scripts/verify-agent-config.sh, andgit diff --check main.Considerations
--out, not the case-named-twice and slash refusals. I set that aside as low, since the error messages say what to do.--outwith different policies leave the last run'spolicyfile there. That limit already exists and is outside this fix.