test(evals): add a behavioral eval suite #133
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/behavioral-evals"
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
The source's checks are static: they confirm that the policy's files exist and agree with each other. Nothing shows what agents actually do under the policy, or what a run costs. So a rewording of
AGENTS.mdor a skill can't be judged better or worse.What changed
evals/run.shruns six fixed cases with Claude Code headless:fix-bug,implement-feature,document-featureandrefactor-code;Each case runs on a fresh toy repository with one commit's policy installed, inside a bubblewrap sandbox.
Each case's grader checks three things: the outcome, the process the policy asks for (its own branch and worktree, main untouched), and that the work folder passes
check-work-folder.sh --verified. The graders run in a second sandbox with no network.evals/report.shtabulates passes, turns, tokens, cost and time. Given a second run, such as one of main, it compares the two.The README's Maintenance section says to run the suite before merging a change to
AGENTS.md, a skill, a template or a brief.Out of scope: Codex and OpenCode runners, and running the suite in CI, since each run is billed and nondeterministic.
How to verify
bash tests/verify-agent-config.shruns the new runner, grader and report tests with a stub agent. They are free and offline, and skip where bwrap can't start.evals/run.sh --policy main --case questiontakes about 20 s and $0.20.evals/report.sh <printed dir>should then show 1/1.Already run on the tip: all of the README's Maintenance checks pass. One billed run of all six cases against main passed 6/6, for $9.99 and about 34 minutes. Two of the six first failed because their graders were too strict about what the policy allows; I fixed the graders and regraded the saved attempts.
Considerations
/proc(this one included), the agent gets the host's/procread-only. Without one, the agent's runtime aborts. In that mode the agent can read the command lines of host processes, but not their environments. The runner warns about this on stderr.ANTHROPIC_API_KEYis unset, the sandbox gets a copy of the account's credentials file. The runner deletes it when the attempt ends or the runner is stopped. A token refresh inside the sandbox might rotate the host's token; none was seen.timeoutby name instead of by its resolved path would change nothing.