test(evals): pin the unknown client rejection and eval bytecode #252
No reviewers
Labels
No labels
bug
cannot reproduce
duplicate
enhancement
help wanted
invalid
need info
need triage
need verification
not a bug
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
claudiomaradonna/agent-foundry!252
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "unknown-client-pycache"
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 eval graders decide whether an attempt earned its grade, so they
must fail closed: an attempt whose
clientfile is corrupted or namesa client no reader exists for has to be rejected, not graded by the
wrong reader. That rejection exists in
evals/evidence.pybut no testasserted it, so a relaxed check kept every suite green. The same
maintainer's
git add -Acould also stage a stale compiled copy ofthat security-boundary reader, because
.gitignorecarried no Pythonbytecode rule; issue #249 recorded one such copy reaching a draft
commit before review caught it.
Closes #250
Closes #249
What changed
The grader suite now asserts the rejection: a case writes a
clientfile naming a value outside the accepted set into an attempt and checks
that
python3 evals/evidence.py client <attempt>exits 1 printingevidence: unknown client. Dropping or wideningclient()'s checkturns the suite red. The case is a pin of kept behavior:
evidence.pyis unchanged, and the case passes on the base and on the tip.
The source now git-ignores Python bytecode:
.gitignoregains a__pycache__/rule, guarded by a real-source test assertinggit check-ignorecoversevals/__pycache__/evidence.cpython-314.pyc.The guard checks that path rather than the bare directory name because
the directory-only pattern never matches a nonexistent directory name.
How to verify
From a fresh checkout, base
f121a4band branchunknown-client-pycache(
71effb5,6930f9c):python3 -m py_compile evals/evidence.py && git status --porcelainlists?? evals/__pycache__/; at the tip the same commands list nothing,and
git check-ignore -q evals/__pycache__/evidence.cpython-314.pycexits 0. Run each.
bash tests/agent-config/evals-graders.shprints
ok - evidence rejects a client file naming an unknown value(70/70, run); at the base the same suite passes 69/69 without that
case (run, in the proof worktree with the tip's area file, to show the
case passes on unchanged code). The CLI itself behaves identically on
both revisions: a
clientfile holdingfictionalyields exit 1 andevidence: unknown client(run on both).tests/agent-config/real-source.sh, the area fails only onnot ok - the source git-ignores Python bytecode...(run); at thetip the area passes 9/9 (run).
bash tests/verify-agent-config.sh347/347,.agents/hooks/shellcheck.sh repo51 files clean,prettier --check '**/*.md',scripts/verify-agent-config.shstatically valid,
git diff --check mainclean — all run on the tip.Considerations
evidence.cpython-314.pyc;git check-ignorematches on thedirectory rule, so the concrete name only makes the scenario
readable, not interpreter-version dependent.
adds a deterministic local case and an ignore rule, and touches no
policy or skill text.