feat(evals): grade OpenCode continuation evidence #248
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!248
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "evals-opencode-continuation"
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 behavioral evals grade whether a client running the repository's
skills under test continues its subagent handoffs: the
execute-plangrader asks
evals/evidence.pyfor the attempt's roles, reports, andcompleted handoffs.
.agents/skills/execute-plan/SKILL.mdstep 3'scontinuation rule names OpenCode beside Claude and Codex, but the
graders held scenarios for those two clients only:
client()acceptedonly
claudeandcodex, so an OpenCode attempt was rejected wholewith
evidence: unknown client. A maintainer dropping the rule'sOpenCode clause would have met no failing grade.
Closes #243
What changed
evals/evidence.pygrades an OpenCode attempt. It accepts aclientfile naming
opencodeand reads the attempt's storage database,home/.local/share/opencode/opencode.db, opened read-only andimmutable and kept under the same containment
regular()applies toevidence files. The parent session is the one
session_v2row whoseparent_idis NULL — none or several leaves no evidence — and eachchild session reports under its
agentcolumn:rolesprints thechildren,
reportstheir last stopped assistant text, andcontinuedpasses when exactly one
implementer-mediumchild ended at least twouser-handoff segments with such a report, a segment carrying
finish: tool-callscounting as unreported. Claude and Codex gradingis untouched, and
evals/run.shstill takes only--client claude|codex: the OpenCode cases are grader-level, the runner'sOpenCode support stays billed and maintainer-run, as the issue scoped.
tests/agent-config/evals-graders.shnamesopencodein thecontinuation client loop: one case proves two completed handoffs to
one continued medium implementer, and six reject a segment ending in
tool calls, a handoff without its report, a blank handoff, a linked
storage database, ambiguous parent sessions, and a replacing
implementer. A pin records that a client file that is not UTF-8 is
reported by name, as before the containment walk was split out. Each
guarded reader rule now fails the suite when deleted.
How to verify
From a fresh checkout with
jq,python3, andgit:Base
09e9524, the new cases failing for the reported reason:Expect exactly seven
not oklines, each ending(exit 1): evidence: unknown client, andFAILED: 7 of 69.Branch tip
f121a4b:Expect
all 69 agent configuration tests passed.The pin passes on both revisions: on either, write bytes that are not
UTF-8 into an attempt's
clientfile and runpython3 evals/evidence.py client <attempt>; it exits 1 printingevidence: unreadable evidence: client.Checks run, with results:
bash tests/verify-agent-config.sh345/345;
bash tests/check-work-folder.sh46/46;.agents/hooks/shellcheck.sh repo51 files clean;prettier --check '**/*.md'clean;bash scripts/verify-agent-config.shstatically valid,state=template;git diff --check mainclean. Both reviewers approved at the tip;deleting each guarded rule (
finish, the containment walk, thesingle-root guard, the blank-text handoff rule, the report rule, the
codec catch) fails the suite by exactly the case that guards it.
Behavioral eval runs stay maintainer-run and were not run.
Considerations
file; a copy taken while OpenCode still holds rows in its
write-ahead log gives the checkpointed evidence or none, and the
reader's docstring says so for the runner that will one day produce
such copies.
the fixture, mirroring how the file's Claude and Codex branches
repeat their
jqframe; consolidating them would add a helper thework file did not approve.