feat: add verify script runner for post-agent outcome verification - #4089
Open
melmennaoui wants to merge 1 commit into
Open
feat: add verify script runner for post-agent outcome verification#4089melmennaoui wants to merge 1 commit into
melmennaoui wants to merge 1 commit into
Conversation
Add runVerifyScript() to the evaluation package. It executes a shell script via `docker exec` on the eval container after the agent run completes, enabling filesystem-level and side-effect checks that cannot be expressed as text assertions on the response. - Zero exit code → pass; non-zero → fail - 60-second timeout prevents runaway scripts - stdout + stderr captured, capped at 8 KB - Empty script is a no-op pass (verify is optional) - Fake-runtime test helper avoids a real Docker daemon Closes #4083
melmennaoui
force-pushed
the
feat/4083-verify-script
branch
from
August 31, 2026 16:02
5549027 to
d028a9e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a verify script runner to the evaluation package that executes a shell script via
docker execon the eval container after the agent completes. This enables filesystem-level and side-effect checks that cannot be expressed as text assertions on the response (e.g. "did the agent actually create the file?").Changes
pkg/evaluation/verify.go(new)runVerifyScript()— executes a shell script on a running container:verifyResultstruct — Passed, ExitCode, OutputmaxVerifyOutputBytesconstant (8192)pkg/evaluation/verify_test.go(new)writeFakeExecRuntimetest helper avoids needing a real Docker daemonUsage (wired by #4086)
The eval JSON declares a verify script in the
evalsblock:{ "evals": { "verify": "test -f /workspace/hello.txt && grep -q 'Hello' /workspace/hello.txt" } }After the agent run, the framework runs
docker exec <container> sh -c '<script>'and records the result.Closes #4083