Conversation
dorrfrog
force-pushed
the
feature/verify-step
branch
from
June 8, 2026 10:20
8c6097b to
5ddcea5
Compare
dorrfrog
force-pushed
the
feature/verify-step
branch
from
June 8, 2026 10:30
df50dd7 to
694bca2
Compare
dorrfrog
force-pushed
the
feature/verify-step
branch
from
June 8, 2026 11:37
694bca2 to
100511c
Compare
…ode)
Adds a `verify` exec-test grader - the deterministic, cheap signal an LLM
judge can't match: "did the agent's change make the project's own test
suite pass?". Declarable per-turn (`Turn.verify`) or per-scenario
(`Scenario.verify`, end-of-conversation). The runner executes the
author-declared command (argv, no shell) in the per-scenario worktree and
records the exit code + captured stdout into TurnOutput; the rule-based
scorer asserts it as the `verify` dimension (gate via rules/verify).
Security (default-deny, see docs/glossary/SECURITY-MODEL.md): verify
executes an author-supplied command, so it is gated behind
--allow-verify-exec / BELT_ALLOW_VERIFY_EXEC, runs only with an isolated
worktree (group refused at setup otherwise), routes through the active
sandbox provider, gets a minimal credential-free env, caps stdout, and is
killed on timeout. Captured stdout is ANSI/OSC-stripped at capture so no
terminal-escape can reach a renderer or split a match; on failure a
sanitized, length-capped stdout tail is surfaced in the report so a user
sees why. output_contains are plain substrings, not regex.
Design alignment (ARCHITECTURE.md): no new payload (stays a CheckEntry in
RulesPayload; scenario-level uses turn_idx=None), no Base* signature
change, Optional fields with safe defaults (skip -> tri-state passed=None),
BELT_ALLOW_VERIFY_EXEC sourced once from envvars.py, docs updated in the
same PR. Mirrors the state_expect capture-then-assert pattern.
- schema (scenario.py): VerifySpec on Turn.verify / Scenario.verify.
- artifact (entities.py): TurnOutput.verify_result + scenario_verify_result.
- runner (orchestrator.py): execute + capture via the sandbox spawner.
- gate (envvars.py, run.py, eval.py, setup_groups.py): default-deny + flag.
- scorer (scorer/rules/verify.py): check_verify / has_verify.
- example: showcase/verify group on the tasktracker fixture (per-turn +
per-scenario), force-included in the wheel; tasktracker pytest pythonpath
fixed for bare-worktree runs.
- tests: schema, check_verify, rules integration, runner exec (timeout +
ANSI strip), setup gate, sanitized failure tail; layout guard extended.
- docs: SECURITY-MODEL (T15, S5.11, gate), SCENARIOS, SCORING,
CONFIGURATION, OUTCOMES.
Verified end-to-end: a real run edits the fixture and runs pytest in the
worktree -> verify_result {exit_code: 0, "10 passed"}, 5/5 checks.
Closes #9.
Co-authored-by: Cursor <cursoragent@cursor.com>
dorrfrog
force-pushed
the
feature/verify-step
branch
from
June 8, 2026 11:56
100511c to
1e8cc27
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.
Closes #9.
Summary
Adds a deterministic
verifystep - the exec-test grader. A scenario declaresverifyeither on a turn (Turn.verify) or on the scenario(
Scenario.verify, end-of-conversation). The runner executes theauthor-declared command in the per-scenario worktree and records the exit code
TurnOutput; the rule-based scorer asserts it as theverifydimension (gate with--threshold rules/verify:0). This is thestrongest, cheapest grader for code-editing scenarios - "did the agent's change
make the project's own test suite pass?" - the deterministic half an LLM judge
can't match.
Design (no new payload, no signature change)
scenario.py): oneVerifySpec(cmdargv,exit_code,output_containsplain substrings,timeout) onTurn.verify/Scenario.verify(parallel tostate_expect).entities.py):TurnOutput.verify_result(per-turn) andscenario_verify_resulton the final turn (per-scenario) - additive.orchestrator.py): execute + capture via the orchestrator's ownsandbox
spawner; per-turn after git-state capture, per-scenario after theloop while the worktree still exists. Skip-on-agent-error -> tri-state
passed=None(not a false fail).scorer/rules/verify.py):check_verify/has_verifywiredalongside
check_state; per-scenario emits a turn-lessCheckEntry. Stays aCheckEntryinRulesPayload.Security (default-deny)
verifyruns an author-supplied command, so it is gated behind--allow-verify-exec/BELT_ALLOW_VERIFY_EXEC, refused at setup without anisolated worktree, routed through the active sandbox provider (in-container
under
--sandbox docker), given a minimal credential-free env, output-capped,and killed on timeout. Documented in
SECURITY-MODEL.md(threat T15, controlS5.11, gate table) plus
SCENARIOS.md/SCORING.md/CONFIGURATION.md/OUTCOMES.md.Example
examples/scenarios/showcase/verify/on thetasktrackerfixture: a per-turnscenario and a multi-turn per-scenario scenario. (Fixed
tasktracker's pytestpythonpathso the src-layout package imports in a bare worktree.)Test plan
tests/scorer/rules/test_verify.py: schema,check_verify(pass/fail/skip), rules integration (per-turn + per-scenario), runner exec
incl. timeout, and the setup gate (off / allowed / no-worktree).
tests/test_scenarios_layout.pyextended to requireTurn.verifyandScenario.verifyshowcase coverage.bandit/gitleaks/design) clean.
verifyruns pytest inthe worktree ->
verify_result {exit_code: 0, "10 passed"}, 5/5 checks.Out of scope
pre_runbackground daemons (separate seam/lifecycle).