Repository navigation
v0.6.0
Added
-
The project's own test command, run over what a turn wrote.
verify.py
has always argued that running the model's new code to find out whether the
model's new code is safe to run is not a check -- it is the thing the check
exists to avoid. That holds for the module just written. It does not hold for
a command the user chose, wrote down, and already runs by hand: the agent
running it is not the agent deciding what to run.It runs on the answered path, the one moment a turn is known to have stopped
writing. After every write it would put the test runner inside the edit loop
and spend the iteration budget on it; here a turn that edited costs one run
and a turn that only read costs none, which is most of them. A failure goes
back as a tool result the model corrects from -- the same path a malformed
call takes -- bounded at two runs, where the first is the check and the second
is the fix being checked. The second failure asks for an account rather than a
third attempt, because a turn that ends naming the failing test is worth more
than one that ends having tried again and run out mid-edit.Four outcomes, not two. A timeout and a command that could not start are
distinct from a failure: neither says anything the model could act on, so
neither is fed back. Esc cannot reach a blockedwaitpid, which is why the
timeout is 120 seconds rather than generous -- what bounds the wait here is
the timeout, not the key.Nothing runs until
verify_commandis set, and nothing infers its way into
it.doctorsuggests one from a marker file and prints the command that
would turn it on; a baretests/directory suggests nothing, because it says
a project has tests and not what runs them.--verify-commandsets it for one
run,--no-verifyturns it off for a session without costing what was
configured, and/contextsays which it is.Two things came out of running it rather than reasoning about it. A bounded
turn never reached the check at all -- it ends through_final_answer, and a
turn that ran out mid-edit is precisely the one most likely to have left the
tests broken; it now runs there too, reported and never fed back. And the
"did this turn write anything" flag meant at some point rather than since
the last check, so a model that read a failure, correctly judged it
unrelated, and answered without editing paid for a second identical run. -
verify_commandandverifysettings.verify_commandis the one text
setting permitted to be empty: for every other one an empty value is a
session that cannot start, and refusing it puts the error on the keystroke,
but empty is exactly how this one says "run nothing". -
scripts/benchmark.py-- what a turn costs, per task: seconds, iterations,
tool calls and how it stopped, with--outto save a run and--compareto
put two of them side by side. All of it was already recorded;Outcome
carries every field and every turn writes one to the session file, and
nothing read them back. Until something did, a change to what the model is
sent could only be argued about.The backend is whatever a session would use unless one is named, so it
measures what the user runs, fallback included. The tasks are read-only,
which is the one place this differs fromtraining/generate.py: a task that
edits the tree leaves a different repository behind than it found, so the
second run of a comparison is not measuring the same work as the first, and
the change under test gets credit or blame that belongs to the edit.
Changed
grephanded a glob where a path goes now says which argument the pattern
belongs in, and writes out the call that would have worked.path not found: .github/workflows/*.ymlis true and useless -- the string was never meant to
be a path, so the model saw nothing to change and resent the same call until
the loop's bounds ended the turn. Found in a real session that spent its
whole iteration budget that way and answered from vendored workflows it had
stumbled into. A path that is simply missing says only that, as before.- A pasted image is encoded once instead of once per round trip. The provider
base64s every image on the message it sends, and a turn sends its whole
history on each of up to twenty-five iterations, so one screenshot was read
off disk and encoded twenty-five times to produce twenty-five identical
strings. Keyed on the file's identity rather than its name, so an image
re-saved at the same path is encoded again.
Measured
The first thing the benchmark was pointed at was the scout, because its own
first run kept landing on it: two read-heavy tasks both came back
1 iteration, 0 tool calls, answered, the model having answered out of the
injected search snippet without opening a file. 0.4.0 recorded that shape as a
hazard and left it there. With --no-scout to compare against, on
qwen2.5-coder:14b:
task with scout without
what does the agent loop do when
a tool call is malformed? 112.6s 1 iter 167.6s 1 iter
which module decides whether a
tool call needs permission? 43.3s 1 iter 309.6s 3 iters, 2 calls
total 155.9s 477.2s (+206%)
So the snippet is not only a shortcut past reading -- it is the difference
between one round trip and three, and on the second task it saved four and a
half minutes. That is the opposite of what "hazard" suggests, and it is worth
having the number before anyone reaches for the lever.
Two limits on the reading, stated because the figure invites more weight than
it can carry. It is two tasks on one machine, and this one is spilling 1 GB of
KV cache to CPU, so the per-turn cost is high and its variance with it. And the
benchmark measures what a turn costs, never whether it was right -- the first
task answered a question about the agent loop without opening a file in either
arm, which is fast in both and only useful if the answer is true. Correctness
is a different instrument, and this is not it.
Two other candidates were built, measured and dropped, which is the more useful
half of the result:
- Running a round's tool calls concurrently. The protocol is one call per
reply and says so in the prompt; across 558 sessions on this machine, 187 of
189 replies carrying a call carried exactly one. Concurrency in the loop
would apply to 1% of rounds, so it was not added. - Caching the workspace read that scouting does before every turn. Built
and measured at 8% of scout on this repository -- 94 ms to 87 ms -- because
reading is not where scout's time goes; the per-line regex scan is, and that
depends on the terms, which change every turn. Seven milliseconds against an
eleven-second turn does not pay for a cache that can serve a stale file, so
it was reverted.
The image change was kept on the opposite reasoning: 4.2 ms to 0.012 ms on the
repeated call, and unlike the scout cache its saving grows with the file rather
than staying a fixed fraction of it.