You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add an agent evaluation harness under benchmarks/agent/ that measures steps, tokens, cost and pass/fail per task, so changes to the agent loop can be judged instead of argued about.
Split out of #1186 at @will-lamerton's request, and filed under #772. #1186 stays as the design record for the wider work; this issue is Phase 0 only and stands on its own regardless of what happens to Phases 1–4.
Use Case
#772 is open because of a measured gap: 37.4 average steps and 55,844 output tokens against OpenCode's 16.6 and 17,463, at statistically flat quality, with the model held constant.
Twelve wastage sub-issues have since closed, two of them (#760, #761) specifically step-count fixes. Nobody has measured since. We cannot currently answer "did that help?" for work already merged, let alone for work not yet started.
The existing benchmarks/ suite measures interactive_boot_ms_approx, dist_size_bytes and tool_count startup and packaging. Nothing in the repo can measure a step count.
A separate suite under benchmarks/agent/, run manually or nightly. The existing boot suite is untouched and must keep passing.
Drive the agent by shelling out to the CLI, not by importing in-process: nanocoder --plain --json run "<prompt>". Both flags already exist. This keeps the harness version-agnostic, which is what makes step 7 possible.
Task fixtures small vendored project trees under benchmarks/agent/fixtures/, each with a prompt and a machine-checkable assertion (a file contains X, a test passes, an exit code). Vendored rather than cloned so runs are reproducible, offline, and immune to upstream drift. Six to start, spanning navigation, single-file edit, multi-file change, and a read-only structural question. No LLM-graded scoring it reintroduces the nondeterminism the harness exists to control.
Score from source/usage/, which already records provider-reported tokens and prices them via models.dev. priceTokens() bills cache reads and writes at their own rates, which matters for any later context work.
One additive source change.PlainConversationOutcome returns toolCalls and token counts but no step count, and toolCalls.length is not a substitute a step may issue zero or several calls. Add steps: number to all three variants and surface it in the --json output.
Handle nondeterminism five runs per task per configuration, report median and IQR, pin model and temperature. A single run proves nothing.
Two model tiers a mandatory local Ollama tier any contributor can reproduce, plus an optional cloud tier behind an env var.
Wire pnpm run test:agent-eval. Deliberately not part of test:all too slow and too costly for the commit gate. scripts/test.sh stays as it is.
Exit criterion (Gate 0)
Published baselines for main and v1.29.0, posted back to #1186. If the harness does not reproduce a meaningful gap against a comparison harness on the same tasks, that is a real result and #1186's Phases 1–4 should be reconsidered on the strength of it.
Alternatives Considered
Keep reasoning from the original third-party benchmark. It was run on 1.29.0 and we cannot re-run it or vary it. Two relevant fixes have landed since.
Import runPlainConversation in-process instead of shelling out. Simpler, but it can only ever measure the working tree, which makes the v1.29.0 comparison impossible.
Add it to test:all. Rejected it needs real model calls, takes minutes per run, and would make every PR in the repo slower and flakier.
LLM-as-judge scoring. Rejected nondeterministic scoring on top of nondeterministic runs.
Additional Context
I have searched existing issues to ensure this is not a duplicate
This feature aligns with the project's goals (local-first AI assistance)
Implementation note. AVA's files glob covers only source/** and plugins/**, so it needs extending to benchmarks/**/*.spec.ts or the harness's own specs will silently never run.
Known measurement caveat. The v1.29.0 run will not have the steps field from step 4. Steps will be derived from its tool-call log for that run, and the two are not measured identically, this will be stated wherever the numbers are published rather than quietly averaged together.
Description
Add an agent evaluation harness under
benchmarks/agent/that measures steps, tokens, cost and pass/fail per task, so changes to the agent loop can be judged instead of argued about.Split out of #1186 at @will-lamerton's request, and filed under #772. #1186 stays as the design record for the wider work; this issue is Phase 0 only and stands on its own regardless of what happens to Phases 1–4.
Use Case
#772 is open because of a measured gap: 37.4 average steps and 55,844 output tokens against OpenCode's 16.6 and 17,463, at statistically flat quality, with the model held constant.
Twelve wastage sub-issues have since closed, two of them (#760, #761) specifically step-count fixes. Nobody has measured since. We cannot currently answer "did that help?" for work already merged, let alone for work not yet started.
The existing
benchmarks/suite measuresinteractive_boot_ms_approx,dist_size_bytesandtool_countstartup and packaging. Nothing in the repo can measure a step count.This blocks three things:
Proposed Solution
A separate suite under
benchmarks/agent/, run manually or nightly. The existing boot suite is untouched and must keep passing.nanocoder --plain --json run "<prompt>". Both flags already exist. This keeps the harness version-agnostic, which is what makes step 7 possible.benchmarks/agent/fixtures/, each with a prompt and a machine-checkable assertion (a file contains X, a test passes, an exit code). Vendored rather than cloned so runs are reproducible, offline, and immune to upstream drift. Six to start, spanning navigation, single-file edit, multi-file change, and a read-only structural question. No LLM-graded scoring it reintroduces the nondeterminism the harness exists to control.source/usage/, which already records provider-reported tokens and prices them via models.dev.priceTokens()bills cache reads and writes at their own rates, which matters for any later context work.PlainConversationOutcomereturnstoolCallsand token counts but no step count, andtoolCalls.lengthis not a substitute a step may issue zero or several calls. Addsteps: numberto all three variants and surface it in the--jsonoutput.main, and thev1.29.0tag the original benchmark used. If the gap has already narrowed, that changes what [Feature] Repo Map in the agent loop: persistent index, lookup tools, dedup #1186 is for, and it is much cheaper to learn now than later.pnpm run test:agent-eval. Deliberately not part oftest:alltoo slow and too costly for the commit gate.scripts/test.shstays as it is.Exit criterion (Gate 0)
Published baselines for
mainandv1.29.0, posted back to #1186. If the harness does not reproduce a meaningful gap against a comparison harness on the same tasks, that is a real result and #1186's Phases 1–4 should be reconsidered on the strength of it.Alternatives Considered
Keep reasoning from the original third-party benchmark. It was run on 1.29.0 and we cannot re-run it or vary it. Two relevant fixes have landed since.
Import
runPlainConversationin-process instead of shelling out. Simpler, but it can only ever measure the working tree, which makes thev1.29.0comparison impossible.Add it to
test:all. Rejected it needs real model calls, takes minutes per run, and would make every PR in the repo slower and flakier.LLM-as-judge scoring. Rejected nondeterministic scoring on top of nondeterministic runs.
Additional Context
Implementation note. AVA's
filesglob covers onlysource/**andplugins/**, so it needs extending tobenchmarks/**/*.spec.tsor the harness's own specs will silently never run.Known measurement caveat. The
v1.29.0run will not have thestepsfield from step 4. Steps will be derived from its tool-call log for that run, and the two are not measured identically, this will be stated wherever the numbers are published rather than quietly averaged together.Parent: #772 · Design record: #1186