Project at a glance
| Role | Design, methodology and engineering, solo |
| Scope | 11 tickets in 4 packs, 3 tries each; a coding track and a design track; 35 pages; 144 test files; 264 commits |
| Stack | TypeScript, Next.js, React, SQLite, Docker, D3, three.js, Playwright |
| Status | Working end to end with a reference agent. The screens below show the bundled sample data, which comes from fictional demo agents and models. |
Why I built it
Every vendor publishes scores for its coding agent, and none of them can be compared: each uses its own tasks, its own harness and its own grader. I wanted one place where every agent gets the same tickets, the same sandbox and the same hidden tests, and where the result says plainly when two agents cannot be told apart.
What it does
Shows every result, not just a rank
Each contestant tries each ticket three times, each time in a fresh container. The leaderboard gives a pass rate with a 95% interval and brackets the ranks the data cannot separate. The grid behind it shows every try, ticket by contestant, hardest ticket first.
The run grid on sample data: three tickets down the side, four fictional contestants across, with a mark for each of the three tries per cell.
Explains why a try failed
A failed try opens on its reason: the hidden tests that still fail, the diff, the transcript and what it cost. Labels such as partial fix, regression and ran out of time are set by fixed rules from the grader's stored results, never by a model.
A failed attempt on sample data, opened on why it failed: four hidden tests still failing, with the time, cost and tokens the try used.
Judges design work blind
A second track sends one prompt to several models, which answer as a three.js scene, a web page, an SVG illustration or a shader. Their work is shown in unlabelled pairs. Votes feed a rating with its own range, and the names stay hidden until you have voted.
A blind pair from the design track on sample data: two illustrations of the same prompt, with the models' names hidden until the vote is cast.
How it is built
The rest of this page is for the engineer who wants the detail.
Architecture
There are four parts. The web app reads the database and shows results; it never touches Docker. A runner is a separate command-line process that the app starts, detached, for each run. One SQLite database holds every run, try, grade, model call and cost, with transcripts and diffs kept as files beside it. Docker runs everything untrusted.
Architecture: the browser talks to a local web app; the app starts a runner; the runner makes model calls from the host and drives an attempt container and a separate grader container, both without a network.
One try, from start to leaderboard:
- The runner claims the run with a lease and a ten-second heartbeat, so a runner that dies is noticed and the run can be resumed.
- It builds the base image and one image per ticket, then works a seeded, shuffled queue. A try starts only when its memory limit fits beside the tries already running.
- It creates the attempt container and runs the agent. The reference agent's loop and its model calls run on the host; only its five tools run inside the container.
- The diff is collected, the container is removed, and the transcript and diff are saved, redacted and hashed.
- A fresh grader container applies the diff and the hidden tests. The grade, the test results and the cost are written in one transaction.
- Pages work out standings from those rows.
The sandbox for one attempt
The base image is pinned by digest, with its system packages taken from a dated snapshot. Each ticket image copies in the repository at the commit before the fix, with a fresh one-commit history and any agent-instruction files stripped. The issue text is never in the image; it goes into the prompt on the host.
Every container is created the same way:
docker create --user 1000:1000 --cap-drop ALL
--security-opt no-new-privileges --network none
--pids-limit 512 --cpus 2 --memory 4096m --memory-swap 4096m
--ulimit nofile=4096 --tmpfs /tmp:rw,nosuid,size=1024m
<ticket image> tini -- sleep infinity
There is no volume and no mount of any kind. A unit test pins this list and fails if a mount, a device, an added capability or the Docker socket ever appears in it. No API key enters the container, because model calls leave from the host. Each shell command the agent runs is wrapped in a timeout cut to the time the try has left, 20 minutes in all by default.
The work comes out one way: git add -A && git diff --cached --binary base, read from standard output with a size cap. The diff is what git would commit.
Grading
Grading never happens in the container the agent used. A new one is started from the ticket image, again with no network, and the agent's diff and the hidden tests are copied in.
- Tests are restored first. Any test file or test-runner config the diff touched goes back to the base commit before the hidden tests run. The list of touched paths comes from git and also from the paths named in the diff text, because a diff could add a config file and hide it with an ignore rule.
- Results are cross-checked. The grader reads the JUnit file and compares it with the exit code; a clean file with a failing exit is an error, never a pass. Running out of memory is told apart from running out of time.
- The test lists are earned. Each ticket's tests run three times before the real fix and three times after. A test counts only if it fails every time before and passes every time after; anything flaky is dropped. The real fix then has to pass through the same containers three times out of three, and an empty diff has to fail.
Decisions that mattered
- A diff that breaks the test run looked like an infrastructure error. Now a broken grade is repeated, then an empty diff is graded in the same image as a control. If the control is clean, the agent's diff broke the run and the try fails.
- A dead runner left its run "running" for ever. Status is now derived from the lease by whoever reads it, and pages never write.
- Assuming 4 GB per try pinned concurrency at one. Tries are admitted by the sum of their memory limits. A ticket may lower its limit, never raise it, and only if its real fix still passes under the lower one.
- Keeping the key out of the box. Running the agent loop on the host and only its tools in the container means the container needs no network at all.
Reproducibility and cost
A run records the hash of its pack, its seed, the prompt version, the limits and the commit of the bench itself, and refuses to start if a ticket's files have changed. A stored diff can be graded again later. Every model call is a row with its cost, a spend hold is reserved before a try and settled after it, and each figure is marked as billed or as an estimate, never blended.
Testing
| Layer | Test files | What it covers |
|---|---|---|
| Unit | 63 | The container flag list, grading decisions, diff collection, statistics, redaction |
| Integration | 54 | The database, routes, launching and recovering runs, reports |
| Sandbox | 7 | Real Docker: escape attempts, limits, the grader, cleanup after a crash |
| End to end | 20 | The built app in a browser, with accessibility checks |
Every test layer runs against a throwaway data folder, replays recorded model answers and has every API key removed, so a test can never spend money.
Limits and what is next
Eleven tickets is a small pack, so only large gaps separate two agents; the app prints the smallest gap each run could have detected. Many public fixes are older than the models, which the results mark. Adapters for vendor command-line agents are set aside for now, and the app's newest runner paths have not yet run a real attempt.
What the project demonstrates
Agent Bench shows how I approach evaluation: fix the tasks, isolate what is being measured, report intervals instead of single numbers, and call a tie a tie.
