An agent can compile and test as many versions as it likes. When it submits one, the host has to decide whether that program can go on a starting grid. It does not ask whether the driver is fast. It asks whether the program runs, and whether it behaves the same way every time.
To decide, the host needs the test results and the exact file they belong to. We keep the program file and the result of every finished test run in Vercel Blob. When the agent submits, the host reads the file again, so the test results it accepts are known to describe exactly those bytes.
The host checks three things. The program must have been run on every track. A second run of one of those tests must reproduce the first exactly. And the program must start up correctly on each circuit, the way the game will start it.
A driver that never finishes a lap can pass all three. A program that is malformed, crashes, or behaves differently on a second run cannot.
The program must run on every track
A submission names one compiled program. It does not get to choose which tests count. The host runs its own fixed list, the solo suite: two runs on every track, each with its own seed.
Each run asks for one lap and stops after 7,200 ticks at the latest. A tick is one step of the simulation, so that is 120 s at 60 Hz.
We keep the result of every finished run in Blob, so at submission time the host can check the results instead of running the whole suite again. Every run on the list must be there, in the same order as the suite.
The host checks each saved result’s content hash and which program it belongs to. A result that only says “passed” is not enough: it has to be tied to this exact file.
In every run, the program first goes through the guard, the step that adds safety checks to the program.
A second run must give the same result
Two files with the same hash are the same program. That says nothing about whether the program does the same thing twice. So we take the first run of the suite and run it again in a new worker, making every decision in order from the first tick.
The order matters because a driver can keep memory between decisions. Its answer at tick 25 can depend on everything it did before. Feeding it only the moments that were saved would test a different computation.
The first run saved a sample every 12 ticks, five per second. The second run saves every tick. The host takes each sample saved by the first run and compares it with the same tick of the second: the state the driver saw, the controls it returned and its debug values. They must be identical. The code calls this check checkCandidate.
This is a limited claim. It shows that one run, repeated, gives the same saved values. It says nothing about the other runs in the suite, or about values that were never saved.
Each circuit gets a short start-up check
The repeat check uses a test from the suite. But the game starts a driver with a different seed than the suite does, so a program could repeat itself perfectly and still fail when the game starts it. To cover that, the host starts the program once on each circuit the suite covered, the way the game would.
These runs are short. Each asks for one lap but stops after 120 ticks, 2 s of simulated time, and each uses a new worker. The check applies the time limits for start-up and for each decision. It checks that the program starts and runs, not that it can race.
The code that accepts a submission explicitly allows a DNF, a run that reaches its tick limit before the lap is done. It rejects a program that is not on ABI 3, version 3 of the interface between host and driver.
Time limits stop a stuck program from holding up the host
A run is limited in simulated time, but that does not limit real time: a single call into the program could take forever. So every limit here is measured on a real clock, and the timers that enforce them, called watchdogs, run outside the worker. A WebAssembly call that never returns blocks its own worker, so a timer inside it would never fire.
| What is limited | Limit | If it is exceeded |
|---|---|---|
| Program start-up | 3,000 ms | The submission is rejected |
| Any single decision | 1,000 ms | A measured overrun rejects; if the watchdog fires instead, the run is inconclusive |
| The second run and the start-up checks together | At most 15,000 ms | Rejects if the checker finds the budget spent; inconclusive if the worker watchdog fires |
The 15,000 ms are one shared time budget. The second run gets whatever is left of it when it starts, and what remains after it is split equally between the circuits.
A rejection is a verdict on the program. An inconclusive run is not, and a failure of the host’s own worker is inconclusive too. We keep these apart so that an interruption on the host’s side never decides whether a program is accepted.