in use
The machines that test the machines
Four test venues, a bench with serial consoles, and a two-minute cycle that runs before a person touches a router.
Every router change used to mean a person, a cable and twenty minutes. Flash, log in, buy a voucher, check the portal, put it back. Do that four times per release and the day is gone.
That is no longer how it works. A commit now starts a chain that ends with evidence, and the first human to look at it is looking at results rather than doing setup.
Four venues, one suite
The same pytest suite and the same router abstraction run in four places: a local QEMU VM, an Android VM, a cloud VM, and the physical bench.
QEMU for logic, Cuttlefish for phone UX, the cloud for full runs, hardware for the radio.
The backend is a flag (go, rust-basic, rust), not a separate test suite. The client is a flag too: a physical phone over adb, Cuttlefish, a container, or the local WiFi.
The pipeline
Six stages run unattended. The human is the last box, not the second one.
A commit that fails early never reaches the bench. A run that fails at the bench publishes its own logs, screenshots and JUnit, so the first person to see it already has the evidence.
The Hermes fleet
No public ingress and no tunnel service: hosts are reached over FIPS by npub.
x280 is the only host that runs tests against the lab routers. T14 is a console and runs the OpenBao store. ai-legion is the labgrid coordinator; ai-legion-small is the PoE farm; hermes-nvme is the CI runner; cobrador is the bench gateway. The MT6000 is production and is deliberately not in the test inventory.
How the bench is wired
Firmware goes over the network; serial is the way back when a flash goes wrong.
Serial consoles run at 115200 8N1, 3.3 V. The MT3000 is on T440, the MT6000 on x280. Radios are off whenever the bench is idle, and every router-touching run takes the shared lease first.
What the bench is allowed to touch
Leases, not copies. Production keys are outside the policy.
OpenBao runs on T14 and issues an AppRole to x280 that can read only secret/data/fleet/test-routers-*. Router passwords live there and are not rotated on the bench. SSH is key-only: ten fleet keys plus one lease-scoped bench key; password authentication is off.
Infrastructure as code
Ansible for hosts, Pulumi and SHC for cloud, OpenBao for secrets, pytest and labgrid for tests.
Every venue can be rebuilt from the repository. The entry point is one command, and the same command is what CI calls.
The measured cycle
A full reinstall cycle on the COVR rig: about two minutes ten seconds, measured three times.
The slow part is the reinstall, not the assertions. That is the right shape: if the test phase were the slow part, the tests would be the thing to fix.
Coverage
Backend and venue are switches. The same tests run everywhere.
The same pattern on our own model calls
The fleet also routes its own work. Requests go through hard eligibility filters, then a flat market of model providers where every provider is equal and the cheapest healthy one wins. A Kalman filter tracks price and burn, and a small decision model, Kev, chooses among the candidates that are already eligible.
Code owns the hard filters. Kev judges among the eligible. A deterministic scorer is the fallback.
The scale is why it matters: 3,014 decisions in 29.5 hours came from only 80 unique inputs. Caching by content hash removed about 97% of the work, and no human made any of those calls.
What still needs a human
New hardware, a radio that misbehaves in a way no assertion describes, and the decision about whether a result is good enough to ship. The bench narrows that to judgement; it does not replace it.
Get involved
physical-router-test-automation— the suite, the labgrid environments, the bench scripts.merchant-routing-engine— the flat-market router.cvm-kalman-server— the Kalman state over ContextVM, with a live dashboard.kev— the decision models.
Issues and questions: open one in the repo, or message the TollGate team on Nostr (npub1zzt0d0s2f4lsanpd7nkjep5r79p7ljq7aw37eek64hf0ef6v0mxqgwljrv, also in the index).