🧪 DeltaOS Gym: Linux and eBPF tasks for coding agents, graded by proofs and kernel tests
In brief
- 🧪 Six tasks in Harbor format: a coding agent makes one exact change to Linux or eBPF code.
- 🧾 Each grader uses the strongest fitting check (CBMC proof, model checking, real launches, run inside the kernel) and writes a receipt per reward.
- 📊 The first version's graders accepted 27 further wrong solutions; version 1.0 rejects 71 of 71 wrong ones and accepts 85 of 85 correct runs.
- 📜 MIT licence, repository on GitHub.
🧪 DeltaOS Gym is a small set of six tasks in which an AI coding agent must make one tightly defined change to Linux or eBPF code: an egress policy in a BPF program, overflow-safe accounting in a BPF map, or crash-safe file publishing. Unlike usual benchmarks built on unit tests, grading uses proofs from the model checker CBMC, exhaustive checks, real launches on Linux, or running the compiled BPF inside the kernel. Next to the 0-or-1 reward it writes a receipt listing each claim with its evidence. According to the project page, the graders were themselves tested. The page presents the project as a starting point, not a finished benchmark.
By the project's own account the road there was instructive. The first version (0.5) rejected its 20 planted bugs but gave full reward to 27 further wrong solutions. Examples: the grader tested an x86 build while the kernel got a different program, because sizeof(long double) is 16 on x86-64 and 8 for BPF. The candidate ran in the grader's own process and could write the verdict itself. A backdoor on one input in 2^113 passed 25,000 random tests; CBMC instead proves equality with the contract for all inputs or returns a counterexample. The crash model let a failed fsync be repaired by calling it again.
Version 1.0 replaces the graders: candidate code runs only in a sandbox under another user, decision functions must be plain integer C, and receipts carry, among other things, the artifact's SHA-256. Measured on Linux 7.1.4, 0 of 71 wrong candidates were accepted (355 runs) and 85 of 85 runs of correct, differently written solutions. One task comes from the tutorial of the eBPF security platform shirudo (a detector for CVE-2026-63984); the project is independent of it.
Usage: clone the repository, build the Docker image and grade one task's controls or your own candidate; the kernel tier loads BPF into the kernel and belongs only in a disposable VM. The page states its limits itself: the crash model is small and not ext4, proofs hold only within CBMC's semantics of C, and without root there is no second user. The code is MIT licensed, BPF sources GPL-2.0 or MIT.