The harness and its cage¶
The most complex piece of the marketplace: a bounded local-LLM agent that can maintain a bundle's own code — allowed to touch that one bundle and nothing else.
A signed task hands the harness three tools — read_file, write_file, rebuild — each
containment-checked against the bundle directory. In the maintainer's proof run it added a new
endpoint to a two-file service, rebuilt it, and the live route went from 404 to a real
response, in three turns, on a budget-capped local model.
audited The harness run was performed by the maintainer against a
real budget-capped model. The transcripts and the guard's error strings below were checked
against containment.rs and agent_loop.rs independently; the run itself was not reproduced by
the documenting host.
Why a green containment test usually proves nothing¶
The interesting half of a cage is proving it holds. It is deceptively easy to write a test that passes while proving nothing — an aligned model refuses an obviously-hostile prompt without ever calling the tool, so the guard is never reached, and the test would pass even with the guard deleted. Three traps stack, each a way a passing test lies:
- The model self-refuses. Phrase the task neutrally — "call this tool with exactly this argument and report what comes back" — so the call reaches the guard instead of the model's conscience.
- A different argument arrives. The model may not pass your literal string. Assert on the argument the transcript recorded, never on the one the prompt asked for.
- The target was never reachable. A relative escape depends on how deep the bundle sits — a
deep bundle makes
../../../etc/passwdmiss real/etcfor an unrelated reason. Use an absolute path, so the guard, not the filesystem, is what refuses.
The only way to know a guard is load-bearing: turn it off¶
With the traps closed, all three containment paths were driven to a real refusal, and the guard's own words came back — distinct strings that prove which path fired:
read_file("../../etc/passwd")
→ Err: "'..' is absolute or escapes the bundle directory, refusing"
read_file(".env")
→ Err: "refusing to touch '.env' — the installer's own secrets file"
read_file("escape-link.txt") # a symlink pointing out of the bundle
→ Err: "resolves outside the bundle directory, refusing"
# a task needing 6 steps, capped at max_turns = 2:
→ status: failed — "max_turns exceeded without the model signaling completion"
The turn-budget line matters most: no silent partial success, no runaway. And the cage was
proven by turning it off — with the guard disabled, the same read returned real host
/etc/passwd contents; restored, it refused again. A guard you have never watched fail is a
guard you have not tested.