Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Check the env

miroir check tells you whether the env grades reliably. Run it after every change to the manifest or the tasks, until it passes:

docker run --rm --network none my-env check
miroir check: acme-crm
static                       pass
users                        pass
idle                         pass
mcp                          pass (3 tools)
task                         golden null  repeat  reset  writes golden statuses
count-overdue-invoices       pass   pass  pass    pass   pass   200 200 ok
export-open-deals            pass   pass  pass    pass   pass   201 ok
pay-invoice                  pass   pass  pass    pass   pass   200 200 ok
reset p50 0.9 s, p95 1.07 s; grading p50 0.24 s, max 0.46 s
PASSED

A failed stage prints its reasons under the task, and the command exits non-zero.

Env stages

StagePasses when
staticthe manifest and every task load and validate
usersevery process has a user (write user: root to keep one as root)
idleresets a day and 400 days later work, and 30 s after a reset with no agent action leave no change, no effect and no crash
mcpthe app’s MCP server lists its tools (only with an MCP server)
sandboxthe sandbox reaches nothing of the env’s but its proxy (only with MIROIR_SANDBOX)

Task stages

StagePasses when
goldenthe golden run succeeds, and every call works: HTTP below 400, code exits 0, no tool error
nullan immediate empty submit earns at most null_max (0 by default), and every gate holds
repeattwo more golden runs earn the same reward and the same check scores
resetthe data after reset and setup hashes the same in all of these runs, and as in the first run checked of the same world and setup, time columns aside
writesno file changed outside the state directories
probeseach probe’s reward stays within its bounds
hedgesubmitting the golden answer among wrong guesses earns at most null_max
driftthe golden run earns the same when timestamps sit a day behind dates

hedge runs for tasks whose golden run submits an answer, unless the answer form is integer or date. drift catches checks that break depending on the time of day of the reset.

Options

OptionDoes
--jsonprint the full report as JSON
--world Wcheck only the tasks of world W
--mutatealso replay the golden run once without each of its calls

--mutate shows calls the run still succeeds without (reads, or checks too weak to notice), and calls whose removal still earns a reward.

With a sandbox

Tasks whose runs call run_code need a sandbox. sandbox/check.sh runs the check beside one, the two alone on an internal network. It uses the miroir-sandbox image, or the one SANDBOX_IMAGE names:

SANDBOX_IMAGE=ghcr.io/raphaeldkhn/miroir-sandbox:0.0 sandbox/check.sh my-env

Arguments after the image go to check, such as --json.