scripts/grader_audit.py audits RL environments and emits a structured JSON receipt (schema_version: 1). Standard library only (Python 3.9+).
Run it from this skill's folder:
# Audit a Harbor / Practice dataset (tasks.jsonl + tasks/<env>/<id>/) python3 scripts/grader_audit.py harbor /path/to/practice-environments --split eval --out audits.json # Audit a Lean Arena dataset (hf/data/<env>/<split>.jsonl + arena/grade.py) python3 scripts/grader_audit.py lean /path/to/math --split eval --cheats --out lean_audits.json # Probe outbound DNS/TCP/UDP from inside an agent sandbox (exits 0 iff offline) python3 scripts/grader_audit.py net-probe --hosts github.com pypi.org 1.1.1.1 # Print a Markdown summary table from any receipt python3 scripts/grader_audit.py report audits.json
What harbor checks
1. **Split isolation (across all splits in tasks.jsonl):**
- Unique task IDs (
duplicate_ids == 0) - Disjoint
(env, seed)pairs betweentrainandeval - Disjoint full task payloads (
instruction.md+ all files underenvironment/workdir/) betweentrainandeval
2. **Oracle validity (on --split, default eval):**
- Runs
solution/oracle.pyin a fresh copy ofenvironment/workdir/and verifiestests/verify.pyexits0withreward == 1.0.
3. **Adversarial & trivial-reply robustness (on --split):**
- Runs the real
tests/verify.pyCLI on missing file (noop_missing), malformed JSON ({not valid json),{}(empty_object), and sampled empty file,"hello",0,null,[]. - Also tests
zero_schema_guess: fills every top-level key referenced intests/checks.jsonwith0. - Verifies zero crashes / infra errors (exit code
0and readablereward.txton every bad input) and measures exact mean reward.
An environment passes (passed: true) when oracle_pass == eval_tasks, crashes == 0, trivial_nonzero == 0, and split_leaks == 0.
What lean checks
1. One-tactic floor: replaces every theorem proof with first | grind | aesop | (simp; done) | omega | norm_num | nlinarith [sq_nonneg (1:ℝ)] | decide in a batched Lean compile. 2. **Vacuity (grind ⊢ False):** replaces every theorem's conclusion with False := by grind to catch inconsistent hypotheses (preserving multi-line binders). 3. **Verifier cheat suite (--cheats):** runs tools/verifier_cheats.py (honest proof = 1.0; sorry, native_decide, user axiom, weaker statement, changed definition = 0.0).
Reading receipts honestly
- A passing receipt establishes grader integrity and split isolation: the reference solution scores 1.0, malformed/trivial inputs do not crash the grader or earn reward, and train/eval payloads do not overlap.
- It does not establish that training on the environment improves a model, that tasks are free of domain-modelling simplifications, or that a benchmark is calibrated to human practitioners. Report those limits alongside any badge.