computedriven computedriven/docs/r09-evidence-gate-brief.md
Written and committed BEFORE any bot conversation was opened. This file is the whole of what the bot is given. It names an outcome, its inputs, its constraints and its acceptanc…

The R0.9 evidence gate: the brief (R130 option b)

Written and committed BEFORE any bot conversation was opened. This file is the whole of what the bot is given. It names an outcome, its inputs, its constraints and its acceptance laws. The planted bugs it will be judged by are held separately and are not shown here.

Ruling: R130 (Travis, 2026-10-02): ComputeDriven Edge R0.9 is accepted. Its kernel leg's code and evidence are also reviewed THROUGH Super (R97). Super's review runner (repository-python-gate@1) will run this gate over a snapshot of computedriven's tracked files, without network, git or a writable tree.

The outcome

One new file, `tools/r09_evidence_gate.py`, run from the repository root as python3 tools/r09_evidence_gate.py --check. It decides, offline and from the files alone, whether R0.9's accepted evidence is intact and still describes this tree. It exits 0 only if every law below holds, and 1 otherwise.

Inputs (read these and nothing else)

  • lab/r09close/evidence-gate-reference.json, the pinned reference, written separately from the gate. Its fields:

battery.receipt (path), battery.sha256, battery.legs_dir, battery.required_legs (an ordered list), correlation (a map from leg name to a list of gate names), frozen.crates, frozen.blobs (a map from path to a 40-hex git blob id), and static_gates (a list of paths).

  • The battery receipt and leg logs under receipts/r09-evidence/, as named by the reference.

  • The files under the frozen crates' directories.

  • The three static gates named in static_gates, executed IN-PROCESS (see G4).

Constraints

  • Python 3 standard library only.

  • No subprocess, os.system, os.exec*, socket or urllib. No network. No git. No ctypes.

  • Writes nothing anywhere.

  • Deterministic. Finishes in under 60 s.

  • One whole file of at most 64 KiB (Super's proposal cap).

  • Does not trust any claim inside the receipt that it can recompute; it recomputes.

  • A missing or unreadable input is a FAIL of the law that needed it, never a crash and never a pass.

The laws (each prints exactly one line, G<n> ok <detail> or G<n> FAIL <reason>)

  • G1, the battery evidence is intact.

  • The receipt file's SHA-256 equals battery.sha256, and its result is "PASS".

  • Its legs list names exactly battery.required_legs: the same names, the same count, no repeats, no extras.

  • Every leg has exit 0.

  • For every leg, <legs_dir>/<leg>.log exists and its SHA-256 equals that leg's log_sha256 in the receipt.

  • G2, the correlation and reuse evidence is present.

  • For every leg named in correlation and every gate name listed under it, that leg's log contains a line whose

first two whitespace-separated fields are exactly ok and the gate name.

  • No line in that log has first field FAIL or RED with that gate name as its second field.

  • G3, the frozen crates are exactly the pinned bytes.

  • The set of regular files under each directory in frozen.crates equals exactly the set of paths in

frozen.blobs: nothing missing, nothing extra.

  • Each file's git blob id equals its pin. The blob id is computed in-process as

SHA-1 of b"blob " + str(len(data)).encode() + b"\0" + data.

  • G4, the static boundaries still hold.

  • Each path in static_gates is run in-process, in order: runpy.run_path(path, run_name="__main__"), with

sys.argv = [path] and its stdout captured.

  • A SystemExit with code 0 or None, or a normal return, is a pass. Any other exit code or exception is a FAIL

naming the gate.

  • Restore sys.argv and stdout after each.

  • G5, the verdict.

  • After G1–G4, print EVIDENCE GATE HELD and exit 0 if all four held.

  • Otherwise print EVIDENCE GATE BROKEN: followed by the failed law names separated by spaces (e.g. G1 G3), and

exit 1.

  • Every law is evaluated even if an earlier one failed.

What it must not do

  • Must not read the leg logs' "ok" lines for any gate other than those listed in correlation.

  • Must not re-derive the reference.

  • Must not skip a law because an input is missing.

  • Must not exit 0 on an exception.

  • Must not print file contents beyond short reasons.

How it will be judged

The runner executes the gate on the clean snapshot, where it must print EVIDENCE GATE HELD and exit 0. Separately, the supervisor's harness applies each of its held-back plants to a copy and requires the law that plant targets, and only that law, to FAIL. Codex reviews the code (R112). Accepting the review and completing the plan need Travis's yes.

Open in the interactive atlas