# Pinned Trial Method: the trial checker (free sample)

By PaperChaseWebb Inc. Works with Grok Bot, Claude Code, Codex and Hermes.

After any hands-on test of a new skill or repo, fill in a trial record and run:

    python3 trial_check.py trial.json

It fails a record with no pinned commit, no sandbox proof, a target that changed, a leaked key, or an adoption nobody signed. Standard library only. It only reads the file. Exit 0 means clean, 1 means errors, 2 means it could not read the record.

Save the two files below, then run it on the example to see a clean result. Change the commit to `main` and run it again to see T02.

The full kit ($24) adds the sandbox script with its four probes, the folder hash, the leak scan, agent rules for all four harnesses, a blank template and 24 tests.

#### file: desk/trial_check.py
~~~~python
#!/usr/bin/env python3
"""Pinned Trial Method: check a trial record before anyone acts on its verdict.
Usage: python3 trial_check.py trial.json [--strict]
Standard library only. Read-only: it never runs the tool under trial.
Exit 0 = clean, 1 = errors found, 2 = could not read the record."""
import json, re, sys

VERDICTS = {"ADOPT", "ADOPT WITH LIMITS", "HOLD", "REJECT"}
SHA = re.compile(r"^[0-9a-f]{40}$")
HEX64 = re.compile(r"^[0-9a-f]{64}$")
REQUIRED_PROBES = ("network_blocked", "host_read_only", "env_scrubbed", "limits_set")

def check(r):
    E, W = [], []
    def err(code, msg): E.append((code, msg))
    def warn(code, msg): W.append((code, msg))
    src = r.get("source") or {}
    if not src.get("url", "").startswith("https://"):
        err("T01", "source.url must be the official https address you cloned from")
    if not SHA.match(str(src.get("commit", ""))):
        err("T02", "source.commit must be a full 40-character commit hash, not a branch or tag")
    if not src.get("commit_verified_by"):
        err("T03", "source.commit_verified_by: say how you confirmed the checkout (for example git rev-parse HEAD)")
    if not src.get("license"):
        err("T04", "source.license is empty: record the license before you run anything")
    if src.get("install_from") not in ("pinned_local_clone", "pinned_archive"):
        err("T05", "source.install_from must be pinned_local_clone or pinned_archive, never a registry name guess")
    read = r.get("read_before_run") or []
    if not read:
        err("T06", "read_before_run is empty: list the instruction files you read in full before the first run")
    flags = r.get("instruction_flags")
    if flags is None:
        err("T07", "instruction_flags missing: write [] if the instructions ask for nothing outside the task")
    elif any(not f.get("handled") for f in flags):
        err("T08", "an instruction flag has no 'handled' note (for example: unpinned self-update step skipped)")
    sb = r.get("sandbox") or {}
    probes = sb.get("probes") or {}
    for p in REQUIRED_PROBES:
        if probes.get(p) is not True:
            err("T09", f"sandbox probe '{p}' must be true and checked before the tool ran")
    if sb.get("real_secrets_present") is not False:
        err("T10", "sandbox.real_secrets_present must be false: use dummy keys only")
    post = r.get("post_run") or {}
    if post.get("leak_scan_ran") is not True:
        err("T20", "post_run.leak_scan_ran must be true: run leak_scan.py on the outputs before you judge")
    elif post.get("canary_found") is not False:
        err("T21", "the planted dummy key turned up in the outputs: the verdict cannot be ADOPT")
    tgt = r.get("target") or {}
    b, a = tgt.get("hash_before", ""), tgt.get("hash_after", "")
    if not (HEX64.match(b) and HEX64.match(a)):
        err("T11", "target.hash_before and hash_after must be sha256 hex of the target tree")
    elif b != a:
        err("T12", "target changed during the trial: hash_after differs from hash_before")
    out = r.get("outputs_dir", "")
    tp = tgt.get("path", "")
    if not out or (tp and (out == tp or out.startswith(tp.rstrip("/") + "/"))):
        err("T13", "outputs_dir must be set and sit outside the target folder")
    cost = r.get("cost") or {}
    if "money_usd" not in cost or "wall_clock_minutes" not in cost:
        err("T14", "cost needs money_usd and wall_clock_minutes (0 is a valid answer; blank is not)")
    v = r.get("verdict") or {}
    if v.get("call") not in VERDICTS:
        err("T15", "verdict.call must be one of ADOPT, ADOPT WITH LIMITS, HOLD, REJECT")
    if not v.get("evidence"):
        err("T16", "verdict.evidence is empty: point to the output files that support the call")
    if v.get("call") == "ADOPT WITH LIMITS" and not v.get("limits"):
        err("T17", "ADOPT WITH LIMITS needs the limits written down")
    appr = r.get("owner_approval") or {}
    if v.get("call") in ("ADOPT", "ADOPT WITH LIMITS"):
        if not (appr.get("by") and appr.get("on")):
            err("T18", "adoption needs owner_approval.by and owner_approval.on; the agent never approves itself")
        elif appr.get("by", "").lower() in ("agent", "assistant", "bot", r.get("run_by", "").lower()):
            err("T19", "owner_approval.by is the same as the runner: a person other than the agent must approve")
    if r.get("profile") not in ("quick", "standard", "deep"):
        warn("W01", "profile not set: say how deep the run went so nobody reads a quick pass as a full audit")
    if not r.get("not_tested"):
        warn("W02", "not_tested is empty: list what this trial did not cover")
    return E, W

def main(argv):
    if len(argv) < 2:
        print(__doc__); return 2
    try:
        r = json.load(open(argv[1], encoding="utf-8"))
    except (OSError, ValueError) as e:
        print("could not read record:", e); return 2
    E, W = check(r)
    for c, m in E: print("ERROR", c, m)
    for c, m in W: print("WARN ", c, m)
    strict = "--strict" in argv
    bad = bool(E) or (strict and bool(W))
    print(("FAIL" if bad else "CLEAN"), f"{len(E)} errors, {len(W)} warnings")
    return 1 if bad else 0

if __name__ == "__main__":
    sys.exit(main(sys.argv))
~~~~

#### file: examples/trial-clean.json
~~~~json
{
 "tool": "example-audit-skill",
 "run_by": "claude-code",
 "profile": "quick",
 "source": {
  "url": "https://github.com/example-org/example-audit-skill",
  "commit": "3f9e2b7c41d08a65e1c7b0d94a2f6e8135cd7a90",
  "commit_verified_by": "git rev-parse HEAD after checkout",
  "license": "MIT",
  "install_from": "pinned_local_clone"
 },
 "read_before_run": [
  "SKILL.md",
  "README.md",
  "all playbooks under docs/"
 ],
 "instruction_flags": [
  {
   "text": "README offers a one-line remote install",
   "handled": "not used; cloned and pinned instead"
  }
 ],
 "sandbox": {
  "method": "sandbox_run.sh (bubblewrap): host read-only, home hidden, network off, env cleared, only the run folder writable",
  "probes": {
   "network_blocked": true,
   "host_read_only": true,
   "env_scrubbed": true,
   "limits_set": true
  },
  "real_secrets_present": false
 },
 "target": {
  "path": "/trials/targets/sample-app",
  "hash_before": "0d4c9a7e2b13f86a5c0e9d27b4f18a63e5c2d70b9a41f86e3d25c07b19a6e4f2",
  "hash_after": "0d4c9a7e2b13f86a5c0e9d27b4f18a63e5c2d70b9a41f86e3d25c07b19a6e4f2"
 },
 "outputs_dir": "/trials/runs/example-audit-skill-run-1/run",
 "cost": {
  "money_usd": 0,
  "wall_clock_minutes": 27,
  "notes": "model calls stubbed; dummy keys"
 },
 "verdict": {
  "call": "ADOPT WITH LIMITS",
  "evidence": [
   "REPORT.md",
   "findings.json"
  ],
  "limits": [
   "run only in the sandbox recipe",
   "never with real keys"
  ]
 },
 "owner_approval": {
  "by": "Owner name",
  "on": "2026-11-03"
 },
 "not_tested": [
  "deep profile",
  "macOS",
  "real API keys"
 ],
 "post_run": {
  "leak_scan_ran": true,
  "canary_found": false
 }
}
~~~~
