Acid Judge
Verify what your AI agent actually executes.
Acid Judge verifies that the code approved for an AI agent is the code that actually executes.
Not a policy gate. A policy gate can ALLOW compute_amount after the file on disk has already changed. This gate asks a different question: is this still the approved artifact?
Before execution: the implementation bound for execution matches the approved artifact. The Claude Code hook is this step. Pre ≠ PASS.
After execution: Acid Judge records evidence that the verified implementation ran, and whether the observation conforms to the contract. PASS lives only here.
We don't tell you that your code is safe. We tell you whether it is the code you approved.
An agent can write or change a tool. Acid Judge does not have to believe it. It checks that the approved body is what will run, then checks the observation against the contract. Not enough facts → SKIPPED, not PASS.
Approved-to-executed integrity — Python-first, local, open source, no sandbox, no LLM, deterministic.
Independent execution-integrity layer. Policy asks allowed?. This layer asks which implementation?. A sandbox asks what can the process do?. Embed this component; do not replace those layers.
policy / authorization
↓
Acid Judge ← this layer
↓
runtime / sandbox
Python is the first adapter, not the category. Four surfaces: INTEROP.md.
Trust continuity: approved → locked → verified → executed → observed → receipt. Not a checksum feature. The trust layer sits between the agent and the Python tool it is about to run.
PASS = enough facts to claim the approved body ran
FAIL = mismatch; the body was not the approved one (or the observation failed)
SKIPPED = not enough facts. SKIPPED is not PASS.
The lock catches a tool-file swap between lock and judge. It does not catch a shell, and it does not catch files outside runtime_hashes.
Fail-closed gate of a locked Python-tool body. Catches a file swap between lock and judge. Does not catch a shell, does not sandbox the body after PASS, is not a development OS. Not SaaS, not proven_pure.
Package 0.2.20. MIT core. Supervisor binaries: GitHub Releases (linux-x86_64 / windows-x86_64 / macos-arm64), no local cargo. After pip install the binary finds the contour in the installed package, not in cwd.
Not an MCP gateway. Gateways watch poisoned tool descriptions on the network. Acid Judge checks file bytes of a locally approved Python tool (and the judge contour) right before the call. Complementary layer, not a substitute.
Proof: attacks/. Manual copies: ATTACK.md. TCB: TRUST.md. Runtime law: METHOD.md.
60 seconds
./demo.sh
Honest compute_amount is PASS. The swapped body is blocked. No sandbox, no LLM.
Verify it yourself
No signup. No cloud. No trust required.
git clone https://github.com/AleseyRodkin/acid-judge-smoke.git
cd acid-judge-smoke
./smoke.sh
Run the smoke test: acid-judge-smoke. The product repository explains Acid Judge. The smoke repository is the proof.
Install
pip install acid-judge
acid-judge lock --script FILE --out LOCK.json
acid-judge judge --script FILE --plan LOCK.json --input '...'
acid-judge locks --index locks/index.json
acid-judge diff --script FILE --plan LOCK.json
acid-judge receipt --verify FILE --sig FILE.sig.json --pubkey ed25519.public.pem
python -m acid_engine is the same CLI. PYTHONPATH=. is not needed after pip install.
From git: pip install "acid-judge @ git+https://github.com/AleseyRodkin/acid-engine-2.0.git".
GitHub Action: uses: AleseyRodkin/acid-engine-2.0@v0.2.20. Foreign CI: acid-judge-smoke.
- uses: AleseyRodkin/acid-engine-2.0@v0.2.20
with:
index: locks/index.json
judge: true # optional: execute + receipt. Default is bind only.
Without judge: true — bind only, the body does not run. With the flag — lock → judge → receipt. Not a sandbox. The smoke repo's tamper job must FAIL.
judge without --plan → SKIPPED, not PASS. Hidden run still works; it is not in --help.
What it protects
- Tool body swap between
lockandjudge(if a hook or CI checks the hash) - Static local
.pyimports (dep:).importlib.import_module/exec/evalare not pinned —lockwarns - Judge contour (
runtime_hashes) - Symlink retarget after lock (bytes of the followed path)
- Bind-then-disk-write of a lazy local import (sealed against the locked hash, one read)
- Two tools that both have
helper.pyjudged concurrently (per-context seal, not a sharedsys.modulesname) - Top-level code in the tool file: CLI, supervisor, hook,
locks, anddiffcomparesource_hashbefore import. Mismatch → the file is not imported. ArtifactRef/ JSON blank:source_hash(file bytes) andbody_hash(entry AST) are compared to a snapshot before exec. Empty hashes still load. Same function plus extra top-level code issource_hash.- PreToolUse hook: a tool that reached the hook and is not in the index is deny. Lookup is exact id or resolved script path, not basename. The settings matcher is how Bash never hits the hook.
Renaming a local variable changes the AST canon — FAIL. Comments and blank lines are not in the canon.
The lock is an imprint of a specific toolchain. python_version and canon_kind are checked; a mismatch is FAIL with "re-take the lock", not "the body was swapped".
The supervisor checks SHA-256 of the contour (worker.py, cli.py, python_runtime.py, runner.py, resolve.py, implementation_canon.py, local_deps.py) before identify. No pin → SKIPPED. Mismatch → FAIL. locks --index and CLI judge --plan without a pin → FAIL. judge_script without toolchain → SKIPPED. Incomplete pin → FAIL. judge_script_from_lock reads pins from the lock JSON.
What it does not protect
- Shell outside
judge - What the body does after PASS (fs / net / process). No isolation.
importlib/exec/eval(lock warns)- site-packages / stdlib supply chain (separate control: SBOM / SLSA)
- Environment variables (not part of implementation identity)
judge_scripton an already-importedScriptModule(library). The CLI, supervisor, and hook hash the file before import.lockloads the file you present — that is how a lock is taken.
Threat model: SECURITY.md. Coverage: attacks/. TCB: TRUST.md.
Three commands
| Command | Role |
|---|---|
lock |
lock the body |
judge |
bind before run + verdict |
receipt |
judge … --receipt FILE — Observation + PASS/FAIL/SKIPPED, no proven_pure |
locks --index — live body vs lock in git. Does not execute, not hosted.
diff --script --plan — approved vs live table. Does not execute, not PASS.
receipt --sign / receipt --verify — Ed25519 on the receipt canon, local openssl. Not Sigstore.
The product is Acid Judge. PyPI package: acid-judge. Import: acid_engine. CLI: acid-judge. Repository: acid-engine-2.0.
pip install acid-engine is a different product (data contracts, Apache 2.0). This release does not overwrite it.
Showcase:
acid-judge lock --help
acid-judge judge --script examples/bones/n_plus_one.json --plan examples/bones/n_plus_one.plan.json --input '{"n": 3}' --receipt /tmp/bones.receipt.json
acid-judge judge --script examples/bones/n_plus_one.json --input '{"n": 3}'
Why not PASS, short: wrong body / no execution / pure but effects / type mismatch / lock not passed.
License: LICENSE.
Supervisor, not a second canon
The acid-judge binary is a supervisor: identify → bind → run worker → verdict.
Only the Python canon hashes the body. Without a worker — SKIPPED, not PASS. Observation without a worker is not a verdict.
Contour: cwd/acid_engine/ (this repository), else ACID_ENGINE_ROOT, else the installed package. Not a foreign project's cwd.
Linux/Windows/macOS: Releases.
0.2.x compatibility: COMPATIBILITY.md.
Checks
pip install -e ".[dev]"
python -m pytest tests -q
python locks/ci_judge.py
cargo test --locked --manifest-path rust/acid-judge/Cargo.toml
CI: .github/workflows/acid-judge.yml — pytest (3.11/3.12), locks/index.json, cargo. The job fails if a tool is not PASS. Receipt is an artifact. No plan in the index → does not judge.
Dev: pip install -e ".[dev]" — pytest, ruff, mypy.
ruff check acid_engine tests examples
mypy acid_engine
What holds the gate
- Hash = declaration + body canon (
ast.unparse, else bytecode).ArtifactRefis not identity. plan.lockbefore run. Mismatch → FAIL, the body does not run.- No execution → not PASS. Not enough facts → SKIPPED.
bool ≠ int. - The worker does not write PASS/FAIL.
judge_scriptwithout plan+iface → SKIPPED (self-lock is not a verdict).lock --scriptonly writes JSON.judge_scripton an already-imported object does not re-checksource_hash— the CLI and supervisor do, before import. - The
acid-judgebinary withoutworkerdoes not judge: SKIPPED.
Five tools: examples/tools/ (clean_text, normalize_id, compute_amount, route_ticket, emit_forecast_card) — in locks/index.json with bones.
One hook: examples/hooks/pre_tool_use.py — Claude Code PreToolUse, bind only. Foreign hash → deny. Unknown tool that reached the hook → deny. Pre ≠ PASS. No MCP.
Not in 0.2
Sandbox, MCP hook, Sigstore SaaS, hosted registry, markdown specs, WASM, JS bodies, STOL, prices, a second hash canon in Rust.
Release files for acid-judge 0.2.20
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| acid_judge-0.2.20.tar.gz | 61.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| acid_judge-0.2.20-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 142.3 kB
Release files / acid_judge-0.2.20.tar.gz
| Download URL | acid_judge-0.2.20.tar.gz |
|---|---|
| Size | 61.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
61e1129c2db62550d93b183d7371c616c74c176021d8821a639b0c8bdac6dcc1
|
|
BLAKE2b-256 checksum How to use checksums |
4a58c05bd94f1e59ded7c8c04a89645eacb3db4dc45b09f6b1a65186934ada44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.
Transparency logRelease files / acid_judge-0.2.20-py3-none-any.whl
| Download URL | acid_judge-0.2.20-py3-none-any.whl |
|---|---|
| Size | 81.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3ebcbaa1c172d8100d669e8f498a76e9c1c0404006e0ff8c1a7dab2a4f411034
|
|
BLAKE2b-256 checksum How to use checksums |
467ddfe72967eeea58745d36166d2f0ff0bea5b4a2d097259f6627d19a15de5d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.
Transparency log