Skip to main content
BlackBadHope
Back to Selected Systems

evidence-gate

v0.1.1 Verifiable Build & Test Caching MIT 2026

SHA-256 digest-bound test execution ledger and rate-limited anti-loop monitor FSM eliminating 30–60% wasted AI coding agent test re-runs on unchanged trees.

View on GitHub PyPI Package
pip install integrity-evidence-gate
Cached pass cost
0 ms
Redundant re-runs cut
30–60%
Verified tests
35+ pass
Shell invocation
shell=False

System Topology

Computes deterministic SHA-256 digests over scoped source trees, command argv, and runtime environment to return instant SKIP_CACHED_PASS (0 ms) on unchanged verified trees, backed by a strict shell=False runner and rate-limited anti-loop monitor FSM.

Digest Inputs Scoped file tree argv[] + env hash SHA-256 Ledger Exact prior PASS? Anti-loop FSM guard HIT MISS SKIP_CACHED_PASS 0 ms · 0 spawns Cuts 30–60% re-runs Subprocess Runner shell=False always Record PASS receipt

Constraint & Failure Mode

Autonomous coding agents repeatedly re-run full test suites on identical file trees after doc edits, status checks, or retry loops—burning minutes of wall-clock time and quota without generating new evidence.

Mechanical Architecture

  • Hashes the target file tree, normalized argv vector, and declared environment fingerprint into a deterministic SHA-256 evidence key.
  • When a prior immutable PASS receipt matches the exact digest, returns SKIP_CACHED_PASS in 0 ms with zero subprocess spawns.
  • Executes uncached checks strictly via shell=False argv arrays to eliminate command injection across Windows, Linux, and macOS.
  • Includes a finite-state anti-loop monitor that trips rate limits when an agent hammers identical failing checks without modifying inputs.

Engineering Trade-Offs

  • Requires explicit argv and scope inputs rather than arbitrary shell strings—trading bash one-liner convenience for injection immunity and deterministic hashing.
  • Caches only verified PASS receipts bound to exact input digests; any single-byte tree or env delta forces a clean re-execution.