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.
- 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.
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.