Tracefold holds a checked inverse for an AI agent's change before it lands, in Rust. If the inverse cannot be built, the agent stops and the decision escalates to human approval. Every verdict becomes a tamper-evident receipt verifiable offline.
┌────────────────────────────────────────────────────────────────────────────┐
│ 🔴 🟡 🟢 tracefold-demo-session — 10s Verification Probe │
├────────────────────────────────────────────────────────────────────────────┤
Three files on that terminal: a receipt, a signed checkpoint, a public key. No account, no network call.
- Valid receipt: verifies instantly and exits
0. - Flip exactly one byte:
cmp -lconfirms the 1-byte diff, and the exact same command exits7.
▶ View Asciinema Cast (Raw Timings) · Read Offline Verification Mechanics
|
Open tracefold.github.io/tracefold/verify.html Paste a receipt and key. Runs 100% via in-tab WebAssembly (network requests strictly 0). |
|
import { readFileSync } from "node:fs";
import { verifyReceiptOffline } from "@mahirhir/tracefold";
const key = JSON.parse(readFileSync("key.pub.json", "utf8"));
const result = verifyReceiptOffline(
readFileSync("commit_receipt.json", "utf8"), key.key_id, key.public_key,
readFileSync("checkpoint.json", "utf8"), key.key_id, key.public_key
);
console.log(result.valid, result.checks.inclusion); // true "verified"| Dimension | Traditional Post-Hoc Audit Logs | TraceFold Pre-Fact Provenance |
|---|---|---|
| Execution Order | Action executes first $ | |
| ightarrow$ Logged afterwards | Inverse constructed & checked $ | |
| ightarrow$ Action lands | ||
| Irreversible Damage | Discovered only after system corruption | Blocked at the gate; escalates to human approval |
| Verification Trust | Must trust the host/server that produced the log | Zero-trust offline verification via standalone WASM |
| Verdict Precision | Binary (Pass/Fail) conflates errors with attacks | Tri-state: Verified, Refuted, Unknown/Unparseable |
[ 01. AI Agent Action ]
│
▼
[ 02. Deterministic Gate ] ──(Cannot build inverse S⁻¹)──► [ 🔴 Halt & Escalate to Human ]
│
(Inverse S⁻¹ sealed)
│
▼
[ 03. Action Lands & Receipt Issued ]
│
▼
[ 04. Offline WASM Verifier ] ──► Exit 0 (Verified) / Exit 7 (Refuted)
TraceFold implements the Deterministic Approval Gate (Layer 3: Mechanical Laws) and the Receipt & Escrow Substrate (Layer 8: Provenance & Receipt) within the broader Glovrex Digital World computing architecture.
| Dimension | Measured Value | Conditions & Scope |
|---|---|---|
| Test Floor | 2,602 probes | 454 suites + SDK 36 passed · fresh clone · 25 Aug 2026 |
| Lean Formal Proofs | 117 theorems | Lean 4, sorry 0, 12 counterexamples |
| Open High Holes | 0 | After 44 adversarial audit rounds |
| Unmeasured Platforms | 3 environments | Windows native, OneDrive, SMB |
| Out of Scope | Why it cannot be closed from inside |
|---|---|
| Root or kernel-privileged writes | Bypasses the tool entirely at the operating system level |
| Writes into tool's own state dir | A detector living in that directory cannot judge itself |
| Policies encoding the wrong intent | Enforced faithfully; intent correctness is external |
▶ Expand Environment, Verification & Technical Specifications
- Formal Technical Report: Complete mathematical proof and receipt encoding: docs/TRACEFOLD_TR.md.
- Formal Verification Spec: Machine-checked Lean 4 theorem suite: lean/README.md.
- Exclusion Taxonomy: Test-enforced scope boundaries and limits: docs/LIMITS.md.
- Error Classification: Error taxonomy and exit code specifications: docs/ERROR_TAXONOMY.md.
- Recoverability Mechanics: Reversible execution state definitions: docs/RECOVERABILITY.md.
- Development Tree Tests: Full-spectrum test probe taxonomy: docs/DEVELOPMENT_TREE_TESTS.md.


