|
| 1 | +# Proof Pack v0.1 — Authority-Before-Mutation |
| 2 | + |
| 3 | +Bounded public proof that, on the demonstrated CommitGate path, state |
| 4 | +mutation is refused unless the attached `DecisionRecord` is valid, |
| 5 | +scoped, unexpired, signed, and unreplayed — and that every refusal |
| 6 | +produces an inspectable receipt. |
| 7 | + |
| 8 | +## How to run in 60 seconds |
| 9 | + |
| 10 | +```bash |
| 11 | +git clone https://github.com/LalaSkye/commit-gate-core.git |
| 12 | +cd commit-gate-core |
| 13 | +python3 scripts/run_proof_pack.py |
| 14 | +python3 scripts/verify_receipt.py |
| 15 | +``` |
| 16 | + |
| 17 | +No install step. Stdlib only. The runner exercises four cases through |
| 18 | +the existing kernel at `src/commit_gate_core/gate.py`: |
| 19 | + |
| 20 | +| Case | Demo fixture | Expected | Receipt | |
| 21 | +| --- | --- | --- | --- | |
| 22 | +| valid DecisionRecord | `demo/valid_decision_record.json` | ALLOW | `receipts/examples/allow_receipt.json` | |
| 23 | +| expired authority | `demo/expired_authority_refusal.json` | DENY_EXPIRED | `receipts/examples/deny_expired_receipt.json` | |
| 24 | +| scope mismatch | `demo/scope_mismatch_refusal.json` | DENY_SCOPE | `receipts/examples/deny_scope_receipt.json` | |
| 25 | +| replayed nonce | `demo/replayed_nonce_refusal.json` | DENY_REPLAY | `receipts/examples/deny_replay_receipt.json` | |
| 26 | + |
| 27 | +## Expected output |
| 28 | + |
| 29 | +`scripts/run_proof_pack.py` prints, for each case: case name, expected |
| 30 | +result, actual result, receipt path, receipt hash, mutation occurred |
| 31 | +(`YES` / `NO`). The run ends with: |
| 32 | + |
| 33 | +```text |
| 34 | +All four cases pass: YES |
| 35 | +``` |
| 36 | + |
| 37 | +`scripts/verify_receipt.py` then checks each receipt in |
| 38 | +`receipts/examples/` against five gates: |
| 39 | + |
| 40 | +1. `receipt_hash_integrity` — sha256 over the receipt minus |
| 41 | + `receipt_hash` matches the stored value |
| 42 | +2. `input_hash` — the hash of the input DecisionRecord is present and |
| 43 | + well-formed |
| 44 | +3. `decision_result` — `actual_result` matches `expected_result` |
| 45 | +4. `refusal_reason` — present and non-empty on DENY receipts, `null` |
| 46 | + on ALLOW receipts |
| 47 | +5. `no_execution_marker` — `no_execution_marker` is the inverse of |
| 48 | + `mutation_occurred`; DENY receipts must show `mutation_occurred=false` |
| 49 | + |
| 50 | +A clean run ends with: |
| 51 | + |
| 52 | +```text |
| 53 | +All receipts verified: YES |
| 54 | +``` |
| 55 | + |
| 56 | +## What this proves |
| 57 | + |
| 58 | +On the demonstrated CommitGate path: |
| 59 | + |
| 60 | +- A signed, scoped, unexpired, unreplayed `DecisionRecord` is a hard |
| 61 | + precondition for the mutation callback to run. |
| 62 | +- Each of the four failure modes — `DECISION_EXPIRED`, |
| 63 | + `SCOPE_MISMATCH:object_id`, `NONCE_REPLAYED`, and the ALLOW happy |
| 64 | + path — flows through the kernel in `src/commit_gate_core/gate.py` |
| 65 | + and produces a distinct, content-addressed receipt with an explicit |
| 66 | + no-execution marker. |
| 67 | +- Refusal receipts can be inspected independently by |
| 68 | + `scripts/verify_receipt.py` without re-running the gate. |
| 69 | + |
| 70 | +The receipts and DecisionRecord fixtures live in version control, so |
| 71 | +the evidence object is reproducible byte-for-byte. |
| 72 | + |
| 73 | +## What this does not prove |
| 74 | + |
| 75 | +- Production readiness, certification, or compliance. |
| 76 | +- Adoption, deployment, or coverage outside this repository. |
| 77 | +- Universal runtime governance, path-universal enforcement, or |
| 78 | + non-bypassability outside the demonstrated path. |
| 79 | +- Real cryptographic signature verification — the bundled |
| 80 | + `AcceptingSignatureVerifier` is synthetic and treats |
| 81 | + `signature == "sig_valid"` as signed for the purpose of the bounded |
| 82 | + surface. |
| 83 | +- Real persistent nonce ledgers, atomic commit across systems, or |
| 84 | + downstream side-effect prevention beyond the in-process callback. |
| 85 | + |
| 86 | +## Claim boundary |
| 87 | + |
| 88 | +This proof pack demonstrates that, on the shown path, state mutation |
| 89 | +is refused unless a DecisionRecord is valid, scoped, unexpired, signed, |
| 90 | +and unreplayed; each refusal produces an inspectable receipt. |
| 91 | + |
| 92 | +This is not production infrastructure, certification, adoption |
| 93 | +evidence, or universal runtime governance. It is a bounded proof |
| 94 | +surface for authority-before-mutation. |
0 commit comments