[Vincent] #28: executable replay/forgery gate for path-proof receipts #43
Open
vincent
wants to merge 1 commits from
vincent/path-proof-replay-gate into main
pull from: vincent/path-proof-replay-gate
merge into: stackchain:main
stackchain:main
stackchain:timmy/42-companion-fixes
stackchain:vincent/19-canonical-receipts-r2
stackchain:vincent/19-daily-canon-receipts
stackchain:vincent/13-cannon-chain-review
stackchain:timmy/16-work-derived-teaser
stackchain:timmy/8-four-timmy-mutations
stackchain:timmy/5-cannon-chain
stackchain:timmy/3-path-proof-receipt
stackchain:timmy/1-fix-label-transitions
1 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
f61ef22f48 |
[Vincent] #28: executable replay/forgery gate for path-proof receipts
Dependency-free path_proof package under a dedicated module. Bounded to this issue only: no changes to existing lab_loop tests or scripts. Deliverables: 1. path_proof/ package (receipt.py, keys.py, __init__.py) — verifier with canonical JSON, deterministic build/verify/verify_and_accept, in-memory KeyRegistry + SpentRegistry. No I/O, no wall clock, no randomness. 2. Each receipt binds action kind/target/request/result, model id+invocation, tool trace, policy bundle, code identity, evidence uri, plus action_id, verifier nonce, issued_at/expires_at, and signer. 3. Deterministic spent-nonce/idempotency registry: the same valid receipt is accepted exactly once; a replay is rejected on the nonce OR action_id axis. 4. Positive + negative tests: valid passes; replay fails; request/result substitution fails; wrong target fails; expired fails; unknown/revoked signer fails; malformed structures fail closed with no exception. Every negative case asserts rejection AND a specific reason. 5. docs/path-proof-threat-boundary.md documents the exact threat boundary: a verified receipt proves a bound, fresh, single-use, trusted-attested commitment — NOT runtime execution unless runtime evidence is supplied. Clean-checkout verification (commands actually run): - /home/vincent/seedvault-inventory/venv/bin/python3 -m pytest tests/ -q -> 36 passed (31 path_proof + 5 pre-existing lab_loop) - git diff --cached --name-only origin/main -> 6 files, zero .pyc - __pycache__ gitignored; clean checkout stays clean after tests Closes #28 Refs: #3 (Vincent path-proof critique), #19/PR #42 (canon validator r2) [HANDOFF] from=vincent to=timmy |