Repository navigation
Proof v3: receipts that can't be faked - #1
Merged
Merged
Conversation
Adds proofkit/hookflow.py (decide_stop, verify_inline, DIRECTIVE with --claim-key) and reduces proof_trigger.py to a JSON-only wrapper. set_pending now demotes other pending claims in the session. An autouse conftest fixture isolates PROOF_HOME for every test. Migrated v2 hook tests: - test_trigger.py::test_fresh_claim_blocks_with_session: runs in an empty cwd, expects the deferral directive (adds --claim-key). - test_trigger.py::test_reblock_after_fail_with_receipts: runs in a tests_fail copy with a prior fail, expects attempt 2 of 3 and the fresh FAIL tests receipt instead of PREVIOUS RECEIPTS. - test_trigger.py::test_silent_after_pass, test_silent_after_max_cycles, test_noop_when_stop_hook_active, test_noop_on_non_claim, test_missing_transcript_path_is_silent, test_transcript_path_is_directory_is_silent: same assertions, explicit empty cwd. - test_end_to_end.py::test_hook_fires_then_verifier_catches_the_lie: hook runs in a tests_fail copy and must block with the FAIL tests receipt; verifier step unchanged. - test_fixes.py::test_directive_format_contains_quoted_script, test_trigger_directive_contains_out_dir_value: format with pending and key; out-dir assertion kept, claim-key assertion added. - test_gate.py: unchanged, all gate skip/verify/audit assertions pass under the new flow.
…the chain A reworded re-claim after a fail got fresh per-claim bookkeeping, so the opt-in gate could skip re-verification and FAIL_HEAD reported attempt 1 on every rewording. The gate now runs only outside a fail/suspect chain, and the attempt label uses the chain block count that caps the loop. Tests: test_hookflow.py adds test_reworded_reclaim_in_fail_chain_counts_chain_attempts and test_gate_never_skips_reworded_reclaim_in_fail_chain. test_trigger.py::test_reblock_after_fail_with_receipts now simulates the prior fail inside the block chain (stop_hook_active set), keeping its attempt 2 of 3 and fresh receipt assertions.
…resolve Windows command shims
…le baseline worktrees
…e max Bash timeout
…and kill the tree on interrupt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proof v3: receipts that can't be faked
v2 caught agents claiming "tests pass" when they didn't. v3 closes the ways an agent could still slip a false claim through.
What changed
[verify].inline_budget, default 90s) and blocks with the real output on FAIL. Only checks that don't finish in time go to a verifier subagent, and the hook keeps re-blocking untilproof.py verify --claim-keyhas recorded a verdict..only, gutted assertions, neutered test commands. It blocks once, then reports to you instead of nagging.proof check "all tests pass" --since origin/maindiffs from the merge-base.stop_hook_active), timeouts are deferred instead of counted as failures, the verifier checks the stored claim rather than the agent's latest message, and Windows command timeouts kill the whole process tree.Verdicts
Upgrading
Run
proof armagain to install the SessionStart hook and the Stop hook timeout.proof statusflags a v2 entry.Tests
442 passed, 2 skipped (core), 68 passed (proofml), on Windows locally; CI covers Linux and Windows on Python 3.11 to 3.13.
Design:
docs/specs/2026-09-29-v3-core-design.md