Repository navigation
Let a PR beat earn CLEAN from a run the gateway signed for - #107
Merged
Merged
Conversation
A PR session is no-exec, so almost every beat opened UNVERIFIED and the reviewer still did the verifying. The execution gateway already runs one job on a quarantine of the frozen head and signs the result; a proof now reuses it for a walk claim. The walk picks arguments after the trusted profile's fixed command and predicts the exit code. The broker already signs only a matching exit, so a receipt is a run whose result would have differed were the claim false. proofctl.py prove reserves the request, runs the host adapter, verifies the six-file handoff like an implementation consume, and keeps the request, envelopes and streams under proof-evidence/. The store adds proof_kind attested. It earns CLEAN only beside a verified proof run for that beat, in a session with a frozen PR target, and the store writes the signed argv, exit code and output tail onto the beat as attestation, which the walk may not set. The page shows them as what ran. An accepted report finding keeps the proof it was included on. The adapter accepts the wider request shape only when its configuration sets proofArguments: at most 16 bounded arguments after the profile argv, any exit code, everything else still the profile's. Without it, nothing changes. Schema version 8 adds the proof_attempts table. A live run against the real sandbox showed that an import failure exits 1 like a failing assertion, so the skill now says to cite a proof only when its signed output shows the claim. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NoDcxo3UV95RM7dMTdjMMS
…icts Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NoDcxo3UV95RM7dMTdjMMS
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.
A PR session is no-exec, so almost every beat opens
UNVERIFIEDand the reviewer still does the verifying. This reuses the execution gateway that already runs one job on a quarantine of the frozen head and signs the result, so a walk claim can be run instead of read. The walk picks arguments after the trusted profile's fixed command and predicts the exit code. The broker already signs only a matching exit, so a receipt is a run whose result would have differed were the claim false.proofctl.py provereserves the request, runs the host adapter, verifies the six-file handoff the same way an implementationconsumedoes, and keeps the request, envelopes and streams underproof-evidence/<n>/.The store adds
proof_kind: attested. It earnsCLEANonly beside a verified proof run for that beat, in a session with a frozen PR target. The store writes the signed argv, exit code and output tail onto the beat asattestation, which the walk may not set, and the page shows that block beside the walk's ownPROOFline. Schema version 8 addsproof_attempts.Look hardest at two places:
proofArgumentsopt-in ingateway/adapter.py. With it, a request may append at most 16 bounded arguments to the profile argv and carry any exit code 0 to 255. The executable, environment, cwd, stdin and sandbox stay pinned. Without it, nothing changes. This does let head code run in the sandbox, for example by importing test modules. That is what the sandbox exists for, but it is a wider job surface than implementation children use.Testing
On 9afeac9, which merges main after #106:
PROOF_KINDS. Both sides are kept: the attested proof kinds and the second-read verdicts. Main was still at schema 7, so the version 8 bump does not collide.claude plugin validate . --strictpasses.tests.test_gateway_live, 4 tests. The new live case captures a PR whose head breaks a shipped test and runspython3 -I -B -m unittest discover -s tests -t .through the real adapter, broker and sandbox. A prediction of exit 0 ends asfailedwith no receipt. A prediction of exit 1 verifies, its signed stderr showsAssertionError: 1 != 0, and the attested flag stores the real argv.tests/test_attested_proof.pycovers 27 cases. They include reservation bounds and idempotence, signed consume with real P-256 keys, a tampered stream, a receipt for the wrong exit code, the wrong key, a changed profile, the store's attested-beat rules, the rendered card and summary line, the one-callprovepath against stand-in adapters, the v7 to v8 upgrade, and the command line.Risk
proofArguments.CLEANwithout a real run. The rule requires a verified row for that exact beat, andvalidate_beatmarks any attested beat without an attestation asUNPROVEN.proofctl.py. Neither is needed for this change to be correct.How to revert
Revert the squash commit. Sessions already opened at schema 8 are then refused by the older store as "newer than supported". To keep one, delete its
proof_attemptstable and setPRAGMA user_version = 7. Beats that carryproof_kind: attestedwould also need rewriting, because older code rejects that kind.🤖 Generated with Claude Code
https://claude.ai/code/session_01NoDcxo3UV95RM7dMTdjMMS