Repository navigation
feat(receipt): inputs digests, axioms and the echo 7dfeab2 -> 292d566 (PROOF-POLICY 8.5.1 to 8.5.3) - #41
Conversation
The canon reader (readProofReceipt, standards be39f90) refused the old receipt with "unexpected clause (identity)", so no grade could be derived from it for N-1, N-2, N-3, N-7, N-8 and N-9. - scripts/grade-receipt.sh writes :profile proof-receipt, :repository, the full :source-commit, a (trusted-base ...) and one (claim ...) per theorem with its Agda, Rocq and Lean legs and their receipts. Demonstrations N-4, N-5 and N-6 have no claim (8.1). - Receipts come from a run ledger. The new CI job "receipt" prints the ledger rows of its own run, read from that run: checker version line, invocation, commit checked out, input digest and the axiom lines the gates printed. --check fails when a leg's inputs change after the run of its current receipt (8.4, regression drops the grade). - scripts/check-trusted-base.sh asks Agda for the import cone and checks that the prover-supplied postulates are exactly the list in scripts/proof-flags.sh (8.4), with scanner controls in tests/trusted-base/. - The pinned reader runs in CI (sha256-checked) with a negative control: a receipt with a wrong :pwg must be refused. - On a pull request, the proof jobs check out the head commit, not the merge commit, so a receipt names a commit that exists on the branch. No run is recorded yet, so the reader derives "ungraded" for every claim. The docs say so. The receipts of this commit's CI run follow in the next commit. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0136P7ZpWWL8fx57pcYvnHSZ
Run 43447816480 failed before the gate ran: actions/checkout marks the workspace as a safe directory only under a temporary HOME, so the next step's "git rev-parse HEAD" refused the clone with "dubious ownership". The step now marks the workspace safe itself. The legs job passed in that run. Also from SonarCloud on this PR: every case in scripts/grade-receipt.sh has a default branch that fails loudly, and functions copy positional parameters into named locals. The run-less receipt now names the current HEAD. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0136P7ZpWWL8fx57pcYvnHSZ
The receipt job of run 43448301280 (commit 88a763a) printed one ledger row for each witness: Agda 2.6.4.3, Coq 8.18.0 and Lean 4.24.0, each with its invocation, input digest and the axiom lines its gate printed. Those rows are now in runs() as current receipts. The local runs of 2026-11-12 at eaa7e97 are kept as superseded lineage, never current. The pinned reader (standards be39f90) accepts the receipt and derives PWG-1, foundation-diverse false, for N-1, N-2, N-3, N-7, N-8 and N-9. The negative control (a recorded PWG-2ii) is refused. The leg inputs are unchanged since 88a763a, so --check holds the receipt current. The grade rests on the RECONCILED statement comparisons, which stay provisional until the owner reviews them. The docs say so. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0136P7ZpWWL8fx57pcYvnHSZ
From the CodeRabbit review of PR #39; each finding was checked against the code first. - scan-agda-postulates.awk refuses a carriage return and any nested module. Both gaps were latent: the pinned prim modules have neither. But BUILTIN bindings are keyed by short name, so a nested module could reuse a bound name for an unbound postulate after a prover pin bump. New refusal controls: tests/trusted-base/CarriageReturn.txt (git keeps its CRLF bytes, .gitattributes) and NestedModule.txt. - grade-receipt.sh writes a waived or unavailable leg with only its :reason, as the reader requires (reason columns in the claim list). - --emit-run checks that the rows' input digests describe the tree. - The receipt job writes the receipt of its run before it checks the committed receipt, so a stale receipt cannot stop the rows from being printed. The check stays a failing gate. The scanner is an input of the Agda leg, so the Agda receipt of run 43448301280 no longer describes the tree. Its row is now superseded, with the reason, and the reader derives "ungraded" until the CI run of this commit is recorded in the next commit. The docs still say PWG-1 for that one commit. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0136P7ZpWWL8fx57pcYvnHSZ
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0136P7ZpWWL8fx57pcYvnHSZ # Conflicts: # .github/workflows/proofs.yml # scripts/grade-receipt.sh # scripts/scan-agda-postulates.awk # verification/receipts/agda_praxis.deed
- docs/EXPLAINME.adoc said every proven row is at PWG-2ii. It now points to the grade the pinned reader derives from the receipt, so the ledger cannot drift from it again. - docs/proof-debt.adoc said the trusted base has no postulates. The development has none, but the import cone holds the four Agda.Primitive postulates that Agda supplies, each bound by BUILTIN. The sentence now says so. Docs only; no leg input changes. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0136P7ZpWWL8fx57pcYvnHSZ
The receipt job of run 43455458225 (commit 7dfeab2, the scanner and generator hardening of this PR) printed one ledger row for each witness: Agda 2.6.4.3, Coq 8.18.0 and Lean 4.24.0. Those rows are now the current receipts. The rows of run 43448301280 (88a763a) and the local runs (eaa7e97) stay as superseded lineage, each with its reason. The pinned reader (standards be39f90) accepts the receipt and derives PWG-1, foundation-diverse false, for N-1, N-2, N-3, N-7, N-8 and N-9. The negative control (a recorded PWG-2ii) is refused. This commit changes no leg input, so --check holds the receipt current. The docs name the new run and commit. The grade still rests on the RECONCILED statement comparisons, which stay provisional until the owner reviews them. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0136P7ZpWWL8fx57pcYvnHSZ
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0136P7ZpWWL8fx57pcYvnHSZ
Brings the proof receipt to PROOF-POLICY §8.5.1 to §8.5.3 as merged in standards d9b03a3 (#1534). The reader is pinned there (deed_lint.js sha256 c06de71c...853a), together with the reference digest script scripts/proof-inputs-sha256.sh (sha256 dfc6dde0...08f4). - Each current receipt carries :inputs-sha256 and (axioms). The input sets are those of §8.5.1: for Agda, the repository modules of the cone of SecretTypes.All; for Rocq, the file coqc compiles; for Lean, the tracked .lean files, the lakefile and the toolchain. The Agda set is a text scan of imports, and check-trusted-base.sh checks it against agda --dependency-graph on every gate run. - #40 was squash-merged, so run 43455458225 names 7dfeab2, which main does not contain. An echo records 7dfeab2 -> 292d566 with inputs-sha256 witnesses. The digests are computed with the reference script at both commits and are equal for every leg. :source-commit is 292d566 on main. - --check does the git checks of §8.5.3: the source commit is on main, each current digest is the reference digest at its commit, and each echo witness is equal at source and image. The source is fetched by refs/pull/40/head when no branch holds it. The receipt job checks out with full history for these checks. - The current rows' digests are the §8.5.1 digests at 7dfeab2, computed again from git objects. They replace the digests the run printed under the earlier input sets. Rows that are not current keep their printed digests, and the receipt does not state them. - The owner reviewed the RECONCILED statement comparisons (2026-11-13, ruling relayed by the Mathesis session), so the docs no longer call them provisional. The pinned reader derives PWG-1, foundation-diverse false, for N-1, N-2, N-3, N-7, N-8 and N-9. The same receipt without the echo supports only PWG-2ii, and a tampered echo digest is refused. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0136P7ZpWWL8fx57pcYvnHSZ
|
Caution Review failedThe pull request is closed. Walkthrough
Merge Risk:
|
|
|
🟢 clean · commit Advisory: 11 row(s), worst 🔴 high (0 critical, 9 high) — reported, never grading the change.
Hypatia scan: 11 finding(s)
panic-attack assail: 17 finding(s)
pons asinorum: 9 finding(s)
finishingbot (release readiness): 174 finding(s)
glambot (presentation quality): 94 finding(s)
rhodibot (RSR compliance): 13 finding(s)
accessibilitybot: not_applicable — template default: enrol once the repository serves HTML
cipherbot: not_applicable — template default: enrol once the repository implements cryptography
echidnabot: not_applicable — template default: enrol once the repository carries proofs and an ECHIDNA engine is configured
panicbot: not_applicable — panic-attack is already graded by the verdict grid's own panic-attack row, from static-analysis-gate.yml evidence; enrolling panicbot would report one scanner twice and give two rows that can disagree
seambot: not_applicable — template default: enrol once a seam register exists at spec/seams/seam-register.json
sustainabot: not_applicable — reserved fleet slot; no adapter exists (gitbot-fleet bots/sustainabot/README.adoc)
Scope: static findings reported by each row's tool at the named commit. The table grades only findings in files this change touches, so the colour answers "does this change introduce anything?", not "what does the whole repository still carry?". Standing findings are counted in each accordion and in report.json; the baseline filter remains the place where acknowledged debt is recorded. The lane state is the worst GATING row; advisory rows are listed and counted but never set it. Purple, red, yellow and blue grade the worst GRADED finding present; orange is evidence missing, malformed or a scanner that did not run; grey is an explicit scope exclusion with its reason. No row is a security certification. report.json, badge.json and the raw findings are in the verdict-grid artifact on the linked run. |
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |



Summary
This is the one follow-up to #40, as the owner requested: fix the receipt-schema gap, and record the echoes.
#40 was squash-merged as
292d566, so the receipts of run 43455458225 name7dfeab2, which main does not contain. Standards #1534 (merged asd9b03a3) adds three things to the receipt format::inputs-sha256,(axioms …)and(echo …). It also gives the home gate the git checks of §8.5.3. This PR makes this repository's generator write the new fields, and makes its gate run those checks.This PR does not need a new CI run, and no recording step follows it. It changes no leg input:
:source-commit 292d566, which is already on main.Any merge method keeps the receipt valid.
Result: what the pinned reader derives
The reader is
readProofReceipt, pinned at standardsd9b03a30e9570e1ffc05f16a580ab0f7a7e6fec6. The sha256 ofdeed_lint.jsisc06de71c26dca57e81c17dbe4998ec99dd73035e773f7b6f92b819e96559853a.Census: 6 PWG-1, 0 PWG-2ii, 0 PWG-2i, 0 PWG-3, 0 ungraded, of 6 theorems. N-4, N-5 and N-6 are demonstrations with no claim (§8.1).
The echo, with digests from the reference script
scripts/proof-inputs-sha256.shat standardsd9b03a3(sha256dfc6dde0…08f4):Each current receipt carries the same digest as
:inputs-sha256, and(axioms)with no entries: no checker reported an axiom, and every gate fails on one.Changes
scripts/grade-receipt.shPins: standards
d9b03a3, both the reader and the reference digest script, each checked by sha256 (--fetch-reader).Input sets (§8.5.1):
SecretTypes.All.coqccompiles..leanfiles, the lakefile and the toolchain.Echo ledger: it holds
7dfeab2 → 292d566, and the forge refrefs/pull/40/headkeeps the source. The witness digests are not typed:--writeand--checkcompute them at both commits and refuse the echo unless they are equal.--checkruns §8.5.3::source-commitis on main;:inputs-sha256equals the reference digest at its commit;It keeps the stricter local rule as well: each current digest must equal the digest of the tree under check.
Grade derivation: it follows §8.5.2 (an echo chain whose digests match) and §8.4 (a leg counts only if each reported axiom has disposition
c).scripts/check-trusted-base.sh: the Agda input set, a text scan of imports, must equal the cone thatagda --dependency-graphreports. It runs on every gate run..github/workflows/proofs.yml: the receipt job checks out with full history, for the §8.5.3 checks.verification/legs/READMEand the CHANGELOG describe the new shape and the echo. TheRECONCILEDstatement comparisons are no longer called provisional: the owner reviewed them on 2026-11-13 (ruling relayed by the Mathesis session).A note on the recorded digests
The current rows of the run ledger now hold the §8.5.1 digests at
7dfeab2, computed again from git objects. Run 43455458225 printed digests under this repository's earlier input sets, which also covered gate scripts and test fixtures. A digest is a git fact of the commit, not an output of the checker, and--checkrecomputes it with the reference script.Rows that are not current keep the digests their runs printed. The receipt does not state those digests, as §8.5.1 allows.
Negative controls
PWG-2ii7dfeab2:source-commitis not on main:pwg(every--check)Testing
These ran locally, with pinned Agda 2.6.4.3, Coq 8.18.0 and Lean 4.24.0, and they all pass:
scripts/check.shscripts/check-trusted-base.sh, which now includes the cone cross-check (15 modules)scripts/check-legs.shscripts/grade-receipt.sh --checkcheck-adoc-renders.sh(175 files)check-spdx-headers.sh,check-lock-sync.shandcheck-action-pinning.jsRSR Quality Checklist
Required
unsafeblocksAs Applicable
Generated by Claude Code
Summary by CodeRabbit
Improvements
Documentation