Skip to content

proofs: machine-readable proof receipt (PROOF-POLICY §8.5.1); grades derived - #181

Merged
hyperpolymath merged 1 commit into
mainfrom
claude/awesome-wright-va45xo
Nov 16, 2026
Merged

hyperpolymath merged 1 commit into
mainfrom
claude/awesome-wright-va45xo

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

This follows #174 and metadatastician/standards#1450, which added the proof-receipt profile. januskey's grades were in prose tables only, and they still said "receipt pending re-run". This PR adds the machine-readable receipt. The pinned standards reader derives the grades from it, and mathesis can read them from it.

Changes

  • verification/receipts/januskey_praxis.deed (new): a praxis deed with :profile proof-receipt (PROOF-POLICY §8.5.1). It holds:
    • (trusted-base …): the four Agda.Primitive primitives, each with its BUILTIN binding (§8.4);
    • one (claim …) each for G-1, T-1, T-2, T-3 and E-1m;
    • an (inputs-manifest …) and (axioms) on every current receipt;
    • on each current Agda receipt, an (import …) of hyperpolymath/resource-algebra at cf9235c;
    • superseded receipts with their reasons, as lineage.
  • scripts/proof-receipt.sh (new) writes the receipt.
    • Typed: two ledgers, the claim list and the CI runs. Each run row is copied from its job log.
    • Computed from git: each leg's input set, every file's SHA-256, the §8.5.1 digest, and the sibling's pin, read from scripts/fetch-siblings.sh. A repin therefore changes the Agda digest.
    • A Rocq or Lean leg that nobody has started is left out, not recorded as unavailable. This matches PROOF-GRADES.adoc, which records those legs as "not attempted".
  • --check (just test-receipt, and a new agda-proofs.yml job "Proof receipt, derived grades, git checks") does four things:
    1. Regenerates the receipt and refuses any difference.
    2. Fetches the standards reader, digest script and checker pinned at 513cba8 and checks each file's SHA-256. The reader then derives every grade and refuses one the receipts do not support.
    3. Runs check-proof-receipt.sh, the §8.5.3 git checks. It needs a full clone, so the job checks out with fetch-depth: 0.
    4. Warns with ::warning:: when a leg's inputs have changed since the source commit. A stale receipt is still true of the commit it names.
  • Bun 1.4.4 is installed from the release zip and checked by SHA-256, as the Lean job already does for Lean. No new uses: entry is added, so actions.lock is unchanged.
  • PROOF-GRADES.adoc and PROOF-NEEDS.adoc:

Grade change: T-1 goes from PWG-2ii to PWG-1 (derived, not asserted)

Run 43213340167 checked all three of T-1's witnesses at the receipt's source commit b503488: the Agda job and the Rocq and Lean recheck job. Each has a pinned checker and no axioms. That is the §8.2 condition for PWG-1, and the reader derives it. The other four claims stay PWG-3.

Census (denominator 5): PWG-3 4 · PWG-2i 0 · PWG-2ii 0 · PWG-1 1 · ungraded 0.

The Rocq checker is coq=8.18.0+dfsg-1build2 on an ephemeral ubuntu-24.04 runner, not inside a digest-pinned container. secret-types' PWG-1 receipt makes the same choice. If you read §8.2's "isolated" more strictly, T-1 would have to stay at PWG-2ii, and this needs your call.

Testing

Check Result
bash scripts/proof-receipt.sh --check PASS. Derived: G-1 PWG-3, T-1 PWG-1, T-2 PWG-3, T-3 PWG-3, E-1m PWG-3. Every §8.5.3 check holds, including the import at cf9235c
Reference digest (scripts/proof-inputs-sha256.sh from standards) Same Agda digest as the receipt (6e17ce4a…)
Overstated grade (G-1 recorded as PWG-2i) The reader refuses it
Understated grade (T-1 recorded as PWG-2ii) The reader refuses it
A file SHA-256 changed without its digest The reader refuses it (the digest does not match the manifest)
A forged but self-consistent manifest The reader accepts it, as designed; the §8.5.3 git checker fails it ("the manifest does not hold at b503488…")
Stale inputs (a commit that edits Rollback.lean) ::warning::the lean inputs changed after b5034884dbe9…
shellcheck scripts/proof-receipt.sh clean
asciidoctor --failure-level WARN on both docs clean

This PR changes no Agda, Rocq or Lean file and does not change check-agda.sh or check-recheck.sh, so the receipt still describes main. The new CI job is this PR's own test.

Not in this PR

  • Negative controls (§8.5.4). The fixtures under tests/reject-* are already refused by the gates. Recording them as (control …) needs each fixture's own input set, for example ForwardRollback.v together with Rollback.v. That is follow-up work.
  • Rocq and Lean legs for G-1, T-2, T-3 and E-1m. Not attempted.

Generated by Claude Code

…derived

Adds verification/receipts/januskey_praxis.deed in the proof-receipt
profile merged in standards#1450, written by scripts/proof-receipt.sh
from two typed ledgers (claims; CI runs copied from their logs) and git
(input sets, file SHA-256s, §8.5.1 digests, the resource-algebra import).

`proof-receipt.sh --check` (just test-receipt; new agda-proofs.yml job)
regenerates and diffs, runs the standards reader pinned by commit and
SHA-256 (it derives each grade and refuses an overstated one), runs the
§8.5.3 git checker, and warns when a leg's inputs change after the
receipt's source commit.

The receipt describes b503488 on main (run 43213340167). The reader
derives T-1 PWG-1 (Agda, Rocq and Lean receipts all at the source
commit) and G-1, T-2, T-3, E-1m PWG-3. PROOF-GRADES.adoc and
PROOF-NEEDS.adoc cite it, drop "receipt pending re-run", and mark runs
42736066407 and 42076969251 superseded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GVPPsHYqVJSoPzdNYD9tRg
@sonarqubecloud

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath marked this pull request as ready for review November 16, 2026 19:55
Repository owner deleted a comment from coderabbitai Bot Nov 16, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T20:00:02.026919Z 14a139d Draft marked ready
🔒 Security Review ❌ Failed 2026-11-16T19:55:59.264436Z
We couldn’t complete this review. Comment @codex security review to try again.
14a139d Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@hyperpolymath
hyperpolymath merged commit f89f5ad into main Nov 16, 2026
25 of 26 checks passed
@hyperpolymath
hyperpolymath deleted the claude/awesome-wright-va45xo branch November 16, 2026 19:56
Repository owner deleted a comment from chatgpt-codex-connector Bot Nov 16, 2026
Repository owner deleted a comment from coderabbitai Bot Nov 16, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 14a139d6fe

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/proof-receipt.sh
Comment on lines +272 to +273
now="$(digest_of "$(inputs "$p" HEAD | manifest . HEAD)"$'\n')"
was="$(digest_of "$(inputs "$p" "$commit" | manifest . "$commit")"$'\n')"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Track checker files when deciding receipt freshness

When scripts/check-agda.sh, scripts/scan-postulates.sh, scripts/check-recheck.sh, or the relevant workflow changes without a proof-source change, these two digests remain equal because inputs() includes only proof files (plus the sibling-fetch script). The receipt job therefore prints that every receipt is fresh and passes, even though the updated documentation explicitly says a changed checker must re-earn its receipt; include the checker inputs in this comparison or check them separately.

Useful? React with 👍 / 👎.

hyperpolymath pushed a commit that referenced this pull request Nov 16, 2026
…gs branch

#181 made the grades derived: verification/receipts/januskey_praxis.deed
is the receipt of record, and the pinned standards reader derives T-1 at
PWG-1 (all three witnesses checked at b503488) and G-1, T-2, T-3, E-1m at
PWG-3. This branch now follows that model instead of its own "PWG-3,
awaiting PWG-2ii" wording:

- PROOF-GRADES takes main's page and re-applies this branch's sections:
  the legs of all five rows, the comparison row by row, the residual
  differences, the non-vacuity twins and the pins. The leg record says
  which receipts exist: T-1's in the deed; none yet for the other four,
  which join the claim list once a main run has checked them.
- PROOF-NEEDS keeps main's prose and census; the four rows' ledger cells
  say their legs are not yet in the receipt.
- STATE and READINESS still said T-1 was PWG-2ii on main; they now state
  the derived grades.

proof-receipt.sh --check passes (it warns, as expected, that T-1's Rocq
and Lean inputs changed after b503488). check-agda, check-recheck,
dashboard-check (144 tests, 12 PROVEN) and the 17 recorded digests pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013CuBToxr5h9catptGiTsFX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants