Skip to content

proofs: write the receipt with the estate shared generator (do not merge: pins an unmerged standards commit) - #189

Merged
hyperpolymath merged 1 commit into
claude/vibrant-cori-lirqrr-receiptfrom
claude/vibrant-cori-lirqrr-shared-receipt
Nov 17, 2026
Merged

hyperpolymath merged 1 commit into
claude/vibrant-cori-lirqrr-receiptfrom
claude/vibrant-cori-lirqrr-shared-receipt

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Do not merge yet. This pins standards at 15ef29e, a commit on the unmerged standards branch claude/receipt-claims-covered, which adds the receipt_run_scope hook this PR uses. Once that change merges into standards main, I'll move the pin to its main commit and mark this ready. The PR is stacked on #186; merge that first.

What

scripts/proof-receipt.sh was januskey's own receipt generator, written before standards had a shared one. It now uses the estate's shared generator (standards scripts/proof-receipt.sh).

  • The home script fetches four pinned files. These are the shared generator, the reader, the reference digest and the §8.5.3 checker, all at one standards commit, each checked against its SHA-256.
  • It supplies only januskey's own data and hooks:
    • the claim list;
    • the run ledger;
    • the run scopes;
    • the trusted base;
    • each leg's invocation, input set and sibling import;
    • the claim IDs and reconciled legs, read from PROOF-NEEDS.adoc and PROOF-GRADES.adoc, so the gate refuses a receipt that disagrees with them.
  • Run scopes. The first Agda run predates Epistemic.agda, and the first Rocq and Lean runs re-proved T-1 alone. Each is listed only under the claims it checked, as before. The shared generator could not express this, so the owner chose to add the hook at source (standards branch above) rather than drop or misattribute that history.
  • Every ledger row now carries its inputs digest and what its run reported, copied from that run's log.
    • A superseded row's digest is the reference digest (proof-inputs-sha256.sh COMMIT PATHS…) of its leg's input set at that run's commit.
    • The input set selects exactly the files each run's invocation names.

Regression

The old and new receipts were read with the same pinned reader, and their outputs compared after normalising. They are identical on:

  • the source commit, trusted base and echoes;
  • every claim's grade and foundation_diverse;
  • every leg's route, token and state;
  • every receipt's run, commit, state, inputs digest, manifest, imports and axioms;
  • which runs appear under which claim.

The deed's text differs only in its header comment and in the ; the run reported: … line the shared generator writes above each receipt.

Behaviour change

The gate is now stricter. A change to a leg's inputs fails --check until one of two things happens:

  • a new run is recorded;
  • the current run is marked superseded or regressed, which drops the grade until a new run is recorded (§8.4).

januskey's own generator only warned in that case. PROOF-GRADES and PROOF-NEEDS now say so. This is the shared generator's fail-loudly design.

Verification (local)

  • bash scripts/proof-receipt.sh --check passes:
    • the deed matches the tree and the ledgers;
    • the §8.5.3 git checks hold, including the resource-algebra import at its pin;
    • the reader derives PWG-1 for G-1, T-1, T-2, T-3 and E-1m;
    • the negative control is refused.
  • --run-row reproduces the current digests already in the deed: Agda 6e17ce4a…, with the import adddbf38….
  • shellcheck -x scripts/proof-receipt.sh: clean. One directive covers SC2317, because the hooks are called by the sourced generator.
  • dashboard-check: 144 tests measured, 12 PROVEN claims.

Generated by Claude Code

scripts/proof-receipt.sh was januskey's own generator, written before
standards had a shared one (standards scripts/proof-receipt.sh, f6ebc5e).
It is now a home script that fetches the shared generator, the reader, the
reference digest and the §8.5.3 checker at one standards commit (each
checked against its sha256) and supplies only januskey's data and hooks:
the claim list, the run ledger, the run scopes, the trusted base, and each
leg's invocation, input set and sibling import.

- Run scopes (receipt_run_scope, added to the shared generator for this):
  the first Agda run predates Epistemic.agda, and the first Rocq and Lean
  runs re-proved T-1 alone, so each is listed only under the claims it
  checked, as januskey's own generator did.
- Every ledger row now carries its inputs digest and what its run
  reported, copied from that run's log. A superseded row's digest is the
  reference digest of its leg's input set at that run's commit.
- Regression: read by the same pinned reader, the old and new receipts
  agree on every claim, grade, leg, receipt (run, commit, state, digest,
  manifest, imports, axioms), the trusted base and the echoes. The deed's
  text differs only in its header and in one "; the run reported:" comment
  per receipt.
- The gate is stricter: a change to a leg's inputs now fails it until a new
  run is recorded or the current one is marked superseded or regressed
  (which drops the grade), where januskey's generator only warned.
  PROOF-GRADES and PROOF-NEEDS say so.

The standards pin (15ef29e) is the branch commit that adds
receipt_run_scope; it moves to that change's main commit once it merges.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013CuBToxr5h9catptGiTsFX
@sonarqubecloud

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath marked this pull request as ready for review November 17, 2026 02:12
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 17, 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-17T04:39:35.143499Z c1b3c95 Draft marked ready
🔒 Security Review ❌ Failed 2026-11-17T04:36:04.792571Z
We couldn’t complete this review. Comment @codex security review to try again.
c1b3c95 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 marked this pull request as draft November 17, 2026 04:19
@hyperpolymath
hyperpolymath marked this pull request as ready for review November 17, 2026 04:36
Repository owner deleted a comment from coderabbitai Bot Nov 17, 2026
Repository owner deleted a comment from chatgpt-codex-connector Bot Nov 17, 2026
Repository owner deleted a comment from chatgpt-codex-connector Bot Nov 17, 2026
@hyperpolymath
hyperpolymath merged commit 0ad7195 into claude/vibrant-cori-lirqrr-receipt Nov 17, 2026
20 checks passed
@hyperpolymath
hyperpolymath deleted the claude/vibrant-cori-lirqrr-shared-receipt branch November 17, 2026 04:43
hyperpolymath added a commit that referenced this pull request Nov 21, 2026
…s with digest-checked installs (#186)

## What

Follow-ups to #180, which added Rocq and Lean
recheck legs for G-1, T-2, T-3 and E-1m. Docs, receipt data, CI and the
Lean build only; no proof or Rust changes.

> The earlier hold is lifted: `scripts/proof-receipt.sh` now pins the
shared generator at standards `146fb8f8`, the merge of
metadatastician/standards#1671 on standards `main`. The regenerated
receipt is byte-identical and `--check` passes (0dc7cbd).

**1. The receipt records #180's main run**

- `scripts/proof-receipt.sh` names `e8deeaf` (#180's merge) as the
receipt's source commit, and holds the Agda, Rocq and Lean rows of run
43945986467, the first green `main` run of the new legs.
- **STATE.a2ml: deletions only.** Fields the receipt deed already holds
are removed; nothing is added.

**2. januskey uses standards' shared receipt generator** (merged in from
#189)

- `scripts/proof-receipt.sh` is now a home script: it supplies the
ledgers and hooks, verifies the pinned standards files by SHA-256, and
delegates generation and checking.
- It needs the `receipt_run_scope` hook, which is on standards `main`
since `146fb8f8` (see the note above).

**3. The Lean legs build under Lake** (owner ruling 2026-11-17)

- PROOF-POLICY §8.2 names "`lean` under `lake`". The owner ruled that a
direct `lean` run does not qualify.
- The legs are a Lake package (`verification/proofs/lean/lakefile.toml`,
`lean-toolchain`); `scripts/check-recheck.sh` runs `lake build` and
counts each file's `#print axioms` reports. CI asserts the Lake version.

**4. Grades: the reader derives PWG-3 for all five rows**

- The three Agda runs before #171 (42076969251, 41687715055,
40867211509) are listed only for the rows they checked: they predate
`SingleActiveLog.agda`, where T-2 and T-3 are now stated, so the receipt
no longer shows them under T-2 and T-3 (a29bd8c).

- The Lean row of run 43945986467 is `superseded`: it ran `lean`
directly.
- The Rocq row of that run is `superseded` too. Moving the Lean legs
under Lake edited `scripts/check-recheck.sh`, the checker both legs run
through, and `PROOF-GRADES.adoc` says a changed checker re-earns the
receipt (#180 applied the same rule to the same script). The Rocq steps
are byte-identical.
- Only the Agda receipt is current (`scripts/check-agda.sh` is
unchanged), so the pinned reader derives **PWG-3** for G-1, T-1, T-2,
T-3 and E-1m. PROOF-NEEDS, PROOF-GRADES and READINESS say so. Nothing is
asserted by hand.
- #184 is merged in. It carries the owner ruling
of 2026-11-16: a PWG-1 checker must run in a digest-pinned image, and a
fresh runner with version pins is not enough. The docs on this branch
said the opposite and are corrected; both superseded rows record that
reason as well. The recheck job keeps #184's pinned image and this
branch's digest-checked package install.
- The first run of both legs on `main` after this merges, in the pinned
image and under Lake, will be recorded in a follow-up, which restores
the higher grade.

**5. PROOF-POLICY §6 toolchain deviations**

- PROOF-NEEDS.adoc has "Toolchain deviations" D-1 (Agda, Debian
packages), D-2 (Rocq, Ubuntu packages) and D-3 (Lean, release tarball),
each `open`, with versions and archive SHA-256 values.
- The workflow refuses packages it cannot verify: `apt-get download` for
the pinned versions, `sha256sum -c`, then install of exactly those
files.

## Verification

- **CI at `b7eb131`:** the `CI` workflow passed, including `CI/gate`,
the Agda job, the Rocq and Lean recheck job (in the digest-pinned image,
under Lake, with the digest-checked Rocq install) and the receipt job.
CI on `a29bd8c` had not finished when this was written.
- **`scripts/proof-receipt.sh --check`** at `a29bd8c`, with the
generator from standards `main`: every check holds; the reader derives
PWG-3 for all five rows; the negative control (a row recorded as PWG-1)
is refused.
- **`dashboard-check`:** 144 tests measured, 12 PROVEN claims, exit 0.
- **Lake gate:** a planted `sorry` in a leg fails
`scripts/check-recheck.sh`.
- **Install steps:** the Rocq step was run as written on Ubuntu 24.04
with all three digests `OK`, and fails at `sha256sum -c` with one digest
altered. The Agda step's first run was CI; its log shows both packages
`OK` before the install.

## Not verified

- The Rocq and Lean receipts on `main` after this change: they cannot
exist until it merges.

## Next (not in this PR)

- Record the first `main` run of both legs, to re-earn the grade. In
that same change, add `scripts/check-agda.sh` and
`scripts/check-recheck.sh` to the legs' input sets, so a checker change
fails `--check` by itself (today that rule is applied by hand). Doing it
there rewrites no past digest.
- Guix trial to close D-1 to D-3, with one digest-pinned container as
the fallback.
- `(obligation …)` ledger records with `:depends-on` in the shared
generator, so PROOF-NEEDS' tables come from the deed.

https://claude.ai/code/session_013CuBToxr5h9catptGiTsFX

---
_Generated by [Claude Code](https://claude.ai/code)_

---------

Co-authored-by: Claude <[email protected]>
Co-authored-by: CLAUDE <[email protected]>
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