Skip to content

feat(receipt): write the receipt with the shared generator (standards f6ebc5e) - #54

Merged
hyperpolymath merged 2 commits into
mainfrom
claude/shared-receipt-generator
Nov 18, 2026
Merged

hyperpolymath merged 2 commits into
mainfrom
claude/shared-receipt-generator

Conversation

@hyperpolymath

@hyperpolymath hyperpolymath commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

Summary

The proof receipt is now written by the standard's shared generator, scripts/proof-receipt.sh from metadatastician/standards#1620. That generator was lifted from this repository's own scripts/grade-receipt.sh. The receipt is unchanged except for the line naming the reader's commit, and all six claims stay PWG-1.

Changes

  • scripts/grade-receipt.sh keeps this repository's parts: the claim, run and echo ledgers, and the hooks that name each leg's invocation and input set. It then sources the generator.
    • Four files are pinned at standards f6ebc5e, each by sha256: the generator, the reader, the reference digest and the git checker.
    • --fetch-reader fetches all four.
  • The Agda run row gains a trusted-base binding.
    • The shared generator records, with each Agda run, the sha256 of the trusted base that run checked. PROOF-POLICY §8.4 says a change to that list must earn the receipt again.
    • The current row predates the field. Its value is the sha256 of proof_trusted_base in scripts/proof-flags.sh at the run's own commit 7dfeab2.
    • That is the list the run's trusted-base gate checked the cone against (its reported column says "4 prover postulates … each BUILTIN-bound and listed"). The list has not changed since.
    • This PR's own CI run confirms the value independently. Its fresh Agda row (run 43970356593) carries the same binding, 0c1f64c3….
    • The script explains all of this beside the ledger.
  • proofs.yml:
    • The proofs and legs jobs fetch the pinned tools before they use them, because every mode now sources the generator.
    • In the proofs job the fetch comes before the trusted-base gate, which calls grade-receipt.sh --inputs agda.
    • The Agda container also installs curl to fetch them.
  • verification/legs/README.adoc no longer says the grade is PWG-2ii, which contradicted the receipt's derived PWG-1.
  • CHANGELOG.adoc entry.

RSR Quality Checklist

Required

  • Tests pass. CI is green on e861780, and the proofs, legs and proof-receipt jobs all pass.
    • The receipt job writes the receipt of this run at PWG-1 for N-1..N-3 and N-7..N-9.
    • The committed receipt passes --check: the tree and ledgers match, the §8.5.3 git checks pass with the shared checker, the pinned reader accepts it, and the negative control holds.
  • No banned language patterns (bash, YAML and AsciiDoc only).
  • No banned functions.
  • SPDX headers unchanged.
  • No secrets.

As Applicable

  • Documentation updated (verification/legs/README.adoc).
  • CHANGELOG updated.

Testing

PASS: verification/receipts/agda_praxis.deed matches the tree and the ledgers (source-commit 292d566a81a9bafcd6bdf7f3caab7fc2ebad36bd)
PASS: git checks of §8.5.3 (shared checker, standards f6ebc5ec6ba5, --branch refs/remotes/origin/main)
PASS: the pinned reader (standards f6ebc5ec6ba5) accepts verification/receipts/agda_praxis.deed
PASS: negative control (the first claim recorded as :pwg PWG-2ii is refused: its legs support PWG-1)

🤖 Generated with Claude Code

https://claude.ai/code/session_01BYbQRtNu216R13jtZLmoqs

Summary by CodeRabbit

  • Documentation

    • Updated the verification status to PWG-1, reflecting recorded proof receipts from CI.
    • Clarified that changing inputs to a proof leg removes its grade until a new CI run is recorded.
    • Updated the documented standards version and trusted-base information for the current Agda proof.
  • Chores

    • CI now fetches and verifies pinned receipt tools after proof checks.

… f6ebc5e)

scripts/grade-receipt.sh keeps this repository's ledgers and hooks and
sources the standard's scripts/proof-receipt.sh
(metadatastician/standards#1620), which writes and checks the receipt.
The generator, the reader, the reference digest and the git checker are
pinned at standards f6ebc5e, each by sha256, and fetched by
--fetch-reader.

- The receipt is unchanged but for the line naming the reader's commit;
  all six claims stay PWG-1.
- The shared generator binds each Agda run row to the sha256 of the trusted
  base it checked (PROOF-POLICY 8.4).  The current Agda row predates that
  field.  Its value is the sha256 of proof_trusted_base in
  scripts/proof-flags.sh at the run's own commit 7dfeab2, the list that
  run's trusted-base gate checked the cone against; the list is unchanged
  since.  The script says so beside the ledger.
- proofs.yml: the proofs and legs jobs fetch the pinned tools before
  --run-row (every mode now sources the generator), and the Agda container
  installs curl to fetch them.
- verification/legs/README.adoc no longer says the grade is PWG-2ii; the
  receipt derives PWG-1.

Local: --write, then --check (git checks with the shared checker, the
pinned reader at PWG-1 for N-1..N-3, N-7..N-9, the negative control) pass;
--run-row for each leg gives the recorded inputs digest, and for Agda the
same trusted-base binding.  Not run here: the provers (CI runs them).

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

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The receipt script now uses pinned shared tools for generation and checks. CI jobs fetch those tools. The Agda receipt, grade README, and changelog are updated to record the standards commit and PWG-1 grade.

Changes: Proof receipt tooling

Layer / File(s) Summary
Pin and use shared receipt tools
scripts/grade-receipt.sh
The script pins and verifies four shared files, adds receipt-specific ledger and hook functions, and delegates generation and checks to the pinned generator. The Agda run row adds an imports field and trusted-base digest.
Fetch receipt tools in CI
.github/workflows/proofs.yml
The Agda job installs curl. The Agda and Rocq/Lean jobs fetch the pinned receipt tools through grade-receipt.sh --fetch-reader.
Update receipt and grade records
verification/receipts/agda_praxis.deed, verification/legs/README.adoc, CHANGELOG.adoc
The Agda receipt references the updated standards commit. The README and changelog describe the PWG-1 grade and receipt details.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Refactor

Possibly related issues

  • hyperpolymath/secret-types#53 — The PR updates the same receipt and grade documentation, but does not add the container image digests described in the issue.

Possibly related PRs

Merge Risk: Minimal · up to e8617

The receipt script now uses shared, digest-pinned tooling, and CI fetches that tooling before using it. Proof grades and receipt contents are reported unchanged apart from the reader's commit line. No concrete defect was identified, and the change can be reverted easily, so it appears ready to merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the proof receipt is now written by the shared generator, pinned at standards f6ebc5e. The diff confirms this, since grade-receipt.sh now sources the pinned generator …
Description check Passed The description follows the template's main sections: Summary, Changes, RSR Quality Checklist, and Testing. It explains the change, the pinned files, the trusted-base binding, and the proofs.yml edits…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: the proof receipt is now written by the shared generator, pinned at standards f6ebc5e. The diff confirms this, since grade-receipt.sh now sources the pinned generator and delegates receipt_main. The title is specific and short, and it uses the conventional commit form.

Full details: Description check

Explanation

The description follows the template's main sections: Summary, Changes, RSR Quality Checklist, and Testing. It explains the change, the pinned files, the trusted-base binding, and the proofs.yml edits. It gives concrete test output and checklist results. Two gaps remain. The Summary does not link a related issue with 'Closes #N', and the template's Screenshots section is absent. The deed and ROADMAP items in the As Applicable list are not addressed. These are non-critical, so the description is mostly complete.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 9fb8430 and e861780.

Files selected for processing: 5

  • .github/workflows/proofs.yml
  • CHANGELOG.adoc
  • scripts/grade-receipt.sh
  • verification/legs/README.adoc
  • verification/receipts/agda_praxis.deed

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Hypatia grid green

🟢 clean · commit e8617808b4ad · run 43971457696 · scope: this change (5 file(s))

Advisory: 11 row(s), worst 🔴 high (0 critical, 9 high) — reported, never grading the change.

Reporter Gate Status Critical High Medium Minor Since previous revision
Hypatia scan gating 🟢 clean 0 0 0 0 — no comparable baseline
panic-attack assail advisory 🟢 clean 0 0 0 0 — no comparable baseline
pons asinorum advisory 🟢 clean 0 0 0 0 — no comparable baseline
finishingbot (release readiness) advisory 🔴 high 0 9 9 0 — no comparable baseline
glambot (presentation quality) advisory 🔵 minor 0 0 0 7 — no comparable baseline
rhodibot (RSR compliance) advisory 🟢 clean 0 0 0 0 — no comparable baseline
accessibilitybot advisory ⚪ not applicable 0 0 0 0 — no comparable baseline
cipherbot advisory ⚪ not applicable 0 0 0 0 — no comparable baseline
echidnabot advisory ⚪ not applicable 0 0 0 0 — no comparable baseline
panicbot advisory ⚪ not applicable 0 0 0 0 — no comparable baseline
seambot advisory ⚪ not applicable 0 0 0 0 — no comparable baseline
sustainabot advisory ⚪ not applicable 0 0 0 0 — no comparable baseline
Hypatia scan: 20 finding(s)
  • 20 further finding(s) in files this change does not touch: reported, not graded (0 critical, 4 high).
panic-attack assail: 16 finding(s)
  • 16 further finding(s) in files this change does not touch: reported, not graded (0 critical, 0 high).
pons asinorum: 9 finding(s)
  • 9 further finding(s) in files this change does not touch: reported, not graded (0 critical, 0 high).
finishingbot (release readiness): 174 finding(s)
  • high V1-DOC-ROADMAP.adoc — Required file ROADMAP.adoc not found (Project roadmap).
  • high TOOL-001 — .tool-versions file not found for asdf/mise version management.
  • high SCM-001-NEUROSYM.scm — Required SCM file NEUROSYM.scm not found (Neurosymbolic AI documentation).
  • high SCM-001-AGENTIC.scm — Required SCM file AGENTIC.scm not found (Agentic AI integration documentation).
  • high SCM-001-PLAYBOOK.scm — Required SCM file PLAYBOOK.scm not found (Operational playbooks and procedures).
  • high SCM-001-ECOSYSTEM.scm — Required SCM file ECOSYSTEM.scm not found (Project's place in the ecosystem).
  • high SCM-001-META.scm — Required SCM file META.scm not found (Meta-level information and architectural decisions).
  • high SCM-001-STATE.scm — Required SCM file STATE.scm not found (Project state and progress tracking).
  • high PH-100 — Found 124 placeholders, exceeds maximum allowed (0)
  • medium V1-COM-CONTRIBUTING.md — CONTRIBUTING.md file not found (Contribution guidelines).
  • medium V1-COM-CODE_OF_CONDUCT.md — CODE_OF_CONDUCT.md file not found (Code of conduct).
  • medium V1-SEC-001 — SECURITY.md not found for responsible disclosure.
  • medium TEST-001 — Could not determine if this is a Rust or Deno project.
  • medium REL-004 — No SECURITY.md file found
  • medium CLM-006 — verification/legs/README.adoc — Documentation references non-existent file: lean/Axioms.lean
  • medium CLM-006 — CHANGELOG.adoc — Documentation references non-existent file: e2e.yml.template
  • medium CLM-006 — CHANGELOG.adoc — Documentation references non-existent file: hypatia-scan.yml
  • medium PH-001 — CHANGELOG.adoc:139 — Found 'TODO' in: `FROM …:latest` lines and a body of TODO comments built nothing and failed
  • 156 further finding(s) in files this change does not touch: reported, not graded (0 critical, 3 high).
glambot (presentation quality): 95 finding(s)
  • info GS-001 — Install git-seo for comprehensive SEO analysis: https://github.com/hyperpolymath/git-seo
  • info MACH-007 — ECOSYSTEM.scm not found in .machine_readable/ directory.
  • info MACH-007 — META.scm not found in .machine_readable/ directory.
  • info MACH-007 — STATE.scm not found in .machine_readable/ directory.
  • info MACH-005 — No robots.txt found. Consider adding one for crawler control.
  • info VIS-005 — verification/legs/README.adoc:76 — Line 84 characters exceeds max length of 80.
  • info VIS-005 — CHANGELOG.adoc:87 — Line 84 characters exceeds max length of 80.
  • 88 further finding(s) in files this change does not touch: reported, not graded (0 critical, 2 high).
rhodibot (RSR compliance): 13 finding(s)
  • 13 further finding(s) in files this change does not touch: reported, not graded (0 critical, 12 high).
accessibilitybot: not_applicable — template default: enrol once the repository serves HTML
  • ⚪ not applicable: template default: enrol once the repository serves HTML
cipherbot: not_applicable — template default: enrol once the repository implements cryptography
  • ⚪ 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
  • ⚪ 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
  • ⚪ 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
  • ⚪ 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)
  • ⚪ 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.

check-trusted-base.sh calls grade-receipt.sh --inputs agda, which now
sources the shared generator, so the fetch has to come before it.  The
proofs job failed at that step with "the pinned scripts/proof-receipt.sh is
missing"; locally, with _build/standards removed, the same call fails the
same way and passes once --fetch-reader has run.

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

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath marked this pull request as ready for review November 16, 2026 22:38
@chatgpt-codex-connector

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 ❌ Failed 2026-11-16T22:39:00.121589Z
We couldn’t complete this review. Comment @codex review to try again.
e861780 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@hyperpolymath
hyperpolymath merged commit 83ba81d into main Nov 18, 2026
75 checks passed
@hyperpolymath
hyperpolymath deleted the claude/shared-receipt-generator branch November 18, 2026 01:11
hyperpolymath added a commit that referenced this pull request Nov 18, 2026
…nned image (#57)

## Summary

PROOF-POLICY §8.2 now counts a witness toward `PWG-1` only when its
current receipt records the digest-pinned image its checker ran in. This
comes from the owner ruling of 2026-11-16, landed as
metadatastician/standards#1625.

#54 pinned the receipt tools at standards `f6ebc5e`, which predates that
rule. This PR moves the pin to `940a27a`, standards `main`, and does
three things:

- records what the last run can show;
- states the grade the current reader derives;
- runs the legs in a pinned image, so the next recorded run restores
`PWG-1`.

**Until that run is recorded, the committed receipt reads `PWG-2ii`.**
The Rocq and Lean legs of run 43455458225 ran on the bare `ubuntu-24.04`
runner. That runner has no digest, so under the current rule those
witnesses cannot count toward `PWG-1`.

## Evidence from this PR's CI

[Run
44214592597](https://github.com/hyperpolymath/secret-types/actions/runs/44214592597),
on `1c28ec9`, ran all three legs in pinned images:

- **Agda:** `debian:13-slim@sha256:a29215f6…`.
- **Rocq and Lean:** `ubuntu:24.04@sha256:73b99939…`.
- **Rows:** each row this run prints has the image as its 13th field.
- **Grade:** the receipt of this run derives **`PWG-1`** for N-1..N-3
and N-7..N-9.
- **Committed receipt:** passes `--check` at `PWG-2ii`.

## Changes

- **Pins.** All four receipt tools are pinned at standards `940a27a`,
each by sha256.
- **Agda row.** It records `debian:13-slim@sha256:a29215f6…`, the
container `proofs.yml` pinned for the Agda job at the run's own commit
`7dfeab2`.
- This is derived from that commit, in the same way #54 derived the
trusted-base binding.
  - The Rocq and Lean rows carry no image, because none existed.
- **`proofs.yml`.**
- The legs job runs in `ubuntu:24.04@sha256:73b99939…`, the image
lintel#31 uses. It installs its tools as root and marks the workspace
safe for git, as the Agda job does.
- Both jobs pass `--image` to `--run-row`. The value is read from the
job's own `container:` line at the commit under test, so there is one
source of truth.
- Both jobs also pass `--axioms none`, which the generator at `940a27a`
requires. The gates refuse any axiom.
- **Docs.** README, PROOF-STATUS, the legs README, the proof-debt ledger
and the CHANGELOG now say `PWG-2ii`, and why.

## After merge

Record the first run on `main`, using the rows its receipt job prints.
All three legs then carry an image, and the reader derives `PWG-1`
again.

## RSR Quality Checklist

### Required

- [x] Tests pass. CI is green on `1c28ec9`, including the Agda, legs and
proof-receipt jobs. Locally, `--write` and `--check` pass.
- [x] No banned language patterns (bash, YAML and AsciiDoc only).
- [x] No banned functions.
- [x] SPDX headers unchanged.
- [x] No secrets.

### As Applicable

- [x] Documentation updated.
- [x] `CHANGELOG` updated.

## Testing

```
PASS: verification/receipts/agda_praxis.deed matches the tree and the ledgers (source-commit 292d566)
PASS: git checks of §8.5.3 (shared checker, standards 940a27af1e25, --branch refs/remotes/origin/main)
PASS: the pinned reader (standards 940a27af1e25) accepts verification/receipts/agda_praxis.deed
  N-1  PWG-2ii  foundation-diverse false
  ...
PASS: negative control (the first claim recorded as :pwg PWG-1 is refused: its legs support PWG-2ii)
```

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01BYbQRtNu216R13jtZLmoqs

---------

Co-authored-by: Claude <noreply@anthropic.com>
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