Skip to content

ci(proofs): run the Rocq and Lean recheck legs in a digest-pinned image - #184

Merged
hyperpolymath merged 8 commits into
mainfrom
claude/awesome-wright-va45xo
Nov 17, 2026
Merged

hyperpolymath merged 8 commits into
mainfrom
claude/awesome-wright-va45xo

Conversation

@hyperpolymath

@hyperpolymath hyperpolymath commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

Summary

Owner ruling, 2026-11-16 (PROOF-POLICY §8.2). A PWG-1 checker must be "pinned, headless, isolated". A fresh ubuntu-24.04 runner with apt and SHA-256 version pins is not enough: the checker must run in a digest-pinned image, as the Agda job already does.

This PR does that for the Rocq and Lean recheck job, and nothing else.

This PR was first opened to record run 43945986467 as PWG-1 for all five theory rows. Under the ruling, that run's Rocq and Lean legs ran outside a pinned image, so it cannot earn PWG-1. Those commits are reverted here; they remain in this branch's history.

Changes

  • .github/workflows/agda-proofs.yml, job recheck:
    • It now runs in container: ubuntu:24.04@sha256:73b999393d07f2bf65a40373778a44dc9a6d54ad7718d29247d8ff9413c4d6a8. The digest was resolved on 2026-11-16 and should be re-pinned deliberately.
    • Inside the image it installs coq=8.18.0+dfsg-1build2, plus Lean 4.35.0 from the release tarball, checked by SHA-256. Both are the same versions as before.
  • The gate, scripts/check-recheck.sh, is unchanged, and so are the prover versions.

Testing

Check Result
Local run in that exact image (docker): the install recipe above, then scripts/check-recheck.sh Coq 8.18.0 and Lean 4.35.0 both run. 4 Rocq and 4 Lean legs (22 theorems each) report no axioms. All 8 fixtures are refused as named. [check-recheck] OK
actionlint 1.7.7 on the workflow clean

This PR's own run of the recheck job is the CI test.

After this merges

  1. januskey: record the receipt. The first green agda-proofs.yml run on main produces Agda, Rocq and Lean receipts, all from pinned images. A follow-up records that run in verification/receipts/januskey_praxis.deed, and the reader then derives the grades.
  2. main overstates T-1 until then. main's receipt still derives PWG-1 for T-1 from run 43213340167, which ran outside a container, so T-1 is overstated under the ruling. The canon reader cannot see isolation: it reads commits and digests. The fix belongs at the source, in standards: §8.2 should state the bar, and the receipt should carry evidence that the reader checks. I'll draft that in standards.
  3. secret-types is in the same position. Its PWG-1 receipt rests on non-container Rocq and Lean runs.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GVPPsHYqVJSoPzdNYD9tRg

dashboard-check has been red on main since b503488: TOPOLOGY.adoc and
READINESS.adoc claimed 143 tests, cargo test --list measures 144.
READINESS also still said T-1 is PWG-2ii; #181's receipt derives PWG-1.

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

The follow-up #180 named: its legs for G-1, T-2, T-3 and E-1m, and the
stricter recheck gate, made the receipt stale (the CI job warned). Main's
run 43945986467 at e8deeaf checked the Agda cone (7 + 8, 0 postulates) and
all 4 Rocq and 4 Lean legs (22 axiom reports in each prover, every one
clean; 8 refusals as named).

- proof-receipt.sh: source commit e8deeaf; current rows for that run;
  b503488's rows superseded; T-1-only recheck rows listed for T-1 only;
  every claim now has agda, rocq and lean legs.
- The pinned reader derives PWG-1 for G-1, T-1, T-2, T-3 and E-1m; the
  §8.5.3 git checks hold; the receipt is fresh at HEAD.
- PROOF-GRADES, PROOF-NEEDS, READINESS: census PWG-1 5 of 5.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GVPPsHYqVJSoPzdNYD9tRg
A2ML is retired; content may be deleted, never added. These [proof-grades]
fields duplicated the receipt and went stale with the previous commit:

- grade-3: per-claim :pwg in verification/receipts/januskey_praxis.deed
  (derived by the pinned standards reader)
- receipt-commit: :source-commit and each (receipt :run :commit … :state)
  in the same deed
- claimed-higher: the claims' :pwg and :foundation-diverse fields there
- open-obligations, first clause ("record the first green main run of the
  recheck legs …"): done; the current rocq/lean receipts in the deed

No workflow, script or tool reads these keys (grep of crates/, scripts/,
.github/); dashboard-check still passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GVPPsHYqVJSoPzdNYD9tRg
@hyperpolymath
hyperpolymath marked this pull request as ready for review November 16, 2026 20:29
@hyperpolymath
hyperpolymath enabled auto-merge (squash) November 16, 2026 20:29
@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 ❌ Failed 2026-11-16T21:38:09.898675Z
We couldn’t complete this review. Comment @codex review to try again.
7ac18a1 Draft marked ready
🔒 Security Review ❌ Failed 2026-11-16T20:29:50.986866Z
We couldn’t complete this review. Comment @codex security review to try again.
6b6fecb 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.

Repository owner deleted a comment from chatgpt-codex-connector Bot Nov 16, 2026
Repository owner deleted a comment from coderabbitai Bot Nov 16, 2026
@hyperpolymath
hyperpolymath marked this pull request as draft November 16, 2026 21:29
auto-merge was automatically disabled November 16, 2026 21:29

Pull request was converted to draft

Owner ruling 2026-11-16 (PROOF-POLICY §8.2, "pinned, headless, isolated"):
a fresh ubuntu-24.04 runner with apt and SHA-256 version pins is not
enough for PWG-1; the checker must be isolated as the Agda job's is.

The recheck job now runs in ubuntu:24.04@sha256:73b99939… and installs
coq=8.18.0+dfsg-1build2 and Lean 4.35.0 (tarball, SHA-256) inside it.
Prover versions and the gate (scripts/check-recheck.sh) are unchanged.

Verified locally in that exact image: 4 Rocq + 4 Lean legs, 22 theorems
each, no axioms; 8 fixtures refused as named; [check-recheck] OK.
actionlint 1.7.7: clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GVPPsHYqVJSoPzdNYD9tRg
@hyperpolymath hyperpolymath changed the title proofs: record run 43945986467 at e8deeaf; all five theory rows derive PWG-1 ci(proofs): run the Rocq and Lean recheck legs in a digest-pinned image Nov 16, 2026
@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 29 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 985e79de-a367-49ec-bc42-5191db073e14
Commits

Reviewing files that changed from the base of the PR and between 7ac18a1 and 95c512e.

Files selected for processing: 1

  • .github/workflows/agda-proofs.yml

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Chores
    • Updated the automated proof-checking workflow to run in a fixed Ubuntu 24.04 environment.
    • Adjusted setup to install the required system tools and make Lean available to subsequent workflow steps.
    • The workflow now uses non-interactive package installation and a consistent location for Lean, making its setup more predictable across runs.

The Agda proof recheck job now runs in a digest-pinned Ubuntu 24.04 container. Its installer uses container-level package commands and adds the Lean binary path from /opt/lean to GITHUB_PATH.

Changes: Agda proof recheck

Layer / File(s) Summary
Containerised recheck setup
.github/workflows/agda-proofs.yml
The job now runs in a digest-pinned Ubuntu 24.04 container and sets DEBIAN_FRONTEND=noninteractive. The installer adds ca-certificates and curl, removes sudo from package commands, and extracts Lean to /opt/lean.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other

Possibly related PRs

Merge Risk: Minimal · previous review 7ac18

This moves proof rechecks into a pinned container to improve isolation. It affects only CI and no runtime behavior. No merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
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.
Title check Passed The title names the change: the Rocq and Lean recheck legs now run in a digest-pinned image. The raw summary confirms the workflow's recheck job moved into a digest-pinned ubuntu:24.04 container. The …
Description check Passed The description is related to the changeset. It explains the ruling behind the change, the move of the recheck job into a digest-pinned ubuntu:24.04 image, the pinned prover versions, the local test r…
Full details: Title check

Explanation

The title names the change: the Rocq and Lean recheck legs now run in a digest-pinned image. The raw summary confirms the workflow's recheck job moved into a digest-pinned ubuntu:24.04 container. The title is specific and concise, and it matches the main change.

Full details: Description check

Explanation

The description is related to the changeset. It explains the ruling behind the change, the move of the recheck job into a digest-pinned ubuntu:24.04 image, the pinned prover versions, the local test results, and follow-up steps. It also explains the reverted receipt commits, which the objectives mention. The description matches the workflow change in the raw summary.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: bdb93d7b-80fe-4889-88c7-21647aa2ee50
Commits

Reviewing files that changed from the base of the PR and between e8deeaf and 7ac18a1.

Files selected for processing: 1

  • .github/workflows/agda-proofs.yml

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

Recent review details

Context from checks skipped due to timeout: 3

  • GitHub Check: CodeRabbit
  • GitHub Check: STATE vs dashboard reconciliation
  • GitHub Check: semgrep-cloud-platform/scan

@linear-code
linear-code Bot marked this pull request as ready for review November 16, 2026 21:37
@hyperpolymath
hyperpolymath enabled auto-merge (squash) November 17, 2026 13:56
hyperpolymath added a commit to metadatastician/standards that referenced this pull request Nov 17, 2026
…#1625)

## Summary

This PR puts the owner's 2026-11-16 ruling on PROOF-POLICY §8.2 into the
policy, the reader, the machine-readable PWG mirror and the shared
receipt generator.

§8.2 asks for a "pinned, headless, isolated" checker. The ruling says
isolated means the checker ran in a **container image pinned by its
digest**. A fresh CI runner with the prover pinned only by package
version or checksum does not qualify, because the runner image
underneath can change without notice.

Before this change, the canon reader could not see isolation: it derived
`PWG-1` for any receipt whose witnesses were all checked at the source
commit. With this change, the reader and the generator enforce the
ruling.

## Changes

- **`1-formats/deed/tools/deed_lint.js` (the reader)**
- A receipt may carry `:image "NAME[:TAG]@sha256:<64 hex>"`. The reader
validates it against the distribution/reference grammar:
- an optional registry host: a DNS name or a bracketed IPv6 address,
with an optional port;
    - path components that are non-empty and lower-case;
    - a tag of up to 128 characters, which may be upper-case;
    - a name (host plus path) of at most 255 characters;
    - a lower-case `sha256` digest.
- `PWG-1` is derived only when every counted witness's current receipt
names an image.
- A witness without an image still counts toward `PWG-3`, `PWG-2i` and
`PWG-2ii`.
- **`scripts/proof-receipt.sh` (the shared generator from #1620, merged
in from `main`)**
- A run-ledger row takes an optional 13th field: the image the checker
ran in.
  - `--run-row … --image REF` writes that field.
  - A current receipt emits `:image`.
- The generator derives `PWG-1` only when the Agda, Rocq and Lean runs
all recorded an image, matching the reader.
- The image is recorded per run, never stamped from a hook. An older run
on a bare runner therefore cannot be relabelled as isolated.
- **`3-practice/PROOF-POLICY.adoc`**: §8.2 adds `:image` to what a
receipt records and defines *isolated*. §8.5.1 lists `:image`.
- **`3-practice/proof-witness-grades.k9.ncl`**: the machine-readable
mirror gains the isolation requirement and `"image"` in `PWG-1`'s
`receipt_fields`.
- **`1-formats/deed/tools/README.adoc`** and
**`fixtures/proof-receipt/echo_praxis.deed`** are updated to match.

## Testing

| Check | Result |
|---|---|
| `bun test 1-formats/deed/tools/` | 332 pass, 0 fail. Cases covered:
<br>• a counted leg without an image derives `PWG-2ii`, and a recorded
`PWG-1` is refused <br>• an image never raises a `PWG-3` claim <br>•
malformed references are refused: a bare tag, an empty tag, an empty
path component, a doubled separator, two tags, an upper-case path, a
256-character name, an unclosed IPv6 bracket <br>• valid references are
accepted: a host with a port, an upper-case tag, no tag, a bracketed
IPv6 host, a 255-character name |
| `scripts/tests/proof-receipt-test.sh` | 73 passed, 0 failed. Before
the generator change it was 50 passed and 19 failed, because the
generator wrote `PWG-1` receipts that named no image. New cases: <br>• a
run recorded without `--image` derives `PWG-2ii` and carries no `:image`
<br>• a tag-only `--image` is refused <br>• each current leg names its
image |
| `check-proof-receipt-test.sh`; `proof-inputs-sha256-test.sh` | 20
passed; 14 passed |
| `deed_lint.js --self-test`, lint of `echo_praxis.deed` | OK |
| `k9-validate.sh --strict` on the PWG mirror, with Nickel 1.18.0 (the
CI pin) | OK, 0 skipped. `nickel format` leaves the file unchanged |
| `asciidoctor --failure-level WARN` on the changed docs | clean |
| shellcheck on `proof-receipt.sh` | no new finding |

## Effect beyond this repository (after merge)

- **hyperpolymath/januskey:** on `main`, T-1 is graded `PWG-1` from Rocq
and Lean runs on a bare runner. hyperpolymath/januskey#184 moves the
recheck job into `ubuntu:24.04@sha256:73b99939…`. A run recorded after
that, with its images, restores `PWG-1`.
- **hyperpolymath/secret-types:** its `PWG-1` receipt rests on
bare-runner Rocq and Lean runs (tracked in
hyperpolymath/secret-types#53). Under this reader it derives `PWG-2ii`
until those legs run in a pinned image.
- **mathesis** picks up the rule when it re-pins the reader.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath merged commit 246b03d into main Nov 17, 2026
35 checks passed
@hyperpolymath
hyperpolymath deleted the claude/awesome-wright-va45xo branch November 17, 2026 16:57
hyperpolymath pushed a commit that referenced this pull request Nov 17, 2026
…eipt branch

Conflict in .github/workflows/agda-proofs.yml, job recheck, install step.
Main runs the job in ubuntu:24.04 pinned by digest and installs coq by
version. This branch downloads the three Rocq packages, checks their SHA-256
and installs exactly those files. Resolved to both: inside the pinned image,
install the base tools, then the digest-checked download and install (no sudo,
as the container runs as root).

#184 carries the owner's ruling of 2026-11-16: a PWG-1 checker must run in a
digest-pinned image; a fresh runner with version pins is not enough. The docs
on this branch said the opposite, so they are corrected: PROOF-GRADES 'What the
grade rests on', PROOF-NEEDS, and the D-2 and D-3 deviation rows, which now
name the image. The superseded Rocq and Lean rows of run 43945986467 record
that reason too. The reader still derives PWG-3 for the five rows.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013CuBToxr5h9catptGiTsFX
hyperpolymath pushed a commit that referenced this pull request Nov 17, 2026
Records the merge that 41caee5 resolved by content: that commit carried the
resolution of .github/workflows/agda-proofs.yml but was made without main as
a parent, so GitHub still saw a conflict. The file is unchanged here.

Co-Authored-By: Claude Fable 5.2 <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