Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 25 additions & 7 deletions .github/workflows/proofs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,19 +106,27 @@ jobs:
run: |
checker="$(agda --version | head -1) ($(bash scripts/proof-flags.sh provenance), container debian:13-slim)"
axioms="--safe; $(grep -h '^PASS: trusted base' /tmp/check.log /tmp/trusted-base.log | sed 's/^PASS: //' | awk 'NR>1{printf "; "} {printf "%s", $0}')"
row="$(bash scripts/grade-receipt.sh --run-row agda --run "$RUN_URL" --commit "$(git rev-parse HEAD)" --checker "$checker" --reported "$axioms")"
# The image is this job's container line, read from the workflow at
# the commit under test (PROOF-POLICY §8.2). The gates refuse any
# axiom, so a run that reaches this step reported none.
image="$(sed -n '/^ proofs:$/,/^ [a-z][a-z-]*:$/{s/^ container: *//p}' .github/workflows/proofs.yml)"
row="$(bash scripts/grade-receipt.sh --run-row agda --run "$RUN_URL" --commit "$(git rev-parse HEAD)" --checker "$checker" --reported "$axioms" --axioms none --image "$image")"
printf '%s\n' "$row"
printf 'row=%s\n' "$row" >> "$GITHUB_OUTPUT"

# The Rocq and Lean recheck legs (PROOF-POLICY §2), re-proved by hand from
# the Agda statements (verification/legs/README.adoc gives the route and the
# statement correspondence). Both provers are pinned: Coq by its Ubuntu
# package version, Lean by its release tarball's sha256. Neither leg may use
# an axiom or a library; scripts/check-legs.sh refuses either.
# an axiom or a library; scripts/check-legs.sh refuses either. The job runs
# in an image pinned by its digest (PROOF-POLICY §8.2, owner ruling
# 2026-11-16): a bare runner's image can change underneath a version-pinned
# prover, and a witness counts toward PWG-1 only with its image recorded.
legs:
name: Rocq and Lean recheck legs (no axioms, no libraries)
runs-on: ubuntu-24.04
timeout-minutes: 30
container: ubuntu:24.04@sha256:73b999393d07f2bf65a40373778a44dc9a6d54ad7718d29247d8ff9413c4d6a8
env:
COQ_PACKAGE: coq=8.18.0+dfsg-1build2
LEAN_URL: https://github.com/leanprover/lean4/releases/download/v4.24.0/lean-4.24.0-linux.tar.zst
Expand All @@ -127,10 +135,12 @@ jobs:
rocq: ${{ steps.row.outputs.rocq }}
lean: ${{ steps.row.outputs.lean }}
steps:
# git is installed so that the checkout is a real clone; curl fetches
# Lean and the pinned receipt tools.
- name: Install the pinned Coq
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y "$COQ_PACKAGE" zstd
apt-get update
apt-get install --no-install-recommends -y ca-certificates curl git zstd "$COQ_PACKAGE"
- name: Install the pinned Lean (release tarball, sha256-checked)
run: |
set -euo pipefail
Expand All @@ -144,8 +154,13 @@ jobs:
with:
ref: ${{ env.SOURCE_COMMIT }}
persist-credentials: false
# As in the Agda job: in a container, actions/checkout marks the
# workspace safe only under a temporary HOME, so git refuses it later
# ("dubious ownership"; run 44214405363). Mark it for this job.
- name: Verify the commit under test
run: test "$(git rev-parse HEAD)" = "$SOURCE_COMMIT"
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
test "$(git rev-parse HEAD)" = "$SOURCE_COMMIT"
- name: Both legs check, with no axioms
run: bash scripts/check-legs.sh 2>&1 | tee /tmp/legs.log
# The receipt script sources the shared generator (standards
Expand All @@ -157,12 +172,15 @@ jobs:
id: row
run: |
commit="$(git rev-parse HEAD)"
# This job's container line, read from the workflow at the commit
# under test; check-legs.sh refuses any axiom, so the legs reported none.
image="$(sed -n '/^ legs:$/,/^ [a-z][a-z-]*:$/{s/^ container: *//p}' .github/workflows/proofs.yml)"
rocq="$(bash scripts/grade-receipt.sh --run-row rocq --run "$RUN_URL" --commit "$commit" \
--checker "$(coqc --version | head -1) (Ubuntu 24.04 $COQ_PACKAGE)" \
--reported "$(grep '^PASS: Rocq leg' /tmp/legs.log | sed 's/^PASS: //')")"
--reported "$(grep '^PASS: Rocq leg' /tmp/legs.log | sed 's/^PASS: //')" --axioms none --image "$image")"
lean="$(bash scripts/grade-receipt.sh --run-row lean --run "$RUN_URL" --commit "$commit" \
--checker "$(lean --version | head -1) (release tarball, sha256 $LEAN_SHA256)" \
--reported "$(grep '^PASS: Lean leg' /tmp/legs.log | sed 's/^PASS: //')")"
--reported "$(grep '^PASS: Lean leg' /tmp/legs.log | sed 's/^PASS: //')" --axioms none --image "$image")"
printf '%s\n%s\n' "$rocq" "$lean"
{ printf 'rocq=%s\n' "$rocq"; printf 'lean=%s\n' "$lean"; } >> "$GITHUB_OUTPUT"

Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,21 @@ https://semver.org/spec/v2.0.0.html[Semantic Versioning].

==== Fixed

* **The grade follows the image rule of PROOF-POLICY §8.2 (owner ruling
2026-11-16, standards #1625): `PWG-2ii` until the next recorded run.**
** The receipt tools are pinned at standards `940a27a`, whose reader counts a
witness toward `PWG-1` only when its current receipt records the
digest-pinned image its checker ran in.
** The current Agda row records `debian:13-slim@sha256:a29215f6…`, the
container `proofs.yml` pinned for the Agda job at the run's commit
`7dfeab2`. The Rocq and Lean legs of that run ran on the bare
`ubuntu-24.04` runner, which has no digest, so every claim reads
`PWG-2ii`; README, PROOF-STATUS, the legs README and the proof-debt
ledger say so and why.
** The legs job now runs in `ubuntu:24.04@sha256:73b99939…`. Both jobs pass
`--image` (read from their own `container:` line) and `--axioms none` to
`--run-row`, so the first run recorded on main restores `PWG-1`.

* **The receipt is written by the shared generator (standards `f6ebc5e`,
metadatastician/standards#1620).**
** `scripts/grade-receipt.sh` keeps this repository's ledgers and hooks and
Expand Down
11 changes: 9 additions & 2 deletions PROOF-STATUS.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,15 @@ invocation, which this repository has met since waiver W-1 closed.
|===
| Claim | PWG | Why not higher

| N-1, N-2, N-3, N-7, N-8, N-9 | *`PWG-1`*
| PWG-1 is the top grade. The pinned reader derives it from
| N-1, N-2, N-3, N-7, N-8, N-9 | *`PWG-2ii`*
| Not `PWG-1`: PROOF-POLICY §8.2 (owner ruling 2026-11-16, standards #1625)
counts a witness toward PWG-1 only when its current receipt records the
digest-pinned image its checker ran in. The Agda leg of that run ran in
`debian:13-slim@sha256:a29215f6…`, and its receipt says so; the Rocq and
Lean legs ran on the bare `ubuntu-24.04` runner, which has no digest. The
legs job now runs in `ubuntu:24.04@sha256:73b99939…`, so the first run on
main that is recorded will carry an image for all three legs, and the reader
will derive `PWG-1` again. The pinned reader derives the grade from
link:verification/receipts/agda_praxis.deed[the receipt], whose
`:source-commit` is `292d566` on main. CI run
https://github.com/hyperpolymath/secret-types/actions/runs/43455458225[43455458225]
Expand Down
9 changes: 6 additions & 3 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,12 @@ Secret → Echo for `nextgen-typing/docs/TYPE-CONNECTIONS.adoc`.
`PROOF-POLICY.adoc` §8.5.1 and §8.5.2) describes commit `292d566` on main. It
holds the receipts of CI run 43455458225 on commit `7dfeab2`, and an echo
records that the squash merge into `292d566` left every leg's inputs equal.
From them the pinned reader derives Proof Witness Grade **`PWG-1`** for each
proved claim. The grade is what the reader derives, never a value
typed here. The proved claims type-check in Agda under the
From them the pinned reader derives Proof Witness Grade **`PWG-2ii`** for each
proved claim. It is not `PWG-1` because the Rocq and Lean legs of that run ran
on a bare runner with no image digest, and PROOF-POLICY §8.2 counts a witness
toward `PWG-1` only with one; the legs job now runs in a digest-pinned image,
so the next recorded run restores `PWG-1`. The grade is what the reader
derives, never a value typed here. The proved claims type-check in Agda under the
canonical §2.1 invocation, `--cubical-compatible` included, with stronger flags
besides (`scripts/proof-flags.sh`). Each is also re-proved by hand in Rocq
(Coq 8.18.0, prelude only) and in Lean (4.24.0, core only, no Mathlib), with no
Expand Down
6 changes: 4 additions & 2 deletions docs/proof-debt.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,11 @@ that they are not mistaken for either:
and the receipt records them. The statement comparison was written by Claude
Code, and the owner reviewed it on 2026-11-13, so no obligation remains here.
The grade is what the pinned reader derives from the proof receipt
(`PROOF-POLICY` §8.5.1, §8.5.2): `PWG-1` at commit `292d566` on main, from
(`PROOF-POLICY` §8.5.1, §8.5.2): `PWG-2ii` at commit `292d566` on main, from
the receipts of CI run 43455458225 on commit `7dfeab2` and the echo that
joins the two commits.
joins the two commits. `PWG-1` also needs a digest-pinned image on every
counted leg (§8.2); the Rocq and Lean legs of that run had none, so it
returns with the first recorded run of the legs job in its pinned image.
* *Termination-sensitive noninterference.*
`Noninterference.OutcomeVisibility.termination-sensitive-fails` refutes TSNI
for the current typing rules when finishing versus non-finishing is public.
Expand Down
25 changes: 16 additions & 9 deletions scripts/grade-receipt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ RECEIPT_SCRIPT=scripts/grade-receipt.sh
# _build/standards, because the checker finds the reader and the digest
# script by their paths. Mathesis pins the same reader and runs the same
# checker.
RECEIPT_STANDARDS_COMMIT="${RECEIPT_STANDARDS_COMMIT_OVERRIDE:-f6ebc5ec6ba5d7f79ce996bf74c5237481a2a2fb}"
GENERATOR_SHA256=bfe35c08397ab85d7d33998ae126e189988994598320ffd2b139f2038e8eec4c
READER_SHA256=8978546740ca2d6a1d90b769fe02159883cb18f1eb2c44b2eeb737bab341dcd2
RECEIPT_STANDARDS_COMMIT="${RECEIPT_STANDARDS_COMMIT_OVERRIDE:-940a27af1e25a73a2d55daa78d0763e6749fd935}"
GENERATOR_SHA256=47e9e5596e69574440260e4372c4b400f6c5f97192ff04292a59bffc4c215fe8
READER_SHA256=29278b46654bdee70e8e1ff4a7ff8cb810e04b618c9ca1520a6979d6c4c91f18
DIGEST_SHA256=dfc6dde01a3a79df638eebe4cad0eae584d8f17280077e149174c0667e9508f4
CHECKER_SHA256=f2375747238464535d1b4a61f658f07cb2f8504c69bfb1812311c79429a4e23e
RECEIPT_STD="${RECEIPT_STD_OVERRIDE:-_build/standards}"
Expand Down Expand Up @@ -114,14 +114,21 @@ ROWS
# empty when the checker reported none, and the gates fail on any axiom.
# An Agda row then carries an imports field (empty here: this repository
# imports no other) and the sha256 of the trusted base the run checked
# (PROOF-POLICY 8.4), which --run-row writes. The current Agda row was
# recorded before the shared generator wrote 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 the run's trusted-base gate checked the cone
# against (its reported column); that list is unchanged since.
# (PROOF-POLICY 8.4); any row may carry last the digest-pinned image its
# checker ran in (PROOF-POLICY 8.2: PWG-1 needs one on every counted leg).
# --run-row writes both. The current rows were recorded before the shared
# generator wrote them, so their values come from the run's own commit
# 7dfeab2:
# - the trusted base is the sha256 of proof_trusted_base in
# scripts/proof-flags.sh there, the list the run's trusted-base gate
# checked the cone against (its reported column); unchanged since;
# - the Agda image is the container proofs.yml pinned there for the Agda job;
# - the Rocq and Lean legs ran on the bare ubuntu-24.04 runner, which has no
# digest, so their rows carry none and the grade is PWG-2ii until a run in
# the legs job's pinned image is recorded.
receipt_runs() {
cat <<'ROWS'
agda|https://github.com/hyperpolymath/secret-types/actions/runs/43455458225/attempts/1|7dfeab2dc13142fac476ee9c698cf009deb709c9|Agda version 2.6.4.3 (Debian 13 agda-bin=2.6.4.3-1+b2, container debian:13-slim)|agda --safe --without-K --cubical-compatible --no-libraries --ignore-interfaces --double-check -W error -i src src/SecretTypes/All.agda|96b2f0237fcc31a0ab60cc6952edbe4e9c1b3ca5f267d79bf6491f81432b0c9e|--safe; trusted base (no postulates under src/SecretTypes or tests); trusted base: 4 prover postulates in 6 prover-supplied modules of the cone, each BUILTIN-bound and listed; no other postulate|current||||0c1f64c3c7f0a26cbc92595168858485a9883f6196d287497dcc805faf5c58eb
agda|https://github.com/hyperpolymath/secret-types/actions/runs/43455458225/attempts/1|7dfeab2dc13142fac476ee9c698cf009deb709c9|Agda version 2.6.4.3 (Debian 13 agda-bin=2.6.4.3-1+b2, container debian:13-slim)|agda --safe --without-K --cubical-compatible --no-libraries --ignore-interfaces --double-check -W error -i src src/SecretTypes/All.agda|96b2f0237fcc31a0ab60cc6952edbe4e9c1b3ca5f267d79bf6491f81432b0c9e|--safe; trusted base (no postulates under src/SecretTypes or tests); trusted base: 4 prover postulates in 6 prover-supplied modules of the cone, each BUILTIN-bound and listed; no other postulate|current||||0c1f64c3c7f0a26cbc92595168858485a9883f6196d287497dcc805faf5c58eb|debian:13-slim@sha256:a29215f6a35e51e22adffa17f89e9d2ef06214e64a2bad10d765c46aea49f11f
rocq|https://github.com/hyperpolymath/secret-types/actions/runs/43455458225/attempts/1|7dfeab2dc13142fac476ee9c698cf009deb709c9|The Coq Proof Assistant, version 8.18.0 (Ubuntu 24.04 coq=8.18.0+dfsg-1build2)|coqc -q SecretTypes.v (in verification/legs/rocq)|4c96fb9c7d22685ae08d71fc2f200e394e93f07711b2b0619d2a154dbd19bc60|Rocq leg (Coq 8.18.0), 11 theorems closed under the global context|current||
lean|https://github.com/hyperpolymath/secret-types/actions/runs/43455458225/attempts/1|7dfeab2dc13142fac476ee9c698cf009deb709c9|Lean (version 4.24.0, x86_64-unknown-linux-gnu, commit 797c613eb9b6d4ec95db23e3e00af9ac6657f24b, Release) (release tarball, sha256 b14f5e5159219dd1a1956c3b806813319f5e94ccd5bdfd56f54520609a5bb5ec)|lake build; lake env lean Axioms.lean (in verification/legs/lean)|7ed75659e1520a28b949c7b004609485605f1b9e017b810352be4285390a13d6|Lean leg (Lean 4.24.0, core only), 11 theorems depend on no axioms|current||
agda|https://github.com/hyperpolymath/secret-types/actions/runs/43448301280/attempts/1|88a763ac6101b8d9e59c71caa6959abb4bffe4bd|Agda version 2.6.4.3 (Debian 13 agda-bin=2.6.4.3-1+b2, container debian:13-slim)|agda --safe --without-K --cubical-compatible --no-libraries --ignore-interfaces --double-check -W error -i src src/SecretTypes/All.agda|a0a8d66d74bf9deb5beeba6739c377290ce7399cf8ef60dc6214da211d086cb4|--safe; trusted base (no postulates under src/SecretTypes or tests); trusted base: 4 prover postulates in 6 prover-supplied modules of the cone, each BUILTIN-bound and listed; no other postulate|superseded|the inputs of the Agda leg changed after this run (scanner hardening from review); the CI run of the hardened commit replaces it|
Expand Down
7 changes: 5 additions & 2 deletions verification/legs/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,11 @@ N-4, N-5 and N-6 have no leg. They are checked demonstrations, not theorems
independent of Agda's, but all three are dependent type theories. The tag
needs a witness in a different foundation, such as Isabelle/HOL, and none
exists.
* The grade, `PWG-1`, rests on the receipts of one CI run
* The grade, `PWG-2ii`, rests on the receipts of one CI run
(https://github.com/hyperpolymath/secret-types/actions/runs/43455458225[43455458225]
on commit `7dfeab2`), carried to `292d566` on main by an echo (§8.5.2).
A change to any leg's inputs drops it until a new run is recorded (§8.4);
It is not `PWG-1` because these legs ran on a bare runner, which has no
image digest (§8.2); they now run in a digest-pinned image, and the next
recorded run restores `PWG-1`. A change to any leg's inputs drops the grade
until a new run is recorded (§8.4);
link:../../PROOF-STATUS.adoc[`PROOF-STATUS.adoc`] gives the derivation.
Loading
Loading