Skip to content
Open
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
31 changes: 23 additions & 8 deletions .github/workflows/proofs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ jobs:
runs-on: ubuntu-24.04
timeout-minutes: 30
container: debian:13-slim@sha256:a29215f6a35e51e22adffa17f89e9d2ef06214e64a2bad10d765c46aea49f11f
# The image the checker runs in, recorded in the run row (--image) so the
# receipt can name it (PROOF-POLICY §8.2, owner ruling 2026-11-16). It must
# equal the container line above; a step below fails the job if it does not.
env:
IMAGE: debian:13-slim@sha256:a29215f6a35e51e22adffa17f89e9d2ef06214e64a2bad10d765c46aea49f11f
outputs:
row: ${{ steps.row.outputs.row }}
steps:
Expand All @@ -59,6 +64,7 @@ jobs:
git config --global --add safe.directory "$GITHUB_WORKSPACE"
test "$(agda --version)" = 'Agda version 2.6.4.3'
test "$(git rev-parse HEAD)" = "$SOURCE_COMMIT"
grep -qxF " container: $IMAGE" .github/workflows/proofs.yml
# The gate surfaces its own failure twice: once in the log, and once as a
# check annotation. The annotation matters because the job log is not
# always reachable (GitHub serves it from a blob host that some agent
Expand Down Expand Up @@ -106,20 +112,25 @@ 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")"
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, so the checker is isolated in the sense
# of PROOF-POLICY §8.2 (owner ruling 2026-11-16; #53): a bare runner's image
# can change underneath a version-pinned prover.
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:
IMAGE: ubuntu:24.04@sha256:73b999393d07f2bf65a40373778a44dc9a6d54ad7718d29247d8ff9413c4d6a8
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
LEAN_SHA256: b14f5e5159219dd1a1956c3b806813319f5e94ccd5bdfd56f54520609a5bb5ec
Expand All @@ -129,8 +140,8 @@ jobs:
steps:
- 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 +155,12 @@ jobs:
with:
ref: ${{ env.SOURCE_COMMIT }}
persist-credentials: false
- name: Verify the commit under test
run: test "$(git rev-parse HEAD)" = "$SOURCE_COMMIT"
# As in the Agda job: mark the workspace safe for git in this container.
- name: Verify the commit under test and the image
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
test "$(git rev-parse HEAD)" = "$SOURCE_COMMIT"
grep -qxF " container: $IMAGE" .github/workflows/proofs.yml
- 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 @@ -159,10 +174,10 @@ jobs:
commit="$(git rev-parse HEAD)"
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

* **Every proof job runs in a digest-pinned image, and the grade follows the
image rule (standards `4813fa1`, #53).**
** The receipt tools are pinned at standards `4813fa1`, which carries the
image rule of PROOF-POLICY §8.2 (metadatastician/standards#1625) and the
generator's review fixes (metadatastician/standards#1656).
** Under that reader the recorded runs derive `PWG-2ii`, not `PWG-1`: their
Rocq and Lean checkers ran on a bare runner. The receipt is unchanged but
for the six `:pwg` fields and the line naming the reader's commit.
** The Rocq and Lean job now runs in
`ubuntu:24.04@sha256:73b999393d07f2bf65a40373778a44dc9a6d54ad7718d29247d8ff9413c4d6a8`,
as the Agda job already ran in a digest-pinned Debian 13 image. Each run
row records its image (`--image`) and the axioms its run reported
(`--axioms none`), so the first run on main that is recorded can derive
`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
9 changes: 7 additions & 2 deletions PROOF-STATUS.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,13 @@ 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`*
| PWG-1 also needs every counted witness to have run in a container image
pinned by its digest, named in its receipt (`:image`, §8.2, owner ruling
2026-11-16). The recorded Rocq and Lean runs were on a bare runner, so the
pinned reader derives `PWG-2ii`. Every proof job now runs in a
digest-pinned image and records it, so the first run on main that is
recorded will let the reader derive `PWG-1`. The grade comes 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
7 changes: 5 additions & 2 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,11 @@ 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
From them the pinned reader derives Proof Witness Grade **`PWG-2ii`** for each
proved claim. It stops short of `PWG-1` because the recorded Rocq and Lean
runs were on a bare runner, not in an image pinned by its digest (§8.2, owner
ruling 2026-11-16); every proof job now runs in such an image, and the first
run on main that is recorded can derive `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
Expand Down
5 changes: 3 additions & 2 deletions docs/proof-debt.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,10 @@ 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` waits on a recorded run whose three
checkers ran in digest-pinned images (§8.2), which every proof job now does.
* *Termination-sensitive noninterference.*
`Noninterference.OutcomeVisibility.termination-sensitive-fails` refutes TSNI
for the current typing rules when finishing versus non-finishing is public.
Expand Down
6 changes: 3 additions & 3 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:-4813fa1092a38a6782e722ede5b09ce79e92fba3}"
GENERATOR_SHA256=47e9e5596e69574440260e4372c4b400f6c5f97192ff04292a59bffc4c215fe8
READER_SHA256=29278b46654bdee70e8e1ff4a7ff8cb810e04b618c9ca1520a6979d6c4c91f18
DIGEST_SHA256=dfc6dde01a3a79df638eebe4cad0eae584d8f17280077e149174c0667e9508f4
CHECKER_SHA256=f2375747238464535d1b4a61f658f07cb2f8504c69bfb1812311c79429a4e23e
RECEIPT_STD="${RECEIPT_STD_OVERRIDE:-_build/standards}"
Expand Down
5 changes: 4 additions & 1 deletion 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);
link:../../PROOF-STATUS.adoc[`PROOF-STATUS.adoc`] gives the derivation.
That run was on a bare runner, so it cannot reach `PWG-1`, which needs
each checker in an image pinned by its digest (§8.2); the legs job now runs
in `ubuntu:24.04@sha256:73b99939…`.
14 changes: 7 additions & 7 deletions verification/receipts/agda_praxis.deed
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
;; checked with the reference script of the standard. The grade is derived,
;; never typed:
;; bun deed_lint.js --proof-receipt-json verification/receipts/agda_praxis.deed
;; with the reader at standards f6ebc5ec6ba5d7f79ce996bf74c5237481a2a2fb.
;; with the reader at standards 4813fa1092a38a6782e722ede5b09ce79e92fba3.
;; Demonstrations N-4, N-5 and N-6 are not theorems (§8.1) and have no claim here.
;; The trusted base is what scripts/check-trusted-base.sh finds in the
;; prover-supplied modules of the import cone of src/SecretTypes/All.agda.
Expand All @@ -27,7 +27,7 @@
(inputs :prover agda :sha256 "96b2f0237fcc31a0ab60cc6952edbe4e9c1b3ca5f267d79bf6491f81432b0c9e")
(inputs :prover rocq :sha256 "4c96fb9c7d22685ae08d71fc2f200e394e93f07711b2b0619d2a154dbd19bc60")
(inputs :prover lean :sha256 "7ed75659e1520a28b949c7b004609485605f1b9e017b810352be4285390a13d6"))
(claim :id "N-1" :pwg PWG-1 :foundation-diverse #f
(claim :id "N-1" :pwg PWG-2ii :foundation-diverse #f
(leg :prover agda :route source :token proven :state AGDA-VERIFIED
; the run reported: --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
(receipt :run "https://github.com/hyperpolymath/secret-types/actions/runs/43455458225/attempts/1"
Expand Down Expand Up @@ -123,7 +123,7 @@
:invocation "lake build; lake env lean Axioms.lean (in verification/legs/lean)"
:state superseded
:reason "local run outside CI, kept as lineage only; replaced by the CI run https://github.com/hyperpolymath/secret-types/actions/runs/43448301280/attempts/1")))
(claim :id "N-2" :pwg PWG-1 :foundation-diverse #f
(claim :id "N-2" :pwg PWG-2ii :foundation-diverse #f
(leg :prover agda :route source :token proven :state AGDA-VERIFIED
; the run reported: --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
(receipt :run "https://github.com/hyperpolymath/secret-types/actions/runs/43455458225/attempts/1"
Expand Down Expand Up @@ -219,7 +219,7 @@
:invocation "lake build; lake env lean Axioms.lean (in verification/legs/lean)"
:state superseded
:reason "local run outside CI, kept as lineage only; replaced by the CI run https://github.com/hyperpolymath/secret-types/actions/runs/43448301280/attempts/1")))
(claim :id "N-3" :pwg PWG-1 :foundation-diverse #f
(claim :id "N-3" :pwg PWG-2ii :foundation-diverse #f
(leg :prover agda :route source :token proven :state AGDA-VERIFIED
; the run reported: --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
(receipt :run "https://github.com/hyperpolymath/secret-types/actions/runs/43455458225/attempts/1"
Expand Down Expand Up @@ -315,7 +315,7 @@
:invocation "lake build; lake env lean Axioms.lean (in verification/legs/lean)"
:state superseded
:reason "local run outside CI, kept as lineage only; replaced by the CI run https://github.com/hyperpolymath/secret-types/actions/runs/43448301280/attempts/1")))
(claim :id "N-7" :pwg PWG-1 :foundation-diverse #f
(claim :id "N-7" :pwg PWG-2ii :foundation-diverse #f
(leg :prover agda :route source :token proven :state AGDA-VERIFIED
; the run reported: --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
(receipt :run "https://github.com/hyperpolymath/secret-types/actions/runs/43455458225/attempts/1"
Expand Down Expand Up @@ -411,7 +411,7 @@
:invocation "lake build; lake env lean Axioms.lean (in verification/legs/lean)"
:state superseded
:reason "local run outside CI, kept as lineage only; replaced by the CI run https://github.com/hyperpolymath/secret-types/actions/runs/43448301280/attempts/1")))
(claim :id "N-8" :pwg PWG-1 :foundation-diverse #f
(claim :id "N-8" :pwg PWG-2ii :foundation-diverse #f
(leg :prover agda :route source :token proven :state AGDA-VERIFIED
; the run reported: --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
(receipt :run "https://github.com/hyperpolymath/secret-types/actions/runs/43455458225/attempts/1"
Expand Down Expand Up @@ -507,7 +507,7 @@
:invocation "lake build; lake env lean Axioms.lean (in verification/legs/lean)"
:state superseded
:reason "local run outside CI, kept as lineage only; replaced by the CI run https://github.com/hyperpolymath/secret-types/actions/runs/43448301280/attempts/1")))
(claim :id "N-9" :pwg PWG-1 :foundation-diverse #f
(claim :id "N-9" :pwg PWG-2ii :foundation-diverse #f
(leg :prover agda :route source :token proven :state AGDA-VERIFIED
; the run reported: --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
(receipt :run "https://github.com/hyperpolymath/secret-types/actions/runs/43455458225/attempts/1"
Expand Down
Loading