diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 566552d..af85c52 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -10,6 +10,20 @@ https://semver.org/spec/v2.0.0.html[Semantic Versioning]. ==== Fixed +* **The receipt records `PWG-2ii`, and the generator derives it (standards + `940a27a`, #1625).** +** Under standards#1625 (owner ruling 2026-11-16), `PWG-1` needs every counted + witness's current receipt to name the container image its checker ran in, + pinned by digest (`:image "NAME@sha256:<64 hex>"`). None of these receipts + does, so the reader derives `PWG-2ii` for N-1, N-2, N-3, N-7, N-8 and N-9, + and the receipt and `PROOF-STATUS.adoc` record it. +** `scripts/grade-receipt.sh` follows the reader: `pwg_of` yields `PWG-1` only + when every counted witness names an image, through a new optional 11th + ledger column that is emitted as `:image`. No row carries one, because no CI + log printed a digest for these runs. +** The reader, the reference digest script and the checker are now pinned at + `940a27a`, each by sha256. + * **The receipt lists its inputs, and the gate runs the shared git checker (standards `e5a39d7`, #1545).** ** Each current receipt carries `(inputs-manifest (file :path :sha256) ...)`, diff --git a/PROOF-STATUS.adoc b/PROOF-STATUS.adoc index fc9d8a3..22c023e 100644 --- a/PROOF-STATUS.adoc +++ b/PROOF-STATUS.adoc @@ -26,8 +26,17 @@ 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`* (was `PWG-1`) +| Downgraded from `PWG-1` on 2026-11-18. standards#1625 (owner ruling + 2026-11-16) makes `PWG-1` require that every counted witness's current + receipt names the container image its checker ran in, pinned by digest + (`:image "NAME@sha256:<64 hex>"`). None of the receipts here carries an + `:image`, so the reader at standards `940a27af` derives `PWG-2ii` for all + six claims, and the recorded grade follows it. The Agda job of + `.github/workflows/proofs.yml` does run in a digest-pinned container, but + the Rocq and Lean legs run on the bare runner, with no container image to + name, so `PWG-1` is not reachable by naming an image alone. The receipt is + otherwise unchanged. 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] @@ -183,7 +192,7 @@ the same way. The `receipt` job writes the receipt for its own run and prints the rows to record, then checks the committed receipt. The pinned reader (`readProofReceipt`), the reference digest script and the checker are all -at standards `e5a39d7e5c66f9d24d7e0ffa3f8dbd01f2d42d9d`, each pinned by +at standards `940a27af1e25a73a2d55daa78d0763e6749fd935`, each pinned by sha256. The reader derives each claim's grade. A negative control runs with every check: the same receipt with a wrong `:pwg` must be refused. diff --git a/README.adoc b/README.adoc index 248d985..a66dca4 100644 --- a/README.adoc +++ b/README.adoc @@ -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 is not `PWG-1`: since standards#1625 (owner ruling +2026-11-16), `PWG-1` needs every counted witness's current receipt to name the +container image its checker ran in, pinned by digest (`:image`), and none of +these receipts does. 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 diff --git a/docs/proof-debt.adoc b/docs/proof-debt.adoc index b79f40c..3667f27 100644 --- a/docs/proof-debt.adoc +++ b/docs/proof-debt.adoc @@ -81,9 +81,12 @@ 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. It is not `PWG-1`: standards#1625 (owner ruling + 2026-11-16) makes `PWG-1` require that every counted witness's current + receipt names the container image its checker ran in, pinned by digest, and + these receipts name none. * *Termination-sensitive noninterference.* `Noninterference.OutcomeVisibility.termination-sensitive-fails` refutes TSNI for the current typing rules when finishing versus non-finishing is public. diff --git a/scripts/grade-receipt.sh b/scripts/grade-receipt.sh index 4679aac..f2e4164 100755 --- a/scripts/grade-receipt.sh +++ b/scripts/grade-receipt.sh @@ -51,10 +51,10 @@ default_branch=main # _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. -STANDARDS_COMMIT=e5a39d7e5c66f9d24d7e0ffa3f8dbd01f2d42d9d -READER_SHA256=37ff85be499b35dd9d74399e05d9ae1e57ccf095362c355f93e04b3bbf4c9491 +STANDARDS_COMMIT=940a27af1e25a73a2d55daa78d0763e6749fd935 +READER_SHA256=29278b46654bdee70e8e1ff4a7ff8cb810e04b618c9ca1520a6979d6c4c91f18 DIGEST_SHA256=dfc6dde01a3a79df638eebe4cad0eae584d8f17280077e149174c0667e9508f4 -CHECKER_SHA256=831f5a43c906c3edc8cfa68ab5fe13c37e7a41b35e40068481d988d887f4bd3f +CHECKER_SHA256=f2375747238464535d1b4a61f658f07cb2f8504c69bfb1812311c79429a4e23e STANDARDS_RAW="https://raw.githubusercontent.com/metadatastician/standards/$STANDARDS_COMMIT" std_dir=_build/standards reader="$std_dir/1-formats/deed/tools/deed_lint.js" @@ -90,13 +90,17 @@ ROWS # that leg for every claim. # prover | run | commit (40 hex) | checker | invocation | inputs sha256 | # what the run reported | state (current|superseded|regressed) | reason | -# axioms +# axioms | image (optional, the 11th field) # The inputs sha256 of a current row is the §8.5.1 digest at the row's # commit; --check computes it again with the reference script (§8.5.3). A # row that is not current keeps the digest its run printed, which may predate # §8.5.1, and the receipt does not state it. The axioms column lists each # axiom the checker reported as name:disposition, comma-separated; it is # empty when the checker reported none, and the gates fail on any axiom. +# The image column is empty unless the CI log of that run printed the container +# image its checker ran in, pinned by digest (NAME@sha256:<64 hex>); only a +# current row may carry one, and it is never typed from memory (§8.2, +# standards#1625: PWG-1 needs it on every counted witness). 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|| @@ -214,9 +218,14 @@ echo_ref() { local c="$1"; echoes | awk -F'|' -v c="$c" '$1==c{print $4}'; } # Validate one row; print nothing. A field may not hold " or \ (deed strings) # and may not be empty, except the reason of a current receipt and the axioms. check_row() { - local row="$1" prover run commit checker inv dig said state reason axioms a - IFS='|' read -r prover run commit checker inv dig said state reason axioms <<< "$row" - [[ "$(tr -cd '|' <<< "$row" | wc -c)" == 9 ]] || die "a ledger row needs 10 fields: $row" + local row="$1" prover run commit checker inv dig said state reason axioms image a + IFS='|' read -r prover run commit checker inv dig said state reason axioms image <<< "$row" + [[ "$(tr -cd '|' <<< "$row" | wc -c)" == 9 || "$(tr -cd '|' <<< "$row" | wc -c)" == 10 ]] || die "a ledger row needs 10 fields, or 11 with an image: $row" + if [[ -n "$image" ]]; then + [[ "$state" == current ]] || die "only a current row may name an image: $row" + local img_re='^[^[:space:]|@]+@sha256:[0-9a-f]{64}$' + [[ "$image" =~ $img_re ]] || die "an image must be pinned by digest, NAME@sha256:<64 hex>: $row" + fi [[ "$row" != *'"'* && "$row" != *'\'* ]] || die "a ledger row holds a quote or backslash: $row" [[ "$prover" =~ ^(agda|rocq|lean)$ ]] || die "unknown prover in row: $row" [[ "$commit" =~ ^[0-9a-f]{40}$ ]] || die "a row's commit must be 40 lowercase hex: $row" @@ -290,6 +299,10 @@ describes_source() { c="$img" done } +# standards#1625 (owner ruling 2026-11-16), as the reader derives it: PWG-1 needs +# every counted witness's current receipt to name the image its checker ran in, +# pinned by digest. The ledger's image column holds it; the reader checks its form. +names_image() { [[ -n "$(current_field "$1" 11)" ]]; } pwg_of() { local token="$1" coq_route="$2" coq_state="$3" lean_route="$4" lean_state="$5" n=0 p [[ "$token" == proven || "$token" == proven-with-postulates ]] || { printf 'ungraded'; return; } @@ -302,7 +315,7 @@ pwg_of() { case "$n" in 0) printf 'PWG-3' ;; 1) printf 'PWG-2i' ;; - 2) if describes_source agda && describes_source rocq && describes_source lean; then printf 'PWG-1'; else printf 'PWG-2ii'; fi ;; + 2) if describes_source agda && describes_source rocq && describes_source lean && names_image agda && names_image rocq && names_image lean; then printf 'PWG-1'; else printf 'PWG-2ii'; fi ;; *) die "unexpected recheck count: $n" ;; esac } @@ -328,11 +341,11 @@ emit_manifest() { printf ')\n' } emit_receipts() { - local prover="$1" row p run commit checker inv dig said state reason axioms + local prover="$1" row p run commit checker inv dig said state reason axioms image # Current first, then the lineage in ledger order. for want in current other; do while IFS= read -r row; do - IFS='|' read -r p run commit checker inv dig said state reason axioms <<< "$row" + IFS='|' read -r p run commit checker inv dig said state reason axioms image <<< "$row" [[ "$p" == "$prover" ]] || continue if [[ $want == current ]]; then [[ $state == current ]] || continue; else [[ $state != current ]] || continue; fi printf ' ; the run reported: %s\n' "$said" @@ -341,6 +354,7 @@ emit_receipts() { printf ' :checker "%s"\n' "$checker" printf ' :invocation "%s"\n' "$inv" if [[ $state == current ]]; then + [[ -z "$image" ]] || printf ' :image "%s"\n' "$image" printf ' :inputs-sha256 "%s"\n' "$dig" printf ' :state current\n' emit_manifest "$prover" diff --git a/verification/proofs/README.adoc b/verification/proofs/README.adoc index b228c0f..76e0b4a 100644 --- a/verification/proofs/README.adoc +++ b/verification/proofs/README.adoc @@ -53,7 +53,11 @@ It applies to theory theorems: * `PWG-2ii` means both legs count, which discharges the policy's recheck obligation. * `PWG-1` adds a current receipt, per commit, from a pinned headless - checker for every witness. + checker for every witness. Since standards#1625 (owner ruling 2026-11-16) + each counted witness's receipt must also name the container image its + checker ran in, pinned by digest (`:image "NAME@sha256:<64 hex>"`). Without + it the grade is `PWG-2ii`; this repository's receipts name no image, so it + records `PWG-2ii`. A leg counts only when it is kernel-checked and its statement correspondence is `RECONCILED`. Grades are derived from receipts and the diff --git a/verification/receipts/agda_praxis.deed b/verification/receipts/agda_praxis.deed index 6dfae63..8613a90 100644 --- a/verification/receipts/agda_praxis.deed +++ b/verification/receipts/agda_praxis.deed @@ -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 e5a39d7e5c66f9d24d7e0ffa3f8dbd01f2d42d9d. +;; with the reader at standards 940a27af1e25a73a2d55daa78d0763e6749fd935. ;; 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. @@ -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" @@ -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" @@ -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" @@ -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" @@ -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" @@ -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"