Skip to content
Closed
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
14 changes: 14 additions & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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) ...)`,
Expand Down
15 changes: 12 additions & 3 deletions PROOF-STATUS.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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.

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 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
Expand Down
7 changes: 5 additions & 2 deletions docs/proof-debt.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
34 changes: 24 additions & 10 deletions scripts/grade-receipt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@
# _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"
Expand Down Expand Up @@ -90,13 +90,17 @@
# 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||
Expand Down Expand Up @@ -214,9 +218,14 @@
# 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"
Expand Down Expand Up @@ -290,6 +299,10 @@
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)" ]]; }

Check warning on line 305 in scripts/grade-receipt.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Assign this positional parameter to a local variable.

See more on https://sonarcloud.io/project/issues?id=hyperpolymath_secret-types&issues=AaHsLmLiWoGSF9I--s34&open=AaHsLmLiWoGSF9I--s34&pullRequest=55
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; }
Expand All @@ -302,7 +315,7 @@
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
}
Expand All @@ -328,11 +341,11 @@
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"
Expand All @@ -341,6 +354,7 @@
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"
Expand Down
6 changes: 5 additions & 1 deletion verification/proofs/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
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 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.
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