From 09ea35d3202333a8c2c43d2b65e72c2e9686e634 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 20:01:31 +0000 Subject: [PATCH 1/6] docs(dashboard): 144 tests; T-1 at PWG-1 in READINESS 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 Claude-Session: https://claude.ai/code/session_01GVPPsHYqVJSoPzdNYD9tRg --- READINESS.adoc | 4 ++-- TOPOLOGY.adoc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/READINESS.adoc b/READINESS.adoc index 686e2fd..9c9c39f 100644 --- a/READINESS.adoc +++ b/READINESS.adoc @@ -8,7 +8,7 @@ standards/testing-and-benchmarking/TESTING-TAXONOMY.adoc v1.0 === CRG Grade: D (Alpha — Unstable) -*Justification:* 143 tests declared (`cargo test --workspace --locked -- --list`; rust-ci runs them); the +*Justification:* 144 tests declared (`cargo test --workspace --locked -- --list`; rust-ci runs them); the Idris2 ABI typechecks and 12 proofs are checked (PROVEN ledger rows: ABI, grade, transaction-model and epistemic-model lemmas, not the security obligations); benchmarks exist (5 Criterion groups). But: no fuzz testing, no mutation testing, 241 unwrap() calls, E2E mostly skips, @@ -65,7 +65,7 @@ handling (run by idris-abi.yml, agda-proofs.yml and dashboard-check) |=== -*Total declared:* 143 tests + 5 benchmark groups; 12 proofs checked (PROVEN ledger rows; five are theory theorems under PROOF-POLICY §8: four at PWG-3 and T-1 at PWG-2ii — see `docs/theory/PROOF-GRADES.adoc`) *Total +*Total declared:* 144 tests + 5 benchmark groups; 12 proofs checked (PROVEN ledger rows; five are theory theorems under PROOF-POLICY §8: four at PWG-3 and T-1 at PWG-1, derived from `verification/receipts/januskey_praxis.deed` — see `docs/theory/PROOF-GRADES.adoc`) *Total missing:* Fuzz, mutation, chaos, compatibility === Aspect Matrix diff --git a/TOPOLOGY.adoc b/TOPOLOGY.adoc index ba10832..fcb8922 100644 --- a/TOPOLOGY.adoc +++ b/TOPOLOGY.adoc @@ -79,7 +79,7 @@ INTERFACES & RESEARCH MPR Methodology ████░░░░░░ ~40% Design documented; FORMAL PROOFS PENDING (Idris2 ABI typechecks; 12 proofs checked: ABI, grade, transaction-model and epistemic-model lemmas, not the security obligations; MPR not linked to the Rust) - Testing (READINESS matrix) ██████░░░░ ~60% 143 tests + 5 benches; missing fuzz, mutation, + Testing (READINESS matrix) ██████░░░░ ~60% 144 tests + 5 benches; missing fuzz, mutation, chaos, compatibility (Grade D) REPO INFRASTRUCTURE From 87a0e493978f9f176c0938e8b10d33f6dbe09a83 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 20:14:24 +0000 Subject: [PATCH 2/6] proofs: record run 43945986467 at e8deeaf; all five theory rows derive PWG-1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Claude-Session: https://claude.ai/code/session_01GVPPsHYqVJSoPzdNYD9tRg --- PROOF-NEEDS.adoc | 35 ++-- READINESS.adoc | 2 +- docs/theory/PROOF-GRADES.adoc | 90 ++++----- scripts/proof-receipt.sh | 25 +-- verification/receipts/januskey_praxis.deed | 220 ++++++++++++++++++--- 5 files changed, 265 insertions(+), 107 deletions(-) mode change 100644 => 100755 scripts/proof-receipt.sh diff --git a/PROOF-NEEDS.adoc b/PROOF-NEEDS.adoc index d8a17ab..ef7e51e 100644 --- a/PROOF-NEEDS.adoc +++ b/PROOF-NEEDS.adoc @@ -62,15 +62,15 @@ tables must agree. | C-3 | A transaction containing an obliteration is not all-reversible | PROVEN | `+Layout.obliterateNotReversible+` | C-4 | Replacing a chain entry by one with a different hash breaks the link | PROVEN | `+Proofs.tamperBreaksLink+` | C-5 | Struct sizes 32/16/112 and 8-byte alignment as divisibility (statements about the literals) | PROVEN | `+Layout.{contentHashSize,keyIdSize,oblitProofSize,hashAligned,keyIdAligned,oblitAligned}+` -| G-1 | Reversibility as a Loss grade: lossless traces have only lossless steps; obliteration absorbs; a wrap/unwrap pair carries its cancellation law (its grade 𝟙 is assigned, not derived from that law) | PROVEN | `+verification/proofs/agda/Reversibility.agda+` (Agda kernel, resource-algebra pinned at `+cf9235c+`); `+tests/reject-agda/*+` refused; rechecked in Rocq and Lean (`+verification/proofs/{rocq,lean}/Reversibility+`, the Loss grade restated, legs not yet in the receipt); the cancellation premise is the TESTED row `+execute_then_undo_is_identity+` +| G-1 | Reversibility as a Loss grade: lossless traces have only lossless steps; obliteration absorbs; a wrap/unwrap pair carries its cancellation law (its grade 𝟙 is assigned, not derived from that law) | PROVEN | `+verification/proofs/agda/Reversibility.agda+` (Agda kernel, resource-algebra pinned at `+cf9235c+`); `+tests/reject-agda/*+` refused; rechecked in Rocq and Lean (`+verification/proofs/{rocq,lean}/Reversibility+`, the Loss grade restated, `+PWG-1+`); the cancellation premise is the TESTED row `+execute_then_undo_is_identity+` | G-2 | The Idris2 `+IsCNO+`/`+ReversibleOp+` pair corresponds to Agda `+ReversiblePair+` (by transcription) | ASSUMED | no mechanical link claimed | G-3 | The FFI bridge preserves grade 𝟙 (homomorphism) | OPEN | resource-algebra lists homomorphisms OPEN; to file from JNK-01 | E-1 | An attacker cannot recover obliterated content or use a revoked key | OPEN | `+Types.adversaryCannotKnow+` holds only because `+Knows+` has no Adversary constructor; the *model-level* half is now proved in Agda as row E-1m (#145 item 3) -| E-1m | In a world model, an adversary whose observation excludes the store does not know what it holds; obliteration leaves nothing to recover; rotation to a different key leaves no agent able to use the old one (premise `+old ≠ new+`; true by the definition of `+rotate+` in the model; that an unusable key cannot decrypt is X-1) | PROVEN | `+verification/proofs/agda/Epistemic.agda+`; rechecked in Rocq and Lean (`+verification/proofs/{rocq,lean}/Epistemic+`, legs not yet in the receipt); `+tests/reject-agda/{AdversaryKnows,OldKeyStillUsable}.agda+` refused +| E-1m | In a world model, an adversary whose observation excludes the store does not know what it holds; obliteration leaves nothing to recover; rotation to a different key leaves no agent able to use the old one (premise `+old ≠ new+`; true by the definition of `+rotate+` in the model; that an unusable key cannot decrypt is X-1) | PROVEN | `+verification/proofs/agda/Epistemic.agda+`; rechecked in Rocq and Lean (`+verification/proofs/{rocq,lean}/Epistemic+`, `+PWG-1+`); `+tests/reject-agda/{AdversaryKnows,OldKeyStillUsable}.agda+` refused | X-1 | Hash one-wayness; physical erasure (cryptographic and physical assumptions, external to this repository) | ASSUMED | not theorems of this repo | T-1 | Undoing a fully executed transaction's operations in reverse order restores the state it began in, given each step's undo restores its execute (the sequential Theorem 3.4) | PROVEN | `+TransactionAtomicity.rollback-restores+`; rechecked in Rocq and Lean (`+verification/proofs/{rocq,lean}/Rollback+`, `+PWG-1+`); `+tests/reject-agda/ForwardRollback.agda+` refused -| T-2 | In any single-active log (records with a decidable key and an active or settled phase), opening a fresh active record, a key- and phase-preserving edit, and a settling transition each preserve the invariant and rewrite only the active record, so a settled one is never modified | PROVEN | `+SingleActiveLog.{begin-good,modify-good,finish-good,update-active}+`; rechecked in Rocq and Lean (`+verification/proofs/{rocq,lean}/SingleActiveLog+`, legs not yet in the receipt); `+tests/reject-agda/SettleWithoutSettling.agda+` refused; januskey's instance is `+TransactionAtomicity.lifecycle-preserves-good+`; `+tests/reject-agda/CommitWhenIdle.agda+` refused -| T-3 | In any single-active log satisfying the invariant, at most one record is active, and exactly one when the pointer is set | PROVEN | `+SingleActiveLog.at-most-one-active+`; rechecked in Rocq and Lean (`+verification/proofs/{rocq,lean}/SingleActiveLog+`, legs not yet in the receipt) (januskey's transactions are an instance) +| T-2 | In any single-active log (records with a decidable key and an active or settled phase), opening a fresh active record, a key- and phase-preserving edit, and a settling transition each preserve the invariant and rewrite only the active record, so a settled one is never modified | PROVEN | `+SingleActiveLog.{begin-good,modify-good,finish-good,update-active}+`; rechecked in Rocq and Lean (`+verification/proofs/{rocq,lean}/SingleActiveLog+`, `+PWG-1+`); `+tests/reject-agda/SettleWithoutSettling.agda+` refused; januskey's instance is `+TransactionAtomicity.lifecycle-preserves-good+`; `+tests/reject-agda/CommitWhenIdle.agda+` refused +| T-3 | In any single-active log satisfying the invariant, at most one record is active, and exactly one when the pointer is set | PROVEN | `+SingleActiveLog.at-most-one-active+`; rechecked in Rocq and Lean (`+verification/proofs/{rocq,lean}/SingleActiveLog+`, `+PWG-1+`) (januskey's transactions are an instance) | T-4 | A rollback that fails part-way can be retried to completion | TESTED | `+rollback_resume_test+` drives the real `+jk+`: after one undo error and a repair, `+jk rollback+` skips the already undone operation and finishes (before the fix the retry stopped at it every time, reproduced 2026-10-26); fixed in `+cmd_rollback+` | T-5 | The transaction log is never left disagreeing with memory by a failed save, and is replaced by rename rather than overwritten in place, with an fsync before the rename by construction (no test observes the fsync) (a randomly named temporary file opened with the old file's mode, removed only if this save created it) rather than overwritten in place | TESTED | `+transaction::tests::failed_save_*+`: a save that fails at the final step leaves begin, add_operation, commit and rollback unapplied in memory; mutants (memory first, plain `+fs::write+`, no temp cleanup, shared temp name, truncating open, no permission copy) each fail a test. Not claimed: crash-safety of the rename itself is by construction, not crash-injected; the directory fsync is best effort (owner decision 2026-11-09), because failing the save after the rename would leave disk new and memory old; concurrent writers are out of scope (each save's content is intact, the last rename wins) | T-6 | A failed execute leaves the filesystem unchanged, and each undo restores the state its execute started from (premises of T-1; single steps are TESTED by `+execute_then_undo_is_identity+`) | ASSUMED | not checked for the failure path @@ -133,27 +133,26 @@ link:verification/receipts/januskey_praxis.deed[`+verification/receipts/januskey (§8.5.1, profile `+proof-receipt+`), written by `+scripts/proof-receipt.sh+` and checked by `+just test-receipt+` and CI with the standards reader pinned by commit, which derives each grade and refuses one the receipts do not support. -It describes commit `+b503488+` on `+main+`, where green `+agda-proofs.yml+` run -https://github.com/hyperpolymath/januskey/actions/runs/43213340167[43213340167] +It describes commit `+e8deeaf+` on `+main+`, where green `+agda-proofs.yml+` run +https://github.com/hyperpolymath/januskey/actions/runs/43945986467[43945986467] checked `+Reversibility+`, `+TransactionAtomicity+`, `+Epistemic+` and `+SingleActiveLog+` under `+--safe --without-K --cubical-compatible+` (Agda 2.6.4.3, `+resource-algebra+` pinned at `+cf9235c+`, import cone 7 first-party -modules and 8 supplied with the prover, 0 postulates) and T-1's Rocq and Lean -legs. Each of the five is `+PROVEN+` under the §2.1 invocation with -correspondence state `+AGDA-VERIFIED+`. The superseded receipts (runs 42736066407 +modules and 8 supplied with the prover, 0 postulates) and the Rocq and Lean legs of all five rows (22 axiom reports in +each prover, every one clean). Each of the five is `+PROVEN+` under the §2.1 invocation with +correspondence state `+AGDA-VERIFIED+`. The superseded receipts (runs 43213340167 at `+b503488+`, 42736066407 at `+e165438+`, 42076969251 at `+23bc8c3+`, 41687715055 at `+fc188c4+` and 40867211509 at `+4afb710+`), the cone and the axioms (none in the development; the prover's four universe-level primitives are checked by name and binding and listed as its trusted base) are recorded in the receipt and in link:docs/theory/PROOF-GRADES.adoc[`+docs/theory/PROOF-GRADES.adoc+`]. -*PWG census, theory theorems of this repository (denominator 5):* `+PWG-3+` 4 -(G-1, T-2, T-3, E-1m) · `+PWG-2i+` 0 · `+PWG-2ii+` 0 · `+PWG-1+` 1 (T-1) · +*PWG census, theory theorems of this repository (denominator 5):* `+PWG-1+` 5 +(G-1, T-1, T-2, T-3, E-1m) · `+PWG-2ii+` 0 · `+PWG-2i+` 0 · `+PWG-3+` 0 · `+ungraded+` 0. G-3 names this repository's FFI bridge, so PROOF-POLICY §1 classes it as engineering and it is outside the ladder. Every row now has a Rocq leg and a Lean leg, re-proved by hand and reconciled statement by statement (`+docs/theory/PROOF-GRADES.adoc+`, §The recheck -legs). The legs of G-1, T-2, T-3 and E-1m enter the receipt's claim list once a -CI run on `+main+` has checked them; the reader then derives their grade. A grade +legs), and all three witnesses of every row are in the receipt. A grade is not a discharge (§8.4): the premises each row names stay where they are. The other seven PROVEN rows — A-1, A-2, C-1 to C-5 — are Idris2 theorems. Under @@ -165,11 +164,11 @@ contracts, and **Verus** (PROOF-POLICY §1.2, owner ruling 2026-11-07; not SPARK and not Idris2); neither verifier has a contract or proof in this tree yet, which is why no Rust row is proved. -Only T-1 is above `+PWG-3+`: it is `+PWG-1+`. Its Rocq and Lean legs are re-proved -and reconciled, and all three witnesses have current receipts from pinned CI -checkers run on the receipt's source commit (§8.2). No row is `+PWG-2i+` or -`+PWG-2ii+`. A later change to a leg's inputs makes the receipt stale (the CI job -warns), and the grade then holds for `+b503488+` until a run of the new commit is +All five theory rows are `+PWG-1+`: their Rocq and Lean legs are re-proved and +reconciled, and all three witnesses of each have current receipts from pinned CI +checkers run on the receipt's source commit (§8.2). No row is `+PWG-2i+`, +`+PWG-2ii+` or `+PWG-3+`. A later change to a leg's inputs makes the receipt stale (the CI job +warns), and the grade then holds for `+e8deeaf+` until a run of the new commit is recorded (§8.4, "regression drops the grade"). The row-by-row mapping is in `+docs/theory/PROOF-GRADES.adoc+`. Since 2026-11-01 the gate runs PROOF-POLICY §2.1's canonical invocation diff --git a/READINESS.adoc b/READINESS.adoc index f3a9ff9..1bb6e42 100644 --- a/READINESS.adoc +++ b/READINESS.adoc @@ -65,7 +65,7 @@ handling (run by idris-abi.yml, agda-proofs.yml and dashboard-check) |=== -*Total declared:* 144 tests + 5 benchmark groups; 12 proofs checked (PROVEN ledger rows; five are theory theorems under PROOF-POLICY §8, graded from the receipt: T-1 at PWG-1 and four at PWG-3, whose Rocq and Lean legs check but have no CI receipt yet — see `docs/theory/PROOF-GRADES.adoc`) *Total +*Total declared:* 144 tests + 5 benchmark groups; 12 proofs checked (PROVEN ledger rows; five are theory theorems under PROOF-POLICY §8, all five at PWG-1, derived from `verification/receipts/januskey_praxis.deed` — see `docs/theory/PROOF-GRADES.adoc`) *Total missing:* Fuzz, mutation, chaos, compatibility === Aspect Matrix diff --git a/docs/theory/PROOF-GRADES.adoc b/docs/theory/PROOF-GRADES.adoc index 0675b5e..9c1d021 100644 --- a/docs/theory/PROOF-GRADES.adoc +++ b/docs/theory/PROOF-GRADES.adoc @@ -13,12 +13,12 @@ repository, and none is introduced here. [NOTE] ==== *PWG census, theory theorems of this repository (denominator 5):* -`PWG-3` 4 (G-1, T-2, T-3, E-1m) · `PWG-2i` 0 · `PWG-2ii` 0 · `PWG-1` 1 (T-1) · +`PWG-1` 5 (G-1, T-1, T-2, T-3, E-1m) · `PWG-2ii` 0 · `PWG-2i` 0 · `PWG-3` 0 · `ungraded` 0. `+foundation-diverse`: none. Axioms: none. Derived by the pinned standards reader from `verification/receipts/januskey_praxis.deed` (§The -machine-readable receipt below), not typed. G-1, T-2, T-3 and E-1m now also have -Rocq and Lean legs (§The recheck legs below). They join the receipt once a CI -run on `main` has checked them, and the reader then derives their grade. +machine-readable receipt below), not typed: every theory row has an Agda, a Rocq +and a Lean witness, each with a current receipt from a pinned CI checker run on +the receipt's source commit (§The recheck legs below). The denominator is the ledger rows whose source of truth is an Agda theorem. PROOF-POLICY §1 puts a statement that names one repository's type, function or @@ -130,16 +130,10 @@ run the §8.5.3 git checks (each manifest holds at its commit, the and warn when a leg's inputs have changed since the receipt's source commit. This page is the human reading of that file. -The change that added the Rocq and Lean legs of G-1, T-2, T-3 and E-1m added -files to `verification/proofs/rocq` and `verification/proofs/lean`, which are -T-1's recheck inputs, and changed their checker, `scripts/check-recheck.sh`. The -receipt still describes `b503488` and stays true of it, so T-1 is `PWG-1` there; -the CI job warns that HEAD has moved on. The follow-up that records the first -green `main` run after that change adds it to the run ledger, adds the four -rows' legs to the claim list, and the reader derives all five grades afresh. - -The receipt describes commit `b5034884dbe945139d03b38fe80cfdf1106a77e1` on `main`. -The gate changed twice before it, in hyperpolymath/januskey#170 (the import-cone +The receipt describes commit `e8deeaf7bc7b70500d57c282828512c8f8ba81f9` on `main`, +the merge of hyperpolymath/januskey#180, which added the Rocq and Lean legs of +G-1, T-2, T-3 and E-1m and made `scripts/check-recheck.sh` count every axiom +report. Before it, the gate changed in hyperpolymath/januskey#170 (the import-cone postulate scan) and #174 (a token may start after a skipped literal), and #171 changed the modules' bytes and added `SingleActiveLog.agda`. A changed checker or changed inputs re-earn the receipt (§8.4), so every receipt from before those @@ -150,11 +144,13 @@ changes is `superseded`, and the current one is a run on `main` after all three. | Field | Value | Workflow, run | `agda-proofs.yml`, run - https://github.com/hyperpolymath/januskey/actions/runs/43213340167[43213340167], + https://github.com/hyperpolymath/januskey/actions/runs/43945986467[43945986467], branch `main`, conclusion **success**: job "Reversibility as a grade (Loss instance), expected rejections" (Agda) and job "Rocq and Lean recheck legs, - expected rejections" (T-1's legs, §The recheck legs below) -| Commit | `b5034884dbe945139d03b38fe80cfdf1106a77e1` (started 2026-11-12T11:55:42Z) + expected rejections" (all five rows' legs: 4 Rocq and 4 Lean files, 22 axiom + reports in each prover, every one clean; 8 refusals as named; §The recheck + legs below) +| Commit | `e8deeaf7bc7b70500d57c282828512c8f8ba81f9` (started 2026-11-16T20:04:43Z) | Prover | `agda-bin=2.6.4.3-1+b2` on Debian trixie-slim (`@sha256:a29215f6…`), asserted by a passing step: `test "$(agda --version)" = 'Agda version 2.6.4.3'` @@ -197,10 +193,14 @@ Earlier receipts, kept with their lineage (§8.4) here and in the receipt file: |=== | Run, commit | State | Why +| https://github.com/hyperpolymath/januskey/actions/runs/43213340167[43213340167], `b503488` +| `superseded` +| T-1's legs only (`Rollback.v`, `Rollback.lean`), before #180; the Agda inputs are + unchanged at `e8deeaf`, and run 43945986467 there replaces it | https://github.com/hyperpolymath/januskey/actions/runs/42736066407[42736066407], `e165438` | `superseded` -| The first green run on `main` of the gate as #174 left it; replaced by the run - at the receipt's source commit +| The first green run on `main` of the gate as #174 left it; replaced by run + 43213340167 at a later commit | https://github.com/hyperpolymath/januskey/actions/runs/42076969251[42076969251], `23bc8c3` | `superseded` | Before the cone scan (#170) and before `SingleActiveLog.agda` (#171) @@ -212,29 +212,26 @@ Earlier receipts, kept with their lineage (§8.4) here and in the receipt file: | Before `--cubical-compatible` and before `Epistemic.agda`; it never covered E-1m |=== -Those are the `PWG-3` facts: the propositions type-check in Agda under the -§2.1 invocation, in CI, at a named commit, with the prover version pinned and -the import cone recorded. For G-1, T-2, T-3 and E-1m the Rocq and Lean legs -exist (§The recheck legs below), but no CI run on `main` has checked them yet, so -no receipt counts them and their grade is `PWG-3`. T-1 has both legs, and each -counted witness (Agda, Rocq and Lean) has a current receipt from a pinned CI -checker run on the receipt's source commit itself, so the reader derives -`PWG-1` (§8.2; §The recheck legs below). No witness in another foundation exists, so +Those are the Agda facts: the propositions type-check under the §2.1 +invocation, in CI, at a named commit, with the prover version pinned and the +import cone recorded. Every theory row also has Rocq and Lean legs, re-proved and +reconciled (§The recheck legs below), and the same run checked them at the same +commit. Each counted witness (Agda, Rocq and Lean) therefore has a current receipt +from a pinned CI checker run on the receipt's source commit itself, so the reader +derives `PWG-1` for all five rows (§8.2). No witness in another foundation exists, so `foundation_diverse` is false throughout. -=== Why four rows are at PWG-3 +=== How the four rows reached PWG-1 -`PWG-2i` and above require Rocq or Lean legs, with the outcome recorded as -`transported`, `re-proved` or `unavailable` (PROOF-POLICY §2), and a current -receipt for each counted leg. All four rows now have both legs, re-proved and -reconciled (§The recheck legs below). What they lack is the receipt: the first -green `main` run of the recheck job after the legs landed. When that run is -recorded in the receipt's run ledger and claim list, the reader derives their -grade: `PWG-1` if every counted witness is checked at the receipt's source -commit, as for T-1 (§8.2). A recheck would not change what these modules prove: -§2.2 is explicit that compiling in a second prover does not establish the same -proposition unless the correspondence is checked too, which is why each leg -carries its statement comparison. +Until hyperpolymath/januskey#180, G-1, T-2, T-3 and E-1m had no Rocq or Lean leg +and were `PWG-3`. #180 re-proved all four by hand in both provers and reconciled +each statement (§The recheck legs below). The first green run of the recheck job +on `main` after it, run 43945986467 at `e8deeaf`, is their first receipt; the +receipt's run ledger and claim list record it, and the reader derives `PWG-1`. +A recheck alone would not change what these modules prove: §2.2 is explicit that +compiling in a second prover does not establish the same proposition unless the +correspondence is checked too, which is why each leg carries its statement +comparison. == The §2.1 invocation: adopted, and measured (2026-11-01) @@ -354,10 +351,9 @@ repeated the counts, and the two copies drifted apart. ==== Leg records (PROOF-POLICY §8.5) Every theory row now has both recheck legs, re-proved by hand, so one record -serves all five; only the receipts differ. T-1: `pwg: 1`, derived by the reader -from run 43213340167 at `b503488`, which checked all three of its witnesses. -G-1, T-2, T-3 and E-1m: `pwg: 3`. Their legs have no CI receipt yet, so the -receipt's claim list does not include them, and the reader counts none. +serves all five, and so does one run: `pwg: 1` for every row, derived by the +reader from run 43945986467 at `e8deeaf`, which checked all three witnesses of +each. `foundation_diverse: false` throughout. [cols="1,1,1,1,3",options="header"] @@ -374,10 +370,10 @@ receipt's claim list does not include them, and the reader counts none. | `re-proved` | `PROVEN` | `RECONCILED` -| T-1: run 43213340167, job "Rocq and Lean recheck legs", at `b503488`, in the - receipt. The other four: none yet. Their first receipt is that job's first - green run on `main` after the legs landed, which then joins the receipt's run - ledger +| All five rows: run 43945986467, job "Rocq and Lean recheck legs", at + `e8deeaf`, current in the receipt. T-1's earlier receipts (run 43213340167 at + `b503488`, run 42646851111 at `0834ce7`) checked `Rollback` only and are + `superseded` | Lean | `re-proved` diff --git a/scripts/proof-receipt.sh b/scripts/proof-receipt.sh old mode 100644 new mode 100755 index 2e0fdb6..cf4825d --- a/scripts/proof-receipt.sh +++ b/scripts/proof-receipt.sh @@ -34,7 +34,7 @@ out=verification/receipts/januskey_praxis.deed repo="hyperpolymath/januskey" # The commit the receipt describes: the main commit at which the current runs # below were earned. On the default branch, so no echo is needed (§8.5.2). -source_commit=b5034884dbe945139d03b38fe80cfdf1106a77e1 +source_commit=e8deeaf7bc7b70500d57c282828512c8f8ba81f9 sibling_repo="hyperpolymath/resource-algebra" sibling_dir=_build/dependencies/resource-algebra @@ -60,11 +60,11 @@ die() { printf 'ERROR: %s\n' "$*" >&2; exit 1; } # bridge, so it is engineering under §1 and has no claim here. claims() { cat <<'ROWS' -G-1|agda +G-1|agda rocq lean T-1|agda rocq lean -T-2|agda -T-3|agda -E-1m|agda +T-2|agda rocq lean +T-3|agda rocq lean +E-1m|agda rocq lean ROWS } @@ -85,15 +85,18 @@ LEAN_CHECKER='Lean (version 4.35.0, x86_64-unknown-linux-gnu, commit eb6cafb7290 runs() { local u=https://github.com/hyperpolymath/januskey/actions/runs cat < Date: Mon, 16 Nov 2026 20:14:24 +0000 Subject: [PATCH 3/6] chore(a2ml): delete STATE grade facts the proof receipt holds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Claude-Session: https://claude.ai/code/session_01GVPPsHYqVJSoPzdNYD9tRg --- .machine_readable/6a2/STATE.a2ml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.machine_readable/6a2/STATE.a2ml b/.machine_readable/6a2/STATE.a2ml index 190b064..18ce2fe 100644 --- a/.machine_readable/6a2/STATE.a2ml +++ b/.machine_readable/6a2/STATE.a2ml @@ -50,13 +50,10 @@ total = "144 tests + 5 benchmark groups + 12 PROVEN ledger rows — as declared # Proof Witness Grades, standards 3-practice/PROOF-POLICY.adoc §8 (the # Mathesis brief's §5/§6 ladder, adopted with corrections). Never a # percentage. Receipts, lineage and per-row records: docs/theory/PROOF-GRADES.adoc. -grade-3 = "derived from verification/receipts/januskey_praxis.deed by the pinned standards reader: PWG-1 for T-1 (Agda, Rocq and Lean receipts at b503488); PWG-3 for G-1, T-2, T-3, E-1m, whose Rocq and Lean legs are re-proved and reconciled but have no receipt yet — census 4 + 1 of 5 theory theorems (G-3 and T-10 are engineering under PROOF-POLICY §1; T-2 and T-3 are stated over the abstract SingleActiveLog)" -receipt-commit = "verification/receipts/januskey_praxis.deed: source commit b503488, run 43213340167; earlier runs superseded (see docs/theory/PROOF-GRADES.adoc)" receipt-prover = "Agda 2.6.4.3 (agda-bin=2.6.4.3-1+b2); no standard library; resource-algebra pinned at cf9235c" receipt-flags = "--safe --without-K --cubical-compatible --no-libraries --ignore-interfaces --double-check (PROOF-POLICY §2.1 canonical, plus two stricter flags)" not-graded = "the 7 Idris2 PROVEN rows (ABI/interface contracts, PROOF-POLICY §8.1); all 33 TESTED rows (observed behaviour); ASSUMED/DESIGNED/OPEN rows" -open-obligations = "record the first green main run of the recheck legs of G-1, T-2, T-3 and E-1m in the receipt; no Creusot or Verus proof on the Rust, so no Rust behaviour is proved" -claimed-higher = "PWG-1 for T-1 only, as derived from the receipt; no PWG-2i or PWG-2ii, and no foundation-diverse witness" +open-obligations = "no Creusot or Verus proof on the Rust, so no Rust behaviour is proved" [test-categories-complete] unit = true From 35d1e670773217232701a13cd165be54628149c3 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 21:34:03 +0000 Subject: [PATCH 4/6] Revert "chore(a2ml): delete STATE grade facts the proof receipt holds" This reverts commit d1ca4670cb030a9d42d3ac4c4f801d3b79b1ca38. --- .machine_readable/6a2/STATE.a2ml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.machine_readable/6a2/STATE.a2ml b/.machine_readable/6a2/STATE.a2ml index 18ce2fe..190b064 100644 --- a/.machine_readable/6a2/STATE.a2ml +++ b/.machine_readable/6a2/STATE.a2ml @@ -50,10 +50,13 @@ total = "144 tests + 5 benchmark groups + 12 PROVEN ledger rows — as declared # Proof Witness Grades, standards 3-practice/PROOF-POLICY.adoc §8 (the # Mathesis brief's §5/§6 ladder, adopted with corrections). Never a # percentage. Receipts, lineage and per-row records: docs/theory/PROOF-GRADES.adoc. +grade-3 = "derived from verification/receipts/januskey_praxis.deed by the pinned standards reader: PWG-1 for T-1 (Agda, Rocq and Lean receipts at b503488); PWG-3 for G-1, T-2, T-3, E-1m, whose Rocq and Lean legs are re-proved and reconciled but have no receipt yet — census 4 + 1 of 5 theory theorems (G-3 and T-10 are engineering under PROOF-POLICY §1; T-2 and T-3 are stated over the abstract SingleActiveLog)" +receipt-commit = "verification/receipts/januskey_praxis.deed: source commit b503488, run 43213340167; earlier runs superseded (see docs/theory/PROOF-GRADES.adoc)" receipt-prover = "Agda 2.6.4.3 (agda-bin=2.6.4.3-1+b2); no standard library; resource-algebra pinned at cf9235c" receipt-flags = "--safe --without-K --cubical-compatible --no-libraries --ignore-interfaces --double-check (PROOF-POLICY §2.1 canonical, plus two stricter flags)" not-graded = "the 7 Idris2 PROVEN rows (ABI/interface contracts, PROOF-POLICY §8.1); all 33 TESTED rows (observed behaviour); ASSUMED/DESIGNED/OPEN rows" -open-obligations = "no Creusot or Verus proof on the Rust, so no Rust behaviour is proved" +open-obligations = "record the first green main run of the recheck legs of G-1, T-2, T-3 and E-1m in the receipt; no Creusot or Verus proof on the Rust, so no Rust behaviour is proved" +claimed-higher = "PWG-1 for T-1 only, as derived from the receipt; no PWG-2i or PWG-2ii, and no foundation-diverse witness" [test-categories-complete] unit = true From 3cbebad6bfde6d1963cb2c32f4cc60d7d5f1c882 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 21:34:03 +0000 Subject: [PATCH 5/6] Revert "proofs: record run 43945986467 at e8deeaf; all five theory rows derive PWG-1" This reverts commit 87a0e493978f9f176c0938e8b10d33f6dbe09a83. --- PROOF-NEEDS.adoc | 35 ++-- READINESS.adoc | 2 +- docs/theory/PROOF-GRADES.adoc | 90 +++++---- scripts/proof-receipt.sh | 25 ++- verification/receipts/januskey_praxis.deed | 220 +++------------------ 5 files changed, 107 insertions(+), 265 deletions(-) mode change 100755 => 100644 scripts/proof-receipt.sh diff --git a/PROOF-NEEDS.adoc b/PROOF-NEEDS.adoc index ef7e51e..d8a17ab 100644 --- a/PROOF-NEEDS.adoc +++ b/PROOF-NEEDS.adoc @@ -62,15 +62,15 @@ tables must agree. | C-3 | A transaction containing an obliteration is not all-reversible | PROVEN | `+Layout.obliterateNotReversible+` | C-4 | Replacing a chain entry by one with a different hash breaks the link | PROVEN | `+Proofs.tamperBreaksLink+` | C-5 | Struct sizes 32/16/112 and 8-byte alignment as divisibility (statements about the literals) | PROVEN | `+Layout.{contentHashSize,keyIdSize,oblitProofSize,hashAligned,keyIdAligned,oblitAligned}+` -| G-1 | Reversibility as a Loss grade: lossless traces have only lossless steps; obliteration absorbs; a wrap/unwrap pair carries its cancellation law (its grade 𝟙 is assigned, not derived from that law) | PROVEN | `+verification/proofs/agda/Reversibility.agda+` (Agda kernel, resource-algebra pinned at `+cf9235c+`); `+tests/reject-agda/*+` refused; rechecked in Rocq and Lean (`+verification/proofs/{rocq,lean}/Reversibility+`, the Loss grade restated, `+PWG-1+`); the cancellation premise is the TESTED row `+execute_then_undo_is_identity+` +| G-1 | Reversibility as a Loss grade: lossless traces have only lossless steps; obliteration absorbs; a wrap/unwrap pair carries its cancellation law (its grade 𝟙 is assigned, not derived from that law) | PROVEN | `+verification/proofs/agda/Reversibility.agda+` (Agda kernel, resource-algebra pinned at `+cf9235c+`); `+tests/reject-agda/*+` refused; rechecked in Rocq and Lean (`+verification/proofs/{rocq,lean}/Reversibility+`, the Loss grade restated, legs not yet in the receipt); the cancellation premise is the TESTED row `+execute_then_undo_is_identity+` | G-2 | The Idris2 `+IsCNO+`/`+ReversibleOp+` pair corresponds to Agda `+ReversiblePair+` (by transcription) | ASSUMED | no mechanical link claimed | G-3 | The FFI bridge preserves grade 𝟙 (homomorphism) | OPEN | resource-algebra lists homomorphisms OPEN; to file from JNK-01 | E-1 | An attacker cannot recover obliterated content or use a revoked key | OPEN | `+Types.adversaryCannotKnow+` holds only because `+Knows+` has no Adversary constructor; the *model-level* half is now proved in Agda as row E-1m (#145 item 3) -| E-1m | In a world model, an adversary whose observation excludes the store does not know what it holds; obliteration leaves nothing to recover; rotation to a different key leaves no agent able to use the old one (premise `+old ≠ new+`; true by the definition of `+rotate+` in the model; that an unusable key cannot decrypt is X-1) | PROVEN | `+verification/proofs/agda/Epistemic.agda+`; rechecked in Rocq and Lean (`+verification/proofs/{rocq,lean}/Epistemic+`, `+PWG-1+`); `+tests/reject-agda/{AdversaryKnows,OldKeyStillUsable}.agda+` refused +| E-1m | In a world model, an adversary whose observation excludes the store does not know what it holds; obliteration leaves nothing to recover; rotation to a different key leaves no agent able to use the old one (premise `+old ≠ new+`; true by the definition of `+rotate+` in the model; that an unusable key cannot decrypt is X-1) | PROVEN | `+verification/proofs/agda/Epistemic.agda+`; rechecked in Rocq and Lean (`+verification/proofs/{rocq,lean}/Epistemic+`, legs not yet in the receipt); `+tests/reject-agda/{AdversaryKnows,OldKeyStillUsable}.agda+` refused | X-1 | Hash one-wayness; physical erasure (cryptographic and physical assumptions, external to this repository) | ASSUMED | not theorems of this repo | T-1 | Undoing a fully executed transaction's operations in reverse order restores the state it began in, given each step's undo restores its execute (the sequential Theorem 3.4) | PROVEN | `+TransactionAtomicity.rollback-restores+`; rechecked in Rocq and Lean (`+verification/proofs/{rocq,lean}/Rollback+`, `+PWG-1+`); `+tests/reject-agda/ForwardRollback.agda+` refused -| T-2 | In any single-active log (records with a decidable key and an active or settled phase), opening a fresh active record, a key- and phase-preserving edit, and a settling transition each preserve the invariant and rewrite only the active record, so a settled one is never modified | PROVEN | `+SingleActiveLog.{begin-good,modify-good,finish-good,update-active}+`; rechecked in Rocq and Lean (`+verification/proofs/{rocq,lean}/SingleActiveLog+`, `+PWG-1+`); `+tests/reject-agda/SettleWithoutSettling.agda+` refused; januskey's instance is `+TransactionAtomicity.lifecycle-preserves-good+`; `+tests/reject-agda/CommitWhenIdle.agda+` refused -| T-3 | In any single-active log satisfying the invariant, at most one record is active, and exactly one when the pointer is set | PROVEN | `+SingleActiveLog.at-most-one-active+`; rechecked in Rocq and Lean (`+verification/proofs/{rocq,lean}/SingleActiveLog+`, `+PWG-1+`) (januskey's transactions are an instance) +| T-2 | In any single-active log (records with a decidable key and an active or settled phase), opening a fresh active record, a key- and phase-preserving edit, and a settling transition each preserve the invariant and rewrite only the active record, so a settled one is never modified | PROVEN | `+SingleActiveLog.{begin-good,modify-good,finish-good,update-active}+`; rechecked in Rocq and Lean (`+verification/proofs/{rocq,lean}/SingleActiveLog+`, legs not yet in the receipt); `+tests/reject-agda/SettleWithoutSettling.agda+` refused; januskey's instance is `+TransactionAtomicity.lifecycle-preserves-good+`; `+tests/reject-agda/CommitWhenIdle.agda+` refused +| T-3 | In any single-active log satisfying the invariant, at most one record is active, and exactly one when the pointer is set | PROVEN | `+SingleActiveLog.at-most-one-active+`; rechecked in Rocq and Lean (`+verification/proofs/{rocq,lean}/SingleActiveLog+`, legs not yet in the receipt) (januskey's transactions are an instance) | T-4 | A rollback that fails part-way can be retried to completion | TESTED | `+rollback_resume_test+` drives the real `+jk+`: after one undo error and a repair, `+jk rollback+` skips the already undone operation and finishes (before the fix the retry stopped at it every time, reproduced 2026-10-26); fixed in `+cmd_rollback+` | T-5 | The transaction log is never left disagreeing with memory by a failed save, and is replaced by rename rather than overwritten in place, with an fsync before the rename by construction (no test observes the fsync) (a randomly named temporary file opened with the old file's mode, removed only if this save created it) rather than overwritten in place | TESTED | `+transaction::tests::failed_save_*+`: a save that fails at the final step leaves begin, add_operation, commit and rollback unapplied in memory; mutants (memory first, plain `+fs::write+`, no temp cleanup, shared temp name, truncating open, no permission copy) each fail a test. Not claimed: crash-safety of the rename itself is by construction, not crash-injected; the directory fsync is best effort (owner decision 2026-11-09), because failing the save after the rename would leave disk new and memory old; concurrent writers are out of scope (each save's content is intact, the last rename wins) | T-6 | A failed execute leaves the filesystem unchanged, and each undo restores the state its execute started from (premises of T-1; single steps are TESTED by `+execute_then_undo_is_identity+`) | ASSUMED | not checked for the failure path @@ -133,26 +133,27 @@ link:verification/receipts/januskey_praxis.deed[`+verification/receipts/januskey (§8.5.1, profile `+proof-receipt+`), written by `+scripts/proof-receipt.sh+` and checked by `+just test-receipt+` and CI with the standards reader pinned by commit, which derives each grade and refuses one the receipts do not support. -It describes commit `+e8deeaf+` on `+main+`, where green `+agda-proofs.yml+` run -https://github.com/hyperpolymath/januskey/actions/runs/43945986467[43945986467] +It describes commit `+b503488+` on `+main+`, where green `+agda-proofs.yml+` run +https://github.com/hyperpolymath/januskey/actions/runs/43213340167[43213340167] checked `+Reversibility+`, `+TransactionAtomicity+`, `+Epistemic+` and `+SingleActiveLog+` under `+--safe --without-K --cubical-compatible+` (Agda 2.6.4.3, `+resource-algebra+` pinned at `+cf9235c+`, import cone 7 first-party -modules and 8 supplied with the prover, 0 postulates) and the Rocq and Lean legs of all five rows (22 axiom reports in -each prover, every one clean). Each of the five is `+PROVEN+` under the §2.1 invocation with -correspondence state `+AGDA-VERIFIED+`. The superseded receipts (runs 43213340167 at `+b503488+`, 42736066407 +modules and 8 supplied with the prover, 0 postulates) and T-1's Rocq and Lean +legs. Each of the five is `+PROVEN+` under the §2.1 invocation with +correspondence state `+AGDA-VERIFIED+`. The superseded receipts (runs 42736066407 at `+e165438+`, 42076969251 at `+23bc8c3+`, 41687715055 at `+fc188c4+` and 40867211509 at `+4afb710+`), the cone and the axioms (none in the development; the prover's four universe-level primitives are checked by name and binding and listed as its trusted base) are recorded in the receipt and in link:docs/theory/PROOF-GRADES.adoc[`+docs/theory/PROOF-GRADES.adoc+`]. -*PWG census, theory theorems of this repository (denominator 5):* `+PWG-1+` 5 -(G-1, T-1, T-2, T-3, E-1m) · `+PWG-2ii+` 0 · `+PWG-2i+` 0 · `+PWG-3+` 0 · +*PWG census, theory theorems of this repository (denominator 5):* `+PWG-3+` 4 +(G-1, T-2, T-3, E-1m) · `+PWG-2i+` 0 · `+PWG-2ii+` 0 · `+PWG-1+` 1 (T-1) · `+ungraded+` 0. G-3 names this repository's FFI bridge, so PROOF-POLICY §1 classes it as engineering and it is outside the ladder. Every row now has a Rocq leg and a Lean leg, re-proved by hand and reconciled statement by statement (`+docs/theory/PROOF-GRADES.adoc+`, §The recheck -legs), and all three witnesses of every row are in the receipt. A grade +legs). The legs of G-1, T-2, T-3 and E-1m enter the receipt's claim list once a +CI run on `+main+` has checked them; the reader then derives their grade. A grade is not a discharge (§8.4): the premises each row names stay where they are. The other seven PROVEN rows — A-1, A-2, C-1 to C-5 — are Idris2 theorems. Under @@ -164,11 +165,11 @@ contracts, and **Verus** (PROOF-POLICY §1.2, owner ruling 2026-11-07; not SPARK and not Idris2); neither verifier has a contract or proof in this tree yet, which is why no Rust row is proved. -All five theory rows are `+PWG-1+`: their Rocq and Lean legs are re-proved and -reconciled, and all three witnesses of each have current receipts from pinned CI -checkers run on the receipt's source commit (§8.2). No row is `+PWG-2i+`, -`+PWG-2ii+` or `+PWG-3+`. A later change to a leg's inputs makes the receipt stale (the CI job -warns), and the grade then holds for `+e8deeaf+` until a run of the new commit is +Only T-1 is above `+PWG-3+`: it is `+PWG-1+`. Its Rocq and Lean legs are re-proved +and reconciled, and all three witnesses have current receipts from pinned CI +checkers run on the receipt's source commit (§8.2). No row is `+PWG-2i+` or +`+PWG-2ii+`. A later change to a leg's inputs makes the receipt stale (the CI job +warns), and the grade then holds for `+b503488+` until a run of the new commit is recorded (§8.4, "regression drops the grade"). The row-by-row mapping is in `+docs/theory/PROOF-GRADES.adoc+`. Since 2026-11-01 the gate runs PROOF-POLICY §2.1's canonical invocation diff --git a/READINESS.adoc b/READINESS.adoc index 1bb6e42..f3a9ff9 100644 --- a/READINESS.adoc +++ b/READINESS.adoc @@ -65,7 +65,7 @@ handling (run by idris-abi.yml, agda-proofs.yml and dashboard-check) |=== -*Total declared:* 144 tests + 5 benchmark groups; 12 proofs checked (PROVEN ledger rows; five are theory theorems under PROOF-POLICY §8, all five at PWG-1, derived from `verification/receipts/januskey_praxis.deed` — see `docs/theory/PROOF-GRADES.adoc`) *Total +*Total declared:* 144 tests + 5 benchmark groups; 12 proofs checked (PROVEN ledger rows; five are theory theorems under PROOF-POLICY §8, graded from the receipt: T-1 at PWG-1 and four at PWG-3, whose Rocq and Lean legs check but have no CI receipt yet — see `docs/theory/PROOF-GRADES.adoc`) *Total missing:* Fuzz, mutation, chaos, compatibility === Aspect Matrix diff --git a/docs/theory/PROOF-GRADES.adoc b/docs/theory/PROOF-GRADES.adoc index 9c1d021..0675b5e 100644 --- a/docs/theory/PROOF-GRADES.adoc +++ b/docs/theory/PROOF-GRADES.adoc @@ -13,12 +13,12 @@ repository, and none is introduced here. [NOTE] ==== *PWG census, theory theorems of this repository (denominator 5):* -`PWG-1` 5 (G-1, T-1, T-2, T-3, E-1m) · `PWG-2ii` 0 · `PWG-2i` 0 · `PWG-3` 0 · +`PWG-3` 4 (G-1, T-2, T-3, E-1m) · `PWG-2i` 0 · `PWG-2ii` 0 · `PWG-1` 1 (T-1) · `ungraded` 0. `+foundation-diverse`: none. Axioms: none. Derived by the pinned standards reader from `verification/receipts/januskey_praxis.deed` (§The -machine-readable receipt below), not typed: every theory row has an Agda, a Rocq -and a Lean witness, each with a current receipt from a pinned CI checker run on -the receipt's source commit (§The recheck legs below). +machine-readable receipt below), not typed. G-1, T-2, T-3 and E-1m now also have +Rocq and Lean legs (§The recheck legs below). They join the receipt once a CI +run on `main` has checked them, and the reader then derives their grade. The denominator is the ledger rows whose source of truth is an Agda theorem. PROOF-POLICY §1 puts a statement that names one repository's type, function or @@ -130,10 +130,16 @@ run the §8.5.3 git checks (each manifest holds at its commit, the and warn when a leg's inputs have changed since the receipt's source commit. This page is the human reading of that file. -The receipt describes commit `e8deeaf7bc7b70500d57c282828512c8f8ba81f9` on `main`, -the merge of hyperpolymath/januskey#180, which added the Rocq and Lean legs of -G-1, T-2, T-3 and E-1m and made `scripts/check-recheck.sh` count every axiom -report. Before it, the gate changed in hyperpolymath/januskey#170 (the import-cone +The change that added the Rocq and Lean legs of G-1, T-2, T-3 and E-1m added +files to `verification/proofs/rocq` and `verification/proofs/lean`, which are +T-1's recheck inputs, and changed their checker, `scripts/check-recheck.sh`. The +receipt still describes `b503488` and stays true of it, so T-1 is `PWG-1` there; +the CI job warns that HEAD has moved on. The follow-up that records the first +green `main` run after that change adds it to the run ledger, adds the four +rows' legs to the claim list, and the reader derives all five grades afresh. + +The receipt describes commit `b5034884dbe945139d03b38fe80cfdf1106a77e1` on `main`. +The gate changed twice before it, in hyperpolymath/januskey#170 (the import-cone postulate scan) and #174 (a token may start after a skipped literal), and #171 changed the modules' bytes and added `SingleActiveLog.agda`. A changed checker or changed inputs re-earn the receipt (§8.4), so every receipt from before those @@ -144,13 +150,11 @@ changes is `superseded`, and the current one is a run on `main` after all three. | Field | Value | Workflow, run | `agda-proofs.yml`, run - https://github.com/hyperpolymath/januskey/actions/runs/43945986467[43945986467], + https://github.com/hyperpolymath/januskey/actions/runs/43213340167[43213340167], branch `main`, conclusion **success**: job "Reversibility as a grade (Loss instance), expected rejections" (Agda) and job "Rocq and Lean recheck legs, - expected rejections" (all five rows' legs: 4 Rocq and 4 Lean files, 22 axiom - reports in each prover, every one clean; 8 refusals as named; §The recheck - legs below) -| Commit | `e8deeaf7bc7b70500d57c282828512c8f8ba81f9` (started 2026-11-16T20:04:43Z) + expected rejections" (T-1's legs, §The recheck legs below) +| Commit | `b5034884dbe945139d03b38fe80cfdf1106a77e1` (started 2026-11-12T11:55:42Z) | Prover | `agda-bin=2.6.4.3-1+b2` on Debian trixie-slim (`@sha256:a29215f6…`), asserted by a passing step: `test "$(agda --version)" = 'Agda version 2.6.4.3'` @@ -193,14 +197,10 @@ Earlier receipts, kept with their lineage (§8.4) here and in the receipt file: |=== | Run, commit | State | Why -| https://github.com/hyperpolymath/januskey/actions/runs/43213340167[43213340167], `b503488` -| `superseded` -| T-1's legs only (`Rollback.v`, `Rollback.lean`), before #180; the Agda inputs are - unchanged at `e8deeaf`, and run 43945986467 there replaces it | https://github.com/hyperpolymath/januskey/actions/runs/42736066407[42736066407], `e165438` | `superseded` -| The first green run on `main` of the gate as #174 left it; replaced by run - 43213340167 at a later commit +| The first green run on `main` of the gate as #174 left it; replaced by the run + at the receipt's source commit | https://github.com/hyperpolymath/januskey/actions/runs/42076969251[42076969251], `23bc8c3` | `superseded` | Before the cone scan (#170) and before `SingleActiveLog.agda` (#171) @@ -212,26 +212,29 @@ Earlier receipts, kept with their lineage (§8.4) here and in the receipt file: | Before `--cubical-compatible` and before `Epistemic.agda`; it never covered E-1m |=== -Those are the Agda facts: the propositions type-check under the §2.1 -invocation, in CI, at a named commit, with the prover version pinned and the -import cone recorded. Every theory row also has Rocq and Lean legs, re-proved and -reconciled (§The recheck legs below), and the same run checked them at the same -commit. Each counted witness (Agda, Rocq and Lean) therefore has a current receipt -from a pinned CI checker run on the receipt's source commit itself, so the reader -derives `PWG-1` for all five rows (§8.2). No witness in another foundation exists, so +Those are the `PWG-3` facts: the propositions type-check in Agda under the +§2.1 invocation, in CI, at a named commit, with the prover version pinned and +the import cone recorded. For G-1, T-2, T-3 and E-1m the Rocq and Lean legs +exist (§The recheck legs below), but no CI run on `main` has checked them yet, so +no receipt counts them and their grade is `PWG-3`. T-1 has both legs, and each +counted witness (Agda, Rocq and Lean) has a current receipt from a pinned CI +checker run on the receipt's source commit itself, so the reader derives +`PWG-1` (§8.2; §The recheck legs below). No witness in another foundation exists, so `foundation_diverse` is false throughout. -=== How the four rows reached PWG-1 +=== Why four rows are at PWG-3 -Until hyperpolymath/januskey#180, G-1, T-2, T-3 and E-1m had no Rocq or Lean leg -and were `PWG-3`. #180 re-proved all four by hand in both provers and reconciled -each statement (§The recheck legs below). The first green run of the recheck job -on `main` after it, run 43945986467 at `e8deeaf`, is their first receipt; the -receipt's run ledger and claim list record it, and the reader derives `PWG-1`. -A recheck alone would not change what these modules prove: §2.2 is explicit that -compiling in a second prover does not establish the same proposition unless the -correspondence is checked too, which is why each leg carries its statement -comparison. +`PWG-2i` and above require Rocq or Lean legs, with the outcome recorded as +`transported`, `re-proved` or `unavailable` (PROOF-POLICY §2), and a current +receipt for each counted leg. All four rows now have both legs, re-proved and +reconciled (§The recheck legs below). What they lack is the receipt: the first +green `main` run of the recheck job after the legs landed. When that run is +recorded in the receipt's run ledger and claim list, the reader derives their +grade: `PWG-1` if every counted witness is checked at the receipt's source +commit, as for T-1 (§8.2). A recheck would not change what these modules prove: +§2.2 is explicit that compiling in a second prover does not establish the same +proposition unless the correspondence is checked too, which is why each leg +carries its statement comparison. == The §2.1 invocation: adopted, and measured (2026-11-01) @@ -351,9 +354,10 @@ repeated the counts, and the two copies drifted apart. ==== Leg records (PROOF-POLICY §8.5) Every theory row now has both recheck legs, re-proved by hand, so one record -serves all five, and so does one run: `pwg: 1` for every row, derived by the -reader from run 43945986467 at `e8deeaf`, which checked all three witnesses of -each. +serves all five; only the receipts differ. T-1: `pwg: 1`, derived by the reader +from run 43213340167 at `b503488`, which checked all three of its witnesses. +G-1, T-2, T-3 and E-1m: `pwg: 3`. Their legs have no CI receipt yet, so the +receipt's claim list does not include them, and the reader counts none. `foundation_diverse: false` throughout. [cols="1,1,1,1,3",options="header"] @@ -370,10 +374,10 @@ each. | `re-proved` | `PROVEN` | `RECONCILED` -| All five rows: run 43945986467, job "Rocq and Lean recheck legs", at - `e8deeaf`, current in the receipt. T-1's earlier receipts (run 43213340167 at - `b503488`, run 42646851111 at `0834ce7`) checked `Rollback` only and are - `superseded` +| T-1: run 43213340167, job "Rocq and Lean recheck legs", at `b503488`, in the + receipt. The other four: none yet. Their first receipt is that job's first + green run on `main` after the legs landed, which then joins the receipt's run + ledger | Lean | `re-proved` diff --git a/scripts/proof-receipt.sh b/scripts/proof-receipt.sh old mode 100755 new mode 100644 index cf4825d..2e0fdb6 --- a/scripts/proof-receipt.sh +++ b/scripts/proof-receipt.sh @@ -34,7 +34,7 @@ out=verification/receipts/januskey_praxis.deed repo="hyperpolymath/januskey" # The commit the receipt describes: the main commit at which the current runs # below were earned. On the default branch, so no echo is needed (§8.5.2). -source_commit=e8deeaf7bc7b70500d57c282828512c8f8ba81f9 +source_commit=b5034884dbe945139d03b38fe80cfdf1106a77e1 sibling_repo="hyperpolymath/resource-algebra" sibling_dir=_build/dependencies/resource-algebra @@ -60,11 +60,11 @@ die() { printf 'ERROR: %s\n' "$*" >&2; exit 1; } # bridge, so it is engineering under §1 and has no claim here. claims() { cat <<'ROWS' -G-1|agda rocq lean +G-1|agda T-1|agda rocq lean -T-2|agda rocq lean -T-3|agda rocq lean -E-1m|agda rocq lean +T-2|agda +T-3|agda +E-1m|agda ROWS } @@ -85,18 +85,15 @@ LEAN_CHECKER='Lean (version 4.35.0, x86_64-unknown-linux-gnu, commit eb6cafb7290 runs() { local u=https://github.com/hyperpolymath/januskey/actions/runs cat < Date: Mon, 16 Nov 2026 21:33:38 +0000 Subject: [PATCH 6/6] ci(proofs): run the Rocq and Lean recheck legs in a digest-pinned image MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Claude-Session: https://claude.ai/code/session_01GVPPsHYqVJSoPzdNYD9tRg --- .github/workflows/agda-proofs.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/agda-proofs.yml b/.github/workflows/agda-proofs.yml index 43af4d8..977b2ad 100644 --- a/.github/workflows/agda-proofs.yml +++ b/.github/workflows/agda-proofs.yml @@ -34,24 +34,30 @@ jobs: recheck: # PROOF-POLICY §2 recheck legs: the Rocq and Lean re-proofs of the Agda # theorems, with their expected-rejection fixtures. Local run: just test-recheck. + # The checkers run in a digest-pinned image, as the Agda job does, so the + # checker of every witness is pinned and isolated (§8.2, owner ruling + # 2026-11-16: a fresh runner with version pins alone is not enough for PWG-1). name: Rocq and Lean recheck legs, expected rejections runs-on: ubuntu-24.04 timeout-minutes: 15 + # ubuntu:24.04, resolved 2026-11-16; re-pin deliberately, like the provers below. + container: ubuntu:24.04@sha256:73b999393d07f2bf65a40373778a44dc9a6d54ad7718d29247d8ff9413c4d6a8 env: LEAN_VERSION: 4.35.0 LEAN_SHA256: 7289597a44543246c9227b8cae501767e095ce17f6d448b95fc4a8dc97268f6d + DEBIAN_FRONTEND: noninteractive steps: - name: Install the pinned provers run: | - sudo apt-get update - sudo apt-get install --no-install-recommends -y coq=8.18.0+dfsg-1build2 zstd + apt-get update + apt-get install --no-install-recommends -y ca-certificates curl git zstd coq=8.18.0+dfsg-1build2 curl --proto '=https' --tlsv1.2 -sSfL -o lean.tar.zst \ "https://github.com/leanprover/lean4/releases/download/v${LEAN_VERSION}/lean-${LEAN_VERSION}-linux.tar.zst" echo "${LEAN_SHA256} lean.tar.zst" | sha256sum -c - - mkdir -p "$RUNNER_TEMP/lean" - tar --zstd -xf lean.tar.zst -C "$RUNNER_TEMP/lean" + mkdir -p /opt/lean + tar --zstd -xf lean.tar.zst -C /opt/lean rm lean.tar.zst - echo "$RUNNER_TEMP/lean/lean-${LEAN_VERSION}-linux/bin" >> "$GITHUB_PATH" + echo "/opt/lean/lean-${LEAN_VERSION}-linux/bin" >> "$GITHUB_PATH" - name: Checkout uses: actions/checkout@v7.0.1 with: