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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 39 additions & 39 deletions PROOF-NEEDS.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ next free number in its series.
| 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-3+`); 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-2ii+`); 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-3+`); `+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-2ii+`); `+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-3+`); `+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-3+`); `+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-3+`) (januskey's transactions are an instance)
| 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-2ii+`); `+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-2ii+`); `+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-2ii+`) (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
Expand Down Expand Up @@ -138,26 +138,31 @@ 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 `+246b03d+` on `+main+`, where green CI run
https://github.com/hyperpolymath/januskey/actions/runs/44131609502[44131609502]
(the `+agda-proofs.yml+` Agda job, in `+debian:trixie-slim@sha256:a29215f6…+`, recorded as the receipt's `+:image+`)
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 (the Rocq and Lean receipts of that run are superseded, below). Each of the five is `+PROVEN+` under the §2.1 invocation with
correspondence state `+AGDA-VERIFIED+`. The superseded Agda receipts (runs 43945986467 at `+e8deeaf+`, 43213340167 at `+b503488+`, 42736066407
at `+e165438+`, 42076969251 at `+23bc8c3+`, 41687715055 at `+fc188c4+` and
40867211509 at `+4afb710+`; the last three predate `+SingleActiveLog+` and are
listed for the rows they checked), the superseded Rocq and Lean receipts
(runs 44131609502 at `+246b03d+`, 43945986467 at `+e8deeaf+`, 43213340167 at `+b503488+` and 42646851111 at
`+0834ce7+`), the cone and the axioms (none in the development;
It describes commit `+d71bb76+` on `+main+`, the merge of #186, where green CI
run https://github.com/hyperpolymath/januskey/actions/runs/44931813652[44931813652]
(`+ci.yml+`, which calls `+agda-proofs.yml+`) checked `+Reversibility+`,
`+TransactionAtomicity+`, `+Epistemic+` and `+SingleActiveLog+` under
`+--safe --without-K --cubical-compatible+` (Agda 2.6.4.3 in
`+debian:trixie-slim@sha256:a29215f6…+`, `+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 (Coq 8.18.0 and Lean
4.35.0 under `+lake+`, in `+ubuntu:24.04@sha256:73b99939…+`). Each of the five
is `+PROVEN+` under the §2.1 invocation with correspondence state
`+AGDA-VERIFIED+`. The run ledger is the append-only data file
link:verification/receipts/runs.ledger[`+verification/receipts/runs.ledger+`].
The superseded Agda receipts (runs 44131609502 at `+246b03d+`, 43945986467 at
`+e8deeaf+`, 43213340167 at `+b503488+`, 42736066407 at `+e165438+`,
42076969251 at `+23bc8c3+`, 41687715055 at `+fc188c4+` and 40867211509 at
`+4afb710+`; the last three predate `+SingleActiveLog+` and are listed for the
rows they checked), the superseded Rocq and Lean receipts (runs 44131609502 at
`+246b03d+`, 43945986467 at `+e8deeaf+`, 43213340167 at `+b503488+` and
42646851111 at `+0834ce7+`), 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+` 0
· `+PWG-2ii+` 0 · `+PWG-2i+` 0 · `+PWG-3+` 5 (G-1, T-1, T-2, T-3, E-1m) ·
· `+PWG-2ii+` 5 (G-1, T-1, T-2, T-3, E-1m) · `+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 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). A grade
Expand All @@ -172,25 +177,20 @@ 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 rows are `+PWG-3+`. Their Rocq and Lean legs are re-proved and
reconciled, but only the Agda witness has a current receipt. The Lean
receipt is `+superseded+`: that run used `+lean+` directly, and §8.2 names
`+lean+` under `+lake+` (owner ruling 2026-11-17). The legs now build under
`+lake+`. The Rocq receipt is `+superseded+` too: moving the Lean legs under
`+lake+` changed `+scripts/check-recheck.sh+`, the checker both legs run
through, and a changed checker re-earns the receipt. `+PWG-1+` needs all three
witnesses receipted at one source commit, so once one run on `+main+` that
checks Agda, Rocq and Lean together
is recorded as the new source commit, the reader derives `+PWG-1+` again. §8.2 accepts "a pinned
kernel run in CI" on the same terms as a checker service, and the owner ruled
on 2026-11-16 that pinned means a digest-pinned image: a fresh runner with
version pins is not enough (hyperpolymath/januskey#184). The Agda job has
always run in one, and the recheck job does since #184. The run at `+e8deeaf+`
predates that for Rocq and Lean, which is a further reason its receipts for
those legs are `+superseded+`. Run 44131609502 at `+246b03d+` (recorded on main by #191)
ran all three in digest-pinned images, but before the legs moved under `+lake+`, so its Rocq
and Lean receipts are `+superseded+` too and only its Agda receipt is current (owner ruling by
selector, 2026-11-21: the merged tree stays `+PWG-3+`). How the three provers are
All five rows are `+PWG-2ii+`. Their Rocq and Lean legs are re-proved and
reconciled, and run 44931813652 at `+d71bb76+` gives all three witnesses a
current receipt, with the Lean legs built under `+lake+` (§8.2 names `+lean+`
under `+lake+`, owner ruling 2026-11-17). No row is `+PWG-1+`. §8.2 accepts "a
pinned kernel run in CI" on the same terms as a checker service, and the owner
ruled on 2026-11-16 that pinned means a digest-pinned image: a fresh runner with
version pins is not enough (hyperpolymath/januskey#184). The owner then ruled
(resource-algebra PN-7, 2026-11-18, applied estate-wide on 2026-11-30) that the
image must ship the checker. Here every checker is installed at run time into a
digest-pinned base image, so no receipt names an image, and `+PWG-1+` waits for
prover images. Run 44131609502 at `+246b03d+` (recorded on main by #191) ran
all three legs, but before the Lean legs moved under `+lake+`, so its Rocq and
Lean receipts are `+superseded+` (owner ruling by selector, 2026-11-21: that
tree stays `+PWG-3+`). How the three provers are
installed is a separate matter, §6's, recorded under "Toolchain deviations"
below. A change to a leg's inputs fails the receipt gate until a run of the
new inputs is recorded, or the current run is marked `+superseded+` or
Expand Down
2 changes: 1 addition & 1 deletion READINESS.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ handling
(run by idris-abi.yml, agda-proofs.yml and dashboard-check)
|===

*Total declared:* 153 tests + 5 benchmark groups; 12 proofs checked (PROVEN ledger rows; five are theory theorems under PROOF-POLICY §8, graded from the receipt: all five at PWG-3 (only the Agda witness has a current receipt; the Rocq and Lean receipts, including run 44131609502 at 246b03d, are superseded until a run on main after the checker change is recorded) — see `docs/theory/PROOF-GRADES.adoc`) *Total
*Total declared:* 153 tests + 5 benchmark groups; 12 proofs checked (PROVEN ledger rows; five are theory theorems under PROOF-POLICY §8, graded from the receipt: all five at PWG-2ii (run 44931813652 at d71bb76 gives all three witnesses a current receipt; none is PWG-1, because every checker is installed at run time rather than shipped in a prover image) — see `docs/theory/PROOF-GRADES.adoc`) *Total
missing:* Fuzz, mutation, chaos, compatibility

=== Aspect Matrix
Expand Down
Loading
Loading