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
40 changes: 22 additions & 18 deletions PROOF-NEEDS.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -133,27 +133,30 @@ 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 `+246b03d+` on `+main+`, where green CI run
https://github.com/hyperpolymath/januskey/actions/runs/44131609502[44131609502]
(the `+agda-proofs.yml+` jobs, each in a digest-pinned container: Agda in
`+debian:trixie-slim@sha256:a29215f6…+`, Rocq and Lean in
`+ubuntu:24.04@sha256:73b99939…+`, each 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 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 43945986467 at `+e8deeaf+`, whose Rocq and Lean
legs ran on a bare runner and so were not isolated under §8.2, 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
Expand All @@ -165,11 +168,12 @@ 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,
headless and isolated CI checkers (each in a digest-pinned container, recorded as
`+:image+`) 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 `+246b03d+` 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
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:* 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
Expand Down
Loading
Loading