Repository navigation
Commit ce16ce3
Re-audit the assurance boundary; repair the Agda tree so it actually compiles (#221)
## What this is
A re-audit of Valence Shell's assurance boundary and its claimed
relationship to
JanusKey, plus the first round of *actually executing* the proof legs
that the
repository had been asserting. Four commits, 79 files.
The headline: **the headline docs were already honest; the drift lived
in the
secondary surfaces — and the Agda proof tree had never been compiled at
all.**
## 1. The audit (commit `31866dd`)
`docs/audits/2026-11-01-assurance-boundary-audit.adoc` — 24 findings
(AB-01…AB-24)
plus AP-1…AP-8, with provenance, a corrected-artefacts list, and a
deliberately-not-changed list. Audits append;
`2026-06-01-deep-audit.adoc` is
untouched.
- **JanusKey / `reversible-core`: not imported.** Canonical wording
adopted:
*"JanusKey integration is planned; Valence Shell has no implemented
dependency
on it."* `reversible-core` appears zero times in the tree. Cross-repo
orientation
documents are explicitly *not* mechanised dependencies.
- **RMO restated** as best-effort local overwrite/unlink plus an audit
residue —
not physical erasure, not GDPR compliance. `.vsh-audit.log` residue is
unsigned
and the audit says so.
- **The extraction gap is kept as *the* trust boundary**: Lean/Coq/etc.
model →
Rust/POSIX is still an open obligation (F-1), not a refinement proof.
Prose that
read orientation docs or test suites as a refinement proof was
corrected.
- **JanusKey section is measured, not asserted**, and lists exactly what
would
change the verdict.
### Grading against `mathesis` and `standards`
Percentages (~85% / ~95% confidence) were **removed, not adjusted** —
the estate
forbids the form. They were replaced by the closed vocabulary (`proven`,
`proven-with-postulates`, `argued`, `tested-only`, `open`) in a 17-row
Proof
Ledger (`EXPLAINME.adoc#proof-ledger`), and by mathesis's discrete
ladder
(Open / Claimed / Grade 3 / 2i / 2ii / 1).
Two policy conclusions the audit refuses to soften:
- Six parallel hand-written models are **six statements, not one
translated
witness**, so nothing here reaches Grade 2i/2ii. The Grade-3-adjacent
rows are
Coq/Lean-sourced rather than Agda-sourced — the reverse of the estate's
source-of-truth order.
- PROOF-POLICY §1 maps Rust to Creusot. There are no Creusot contracts
in
`impl/rust-cli/`, so the Rust rows are `argued` / `tested-only`.
## 2. The Agda tree repaired (commit `a903c3f`)
**It did not compile. At all.** Every module failed with a parse error
under the
repository's own `agda <file>` invocation, and `valence-shell.agda-lib`
was itself
unparseable (`.agda-lib` has no comment syntax; it opened with `--`
lines). So the
`proven-with-postulates` rows had never been produced by a compiler.
Defects found and repaired, each commented in place:
- nested `with` under `... | yes refl with …` in six modules — Agda
cannot parse
that layout, and re-indenting only makes it *silently regroup* the
clauses;
- `FilesystemModel.agda:118` declaring a record field `parentExists` in
a module
that already defines `parentExists` (hard error, masked by the parse
error);
same class for `isFile` and `defaultPerms`;
- `lzero` imported from `Level` (moved to `Agda.Primitive` in stdlib
2.x);
- `rmdir-removes-path` proving `⊥` with `λ ()`;
- `reverseSequence` built from foldl `reverse`, so the composition
theorem could
not reduce;
- `FilesystemEquivalence` asserting over `Reversible` where
`singleOpReversible`
needs the `ReversibleDP` default-permissions witness;
- **`FileContentOperations` and `RMOOperations` rewritten** against the
model that
exists — they used constructors and helper names that were never defined
(`file`/`directory` vs `File`/`Directory`, `getNodeType`, `delete-file`,
`path-exists`, `is-file`) and redefined `case_of_` four times in `where`
blocks.
**Verified: 9/9 modules type-check** under Agda 2.6.4.3 + stdlib 2.1.1
*and*
Agda 2.7.0.1 + stdlib 2.2, one postulate, no holes.
**Not claimed as Grade 3.** The estate invocation is not satisfied, and
the two
rejections are recorded verbatim in `proofs/agda/VERIFICATION.adoc`:
```
FilesystemModel.agda:179 Cannot postulate funext with safe flag
FilesystemModel.agda:155 Cannot eliminate reflexive equation p = p of type
List String because K has been disabled
```
The second is not a `funext` problem: any case split on `Dec (p ≡ p)`
needs K. The
Agda rows are therefore `proven-with-postulates`, *reproduced under a
recorded
waiver*, not upgraded.
## 3. The verification round (commit `e34decf`)
The audit's AP-8 said "no prover was installed, so nothing was re-run".
That is
now partly discharged, with results written into the audit, the ledger
and
`PROOF-NEEDS.adoc`:
- **Agda**: installed and run (see above). One module had never been
checked
since 2026-04; the last recorded "verified working" version was wrong
about the
file even parsing.
- **Z3** (z3-solver 5.3.3, exit codes ignored — Z3 exits 0 for both
`sat` and
`unsat`, so every `(check-sat)` was parsed individually):
`unsat` for the named theorems in `copy_move_operations`,
`filesystem_operations`, `permission_operations`, `rmo_operations`;
**`symlink_operations.smt2` contains one bare `sat` and never negates a
goal, so
it proves nothing** — its ledger coverage drops to `open`.
- **Not installable here**: Rust/rustup, Creusot, Why3, Kani, Lean/elan,
Coq/Rocq,
Idris2, Isabelle, Mizar. The sandbox egress allowlist permits only PyPI,
codeload and github.com, so no mainstream toolchain channel is
reachable. Those
rows still rest on the repository's own recorded evidence and now say so
explicitly instead of implying a re-run.
## 4. Dated correction (commit `694ca03`)
`docs/PROOF_HOLES_AUDIT.adoc` claimed holes were "filled" and postulates
"PROVEN"
on 2026-04-03. No compiler had ever seen the files. A dated correction
block says
so and points at what is now true. Historical session records are left
as records.
## Deliberately not changed
`CONTINUATION_SESSION_COMPLETE.adoc`, `SESSION_COMPLETE.adoc`,
`EXTRACTION_SUMMARY.adoc`, `docs/PHASE*`, `docs/SESSION_*`,
`.machine_readable/6a2/ECOSYSTEM.a2ml` — these are dated records, not
current
claims. `docs/audits/2026-06-01-deep-audit.adoc` is untouched (audits
append).
## Reproducing
```sh
# Agda (either toolchain; both give 9/9)
agda --library-file=<stdlib>.agda-lib --library=valence-shell <Module>.agda
agda ... --safe # Cannot postulate funext with safe flag
agda ... --without-K # K has been disabled
# Z3
z3 proofs/z3/rmo_operations.smt2 # parse each (check-sat); rc is not a verdict
# gate this audit must keep passing
bash .github/scripts/check-bridge-forbidden-phrases.sh
```
## Still open (not fixed by this PR)
- F-1, the model→Rust refinement gap, remains the v1.0 blocker.
- `funext` discharge and the `--without-K` refactor — both proof
campaigns, both
needed before any Agda row can be Grade 3.
- Creusot contracts for the CLI; Kani harnesses at the FFI seam.
- §4 exception notes for Isabelle/Mizar/Z3, and a decision on whether to
keep
Mizar and Z3 at all given the failure-swallowing Mizar target.
- No CI enforcement of the PROOF-POLICY vocabulary or the new ledger.
---------
Signed-off-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com>
Co-authored-by: Arena Agent <agent@arena.ai>
Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>1 parent 295c3ca commit ce16ce3
81 files changed
Lines changed: 2389 additions & 1223 deletions
File tree
- .claude
- .machine_readable/bot_directives
- docs
- audits
- governance
- reports/audit
- wiki
- impl
- elixir/lib
- rust-cli
- src
- tests
- zig
- src
- proofs
- agda
- coq
- isabelle
- lean4
- mizar
- z3
- scripts
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
14 | 50 | | |
15 | 51 | | |
16 | 52 | | |
17 | 53 | | |
18 | | - | |
| 54 | + | |
| 55 | + | |
19 | 56 | | |
20 | 57 | | |
21 | 58 | | |
| |||
27 | 64 | | |
28 | 65 | | |
29 | 66 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
34 | 77 | | |
35 | 78 | | |
36 | 79 | | |
| |||
55 | 98 | | |
56 | 99 | | |
57 | 100 | | |
58 | | - | |
| 101 | + | |
59 | 102 | | |
60 | 103 | | |
61 | 104 | | |
| |||
109 | 152 | | |
110 | 153 | | |
111 | 154 | | |
112 | | - | |
| 155 | + | |
113 | 156 | | |
114 | 157 | | |
115 | 158 | | |
| |||
350 | 393 | | |
351 | 394 | | |
352 | 395 | | |
353 | | - | |
| 396 | + | |
354 | 397 | | |
355 | 398 | | |
356 | 399 | | |
| |||
372 | 415 | | |
373 | 416 | | |
374 | 417 | | |
375 | | - | |
376 | | - | |
| 418 | + | |
| 419 | + | |
377 | 420 | | |
378 | 421 | | |
379 | 422 | | |
| |||
0 commit comments