Skip to content

Commit 7121128

Browse files
docs: refresh state after 2026-06-02 post-merge sweep (#114)
After PRs #105 / #106 / #108 / #109 admin-merged closing #60 / #61 / #70 / #89, several files held stale claims: - PROOF-NEEDS.md: Idris2 listed "23 holes + 8 partial across 4 files" pre-#108/#109 — partial count is now 0 (10 dropped: 2 in RMO from IO-totality reclassification, 8 in Composition from primitive-call refactor). Coq admit detail rewritten: the single_op_reversible OpRmdir admit was Qed-closed by PR #67 (2026-06-01); 3 new admits surfaced from PR #55's design-gap pass tracked as #56/#57/#58. - proofs/idris2/README.md: 21 holes -> 23 holes; "Known oracle status 2026-06-01" -> 2026-06-02, with partial-count reference corrected. - ROADMAP.adoc: last-refreshed bumped + post-merge attribution. - CHANGELOG.adoc: new "Added -- 2026-06-02" section recording the Idris2 cleanup wave + branch sweep + #111 salvage decision. - .machine_readable/6a2/STATE.a2ml: last-updated 2026-04-19 -> 2026-06-02 (6-week drift); admitted 1 -> 3 with per-admit detail (#56/#57/#58); session-history bullets added for 2026-06-01 + 2026-06-02. - 0-AI-MANIFEST.a2ml: last-updated bumped; tests 736 -> 757 (PR #72); proof-holes-remaining split into coq-admits + idris2 totals. Issue #111 filed during the sweep for `.github/copilot/coding-agent.yml` salvaged from the deleted `claude/safedom-res-stale-sweep` branch. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 9895bb4 commit 7121128

6 files changed

Lines changed: 82 additions & 39 deletions

File tree

.machine_readable/6a2/STATE.a2ml

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# SPDX-License-Identifier: MPL-2.0
22
# STATE.a2ml — Project state checkpoint
3-
# Last updated: 2026-04-19 (CRG-AUDIT-2026-04-18 closure pass: items 1+2+3+4+5+7+9+10c + FIFO race fix)
3+
# Last updated: 2026-06-02 (post-merge sweep — PRs #105/#106/#108/#109 closed #60/#61/#70/#89)
44

55
[metadata]
66
project = "valence-shell"
77
version = "0.9.0"
8-
last-updated = "2026-04-19"
8+
last-updated = "2026-06-02"
99
status = "active"
1010

1111
[project-context]
@@ -31,9 +31,25 @@ tasks-completed = [
3131
]
3232

3333
[coq-proof-status]
34-
admitted = 1
34+
admitted = 3
3535
axioms-justified = 1
36-
admitted-detail = "single_op_reversible OpRmdir branch (proofs/coq/filesystem_composition.v:199): mkdir restores with default_perms, but the original directory may have had different permissions, so mkdir(rmdir(fs)) ≠ fs in general. Full reversibility requires the undo stack to preserve original node data. Known limitation of the Filesystem = Path -> option FSNode model. Pre-existing model gap, flagged in CRG-AUDIT-2026-04-18; the in-source comment at line 195-198 acknowledges it. Declaring honestly here corrects the prior `admitted = 0` claim."
36+
admitted-detail = """
37+
3 Admitted markers as of 2026-06-02 post-PR #55 design-gap surfacing:
38+
39+
1. mkdir_two_dirs_reversible (filesystem_composition.v:697) — non-LIFO
40+
sequence reversal; not derivable from two_op_sequence_reversible as
41+
stated. Tracked as #56 (restate as LIFO sequence).
42+
43+
2. overwrite_pass_equalizes_storage (rmo_operations.v:422) — model gap.
44+
Needs Hgeom strengthening or conclusion relaxation. Tracked as #57.
45+
46+
3. obliterate_not_injective (rmo_operations.v:535) — downstream of #57;
47+
reconnects once #57 closes. Tracked as #58.
48+
49+
The prior single_op_reversible OpRmdir admit (declared 2026-04-19) was
50+
Qed-closed by PR #67 (2026-06-01) via OpMkdirWithPerms +
51+
OpCreateFileWithPerms constructor-variant approach — zero new axioms.
52+
"""
3753
axiom-detail = "is_empty_dir_dec: Filesystem = Path -> option FSNode is infinite-domain; universal quantification over all paths is not constructively decidable. Migration: switch to FMaps.t FSNode."
3854
proof-debt-items-closed = [1, 2]
3955
proof-debt-open = [3]
@@ -59,6 +75,8 @@ note = "Promotion to C-grade dogfooding evidence requires real daily-driver use
5975
# 2026-04-04: CRG-C blitz — 59 new tests, benchmarks, E2E, Zig, Elixir
6076
# 2026-04-12: P0 sweep — Coq layer: 1 justified Axiom (was 3 Axiom + structural bugs); Admitted not yet declared
6177
# 2026-04-19: .expect("TODO") anti-pattern sweep CLOSED (~512 sites); admitted=0 → admitted=1 declared; [dogfooding-status] section added; impl/rust-ffi/ deleted as duplicate; 19 per-directory READMEs landed (coverage 23% → all originally-missing addressed); Phase 4C Lean-extraction docs archived; FIFO-path race fixed; ROADMAP populated; ANCHOR + alkahest email drift fixed
78+
# 2026-06-01: Three-phase day — foundation (#59-#73), full sweep (#40 #47 #48 #52-#55), Option-2 (#74-#75) + license-batch SPDX sweep (#95-#102) + governance SHA-pin (#103) + changelog (#104). single_op_reversible Qed-closed (PR #67). Coq build oracle re-enabled (#55). 3 new Admitted markers surfaced → tracked as #56/#57/#58. 757 tests passing.
79+
# 2026-06-02: Post-merge sweep — Idris2 layer cleanup. PR #105 (RMO theorem-shape redesign, closes #60+#61), PR #106 (Idris2 build oracle, closes #70), PR #108 + #109 (10 partial markers cleared, closes #89). PR #107 dropped codeql.yml. Branches cleaned to main-only; safedom orphan branch deleted with #111 salvage decision filed.
6280

6381
[crg]
6482
grade = "C"

0-AI-MANIFEST.a2ml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ project = "valence-shell"
1010
version = "0.9.0"
1111
status = "Advanced research prototype — NOT production-ready"
1212
license = "MPL-2.0"
13-
last-updated = "2026-06-01"
13+
last-updated = "2026-06-02"
1414

1515
# What this project IS — one-line summary; for the full statement read
1616
# .machine_readable/INTENT.contractile (the load-bearing artefact).
@@ -38,13 +38,16 @@ deep-audit-log-dir = "docs/audits/"
3838
latest-deep-audit = "docs/audits/2026-06-01-deep-audit.adoc"
3939

4040
[counts-as-of-last-audit]
41-
# Per docs/audits/2026-06-01-deep-audit.adoc + issue #42.
41+
# Per docs/audits/2026-06-01-deep-audit.adoc + issue #42 + 2026-06-02 sweep.
4242
theorem-candidates = 478
4343
proof-systems = 6
44-
proof-holes-remaining = 3 # 1 real gap + 1 justified axiom + 1 structural axiom
44+
coq-admits-remaining = 3 # #56 + #57 + #58 (3 surfaced post-#55)
45+
coq-axioms-justified = 1 # is_empty_dir_dec
46+
idris2-holes-remaining = 23 # was 21 + 8 partial; now 23 holes + 0 partial post-PRs #105/#108/#109
47+
idris2-partial-markers = 0 # cleared 2026-06-02
4548
rust-source-files = 32
4649
rust-loc = 21331
47-
tests-passing = 736
50+
tests-passing = 757 # +21 via PR #72 (2026-06-01)
4851
tests-ignored = 14
4952
tests-failing = 0
5053
fuzz-targets = 7

CHANGELOG.adoc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1717
- Full POSIX shell compliance (subset)
1818
- RMO (Remove-Match-Obliterate) proofs for GDPR compliance
1919

20+
=== Added — 2026-06-02
21+
22+
==== Proof work
23+
- Idris2: RMO theorem-shape redesigns landed via PR #105 — `secureDeleteNotInjective` (mirrors Coq `obliterate_not_injective`, closes #60) + `gdprDeletionCompliant` structural redesign (closes #61). New `removeEntryDeterminedByFilter` + `keepIfNotP` helpers in `Filesystem.Model`. Drive-by `DecEq Path` fix + `equivRefl` hole unblock the build past Model.
24+
- Idris2: 8 remaining `partial` markers in `Composition.idr` cleared via PR #109 — `applyOp` now calls underlying `addEntry`/`removeEntry`/`updateEntry` primitives directly. Theorem-shape fixes for `All` import, Maybe-monadic undo-redo chain, `LTE` length predicate, and reverseConcat hole. Closes #89.
25+
- Idris2: 2 misleading `partial` markers in `RMO.idr` (secureDelete + gdprDelete IO computations) dropped via PR #108 — IO does not introduce partiality.
26+
- **Total Idris2 `partial` count is now zero**, down from 10 at the start of the session.
27+
28+
==== CI/CD hardening
29+
- Idris2 build oracle merged via PR #106 — `idris-verification.yml` workflow + Justfile recipes (`build-idris2`, `verify-idris2`). Non-blocking initially (pre-existing build issues at `hardwareEraseIrreversible`). Closes #70.
30+
31+
==== Doc + housekeeping
32+
- Stale sweep: 4 `claude/issue-*` branches deleted post-merge (#105/#106/#108/#109 squash-merge cleanup) + 1 orphan `claude/safedom-res-stale-sweep` branch removed (PR #34 merged 2026-05-27; 3 subsequent campaign commits were superseded). Salvaged `.github/copilot/coding-agent.yml` decision filed as #111.
33+
- PROOF-NEEDS.md + `proofs/idris2/README.md` + ROADMAP.adoc refreshed to reflect zero `partial` count + 3-admit Coq state.
34+
2035
=== Added — 2026-06-01
2136

2237
==== Proof work

PROOF-NEEDS.md

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!-- SPDX-License-Identifier: MPL-2.0 -->
33
<!-- Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk> -->
44

5-
> **Reconciled 2026-06-01.** This file used to list 7 open Agda postulates
5+
> **Reconciled 2026-06-02.** This file used to list 7 open Agda postulates
66
> from a pre-2026-04-03 snapshot — all 7 were closed during that session
77
> (see `docs/PROOF_HOLES_AUDIT.md`). The actual current state below.
88
>
@@ -11,7 +11,7 @@
1111
> **[docs/PROOF-OPEN-FRONTIER.adoc](docs/PROOF-OPEN-FRONTIER.adoc)**
1212
> (every valuable but unproven theorem, with tractability classification).
1313
14-
## Current State (2026-06-01)
14+
## Current State (2026-06-02)
1515

1616
- **LOC**: ~11,000 lines of formal proof (Coq 4,500 + Lean 4 2,400 + Agda 2,250 + Isabelle 1,800)
1717
- **Languages**: Rust, ReScript, Agda, Idris2, Lean 4, Coq, Isabelle/HOL, Mizar, Z3, Zig
@@ -23,17 +23,19 @@
2323
| Layer | Item | Location | Nature |
2424
|---|---|---|---|
2525
| Agda | `postulate funext` | `proofs/agda/FilesystemModel.agda:161-162` | Standard intensional-TT axiom; provable under `--cubical` |
26-
| Coq | `admit.` mid-`single_op_reversible`, OpRmdir branch | `proofs/coq/filesystem_composition.v:199` | Model gap — `mkdir` writes `default_perms`, original may have had non-default |
26+
| Coq | `Admitted``mkdir_two_dirs_reversible` (non-LIFO sequence reversal) | `proofs/coq/filesystem_composition.v:697` | Tracked as #56 — needs LIFO-sequence restatement |
27+
| Coq | `Admitted``overwrite_pass_equalizes_storage` (model gap) | `proofs/coq/rmo_operations.v:422` | Tracked as #57 — needs `Hgeom` strengthening or conclusion relaxation |
28+
| Coq | `Admitted``obliterate_not_injective` (downstream of #57) | `proofs/coq/rmo_operations.v:535` | Tracked as #58 — reconnects once #57 closes |
2729
| Coq | `Axiom is_empty_dir_dec` (justified) | `proofs/coq/posix_errors.v` | Infinite-domain universal quantification |
28-
| Idris2 | 23 `?holes` + 8 `partial` annotations across 4 files | `proofs/idris2/src/Filesystem/*.idr` | Type-stated, body un-discharged; `partial` is the Idris2 totality escape hatch |
30+
| Idris2 | 23 `?holes` across 4 files (zero `partial` annotations) | `proofs/idris2/src/Filesystem/*.idr` | Type-stated, body un-discharged; all `partial` markers cleared 2026-06-02 (PRs #108 + #109) |
2931

30-
Idris2 holes + `partial` markers by file:
32+
Idris2 holes by file (counts as of 2026-06-02):
3133
- `proofs/idris2/src/Filesystem/Operations.idr`: 11 holes (mkdir/rmdir, touch/rm, write, op-independence, CNO)
32-
- `proofs/idris2/src/Filesystem/RMO.idr`: 6 holes + 1 `partial` at line 138 (secureDelete, overwrite, GDPR, hardwareErase, audit log)
33-
- `proofs/idris2/src/Filesystem/Composition.idr`: 4 holes + 7 `partial` annotations at lines 84, 94, 109, 185, 192, 200, 208, 217 (sequence + composition + undo/redo; preconditions checked externally pending precondition lemmas)
34-
- `proofs/idris2/src/Filesystem/Model.idr`: 2 holes (equivalence sym + trans)
34+
- `proofs/idris2/src/Filesystem/RMO.idr`: 4 holes (overwrite, audit log; secureDelete + gdprDelete CLOSED via PRs #105+#108)
35+
- `proofs/idris2/src/Filesystem/Composition.idr`: 5 holes (reverseConcat + Operations.idr drive-by holes; the prior 7 `partial` markers were cleared by direct-primitive refactor in PR #109)
36+
- `proofs/idris2/src/Filesystem/Model.idr`: 3 holes (equivSym + equivTrans + equivReflProof; the last added when DecEq Path fix landed via PR #105)
3537

36-
The `partial` annotations above are recognised by `standards/scripts/check-trusted-base.sh` as Idris2 totality escape hatches. They are enumerated here (full paths) so the trusted-base check finds them documented per estate policy (`docs/TRUSTED-BASE-REDUCTION-POLICY.adoc`). Closure path: discharge the corresponding `?hole` with the precondition lemma, then drop the `partial` annotation.
38+
All `partial` markers in `proofs/idris2/src/Filesystem/*.idr` were cleared 2026-06-02 (PRs #108 + #109, closing #89). The total `partial` count is now zero. Closure path for the remaining 23 holes: discharge with the precondition lemma per theorem.
3739

3840
### Foundational Closure (history)
3941

@@ -46,6 +48,10 @@ The `partial` annotations above are recognised by `standards/scripts/check-trust
4648
| 2026-04-03 | ReScript closure | All 24 `Obj.magic` in `impl/mcp/src/Server.res` replaced with `toolResultToJson` |
4749
| 2026-04-12 | Coq well-formedness | `well_formed_ancestor_exists`, `mkdir_preserves_well_formed`, 5/6 decidability axioms proven |
4850
| 2026-06-01 | Narrative reconciliation | `obliterate_overwrites_all_blocks` (which PROOF_HOLES_AUDIT listed as the gap) confirmed closed; actual gap identified as model-perm gap in composition.v |
51+
| 2026-06-01 | `single_op_reversible` OpRmdir branch | Closed Qed via `OpMkdirWithPerms` + `OpCreateFileWithPerms` constructor-variant approach (PR #67); zero new axioms |
52+
| 2026-06-02 | Idris2 RMO theorem-shape redesigns | `secureDeleteNotInjective` (closes #60) + `gdprDeletionCompliant` structural redesign (closes #61) via PR #105 |
53+
| 2026-06-02 | Idris2 partial-marker sweep | All 10 `partial` annotations on `RMO.idr` + `Composition.idr` cleared (PRs #108 + #109, closing #89) |
54+
| 2026-06-02 | Idris2 build oracle | `idris-verification.yml` workflow + Justfile recipes shipped (PR #106, closes #70) |
4955

5056
### What Needs Proving (current, prioritised)
5157

@@ -54,7 +60,7 @@ Highlights:
5460

5561
**Tier S (foundational)**:
5662
1. Lean → Rust mechanised refinement
57-
2. Close the `single_op_reversible` admit (Coq) — Tier A overlap; tractable
63+
2. Close the 3 remaining Coq `Admitted` markers (#56 / #57 / #58 — design-gap follow-ups of the #55 build-oracle closure)
5864
3. Crash-consistency for begin/commit/rollback
5965
4. Concurrency safety (two `vsh` invocations on shared filesystem)
6066

@@ -82,15 +88,16 @@ Highlights:
8288

8389
### Priority
8490

85-
**HIGH**Single Coq admit + 23 Idris2 holes are visible and closeable;
86-
the bigger frontier (Lean→Rust refinement, crash-consistency, concurrency)
87-
is real research-level work.
91+
**HIGH**3 Coq `Admitted` markers (#56/#57/#58) + 23 Idris2 holes are
92+
visible and closeable; the bigger frontier (Lean→Rust refinement,
93+
crash-consistency, concurrency) is real research-level work.
8894

8995
`secureDeleteNotInjective` (closes #60) and `gdprDeletionCompliant`
90-
(closes #61) shipped 2026-06-01 with corrected theorem shapes: the prior
91-
`?secureDeleteIrreversibleProof` / `?gdprDeletionCompliantProof` holes
92-
had non-theorem signatures (refutable by `recovery = id` / `recovery =
93-
const empty` respectively) and have been redesigned. The MAA/GDPR claims
94-
now rest on these closed theorems plus `?overwriteIrreversibleProof`
95-
(still open) and axiomatic NIST SP 800-88 / Shannon-entropy / physical-
96-
world assumptions which should be made explicit (see narrative §10).
96+
(closes #61) shipped 2026-06-02 via PR #105 with corrected theorem
97+
shapes: the prior `?secureDeleteIrreversibleProof` /
98+
`?gdprDeletionCompliantProof` holes had non-theorem signatures
99+
(refutable by `recovery = id` / `recovery = const empty` respectively)
100+
and have been redesigned. The MAA/GDPR claims now rest on these closed
101+
theorems plus `?overwriteIrreversibleProof` (still open) and axiomatic
102+
NIST SP 800-88 / Shannon-entropy / physical-world assumptions which
103+
should be made explicit (see narrative §10).

ROADMAP.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ replacement for bash/zsh.
1616
For the full honest status see `CLAUDE.md`; for caveats per claim see
1717
`EXPLAINME.adoc`; for proof-debt see `docs/PROOF_HOLES_AUDIT.md`.
1818

19-
_Last refreshed: 2026-06-01 (maintenance sweep M2/M3/M4)._
19+
_Last refreshed: 2026-06-02 (post-merge sweep: PRs #105 #106 #108 #109 — closes #60 / #61 / #70 / #89; PR #107 dropped codeql.yml)._
2020

2121
== v0.9.x — Stabilisation (D → C per CRG v2.0)
2222

proofs/idris2/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ This directory contains **executable specifications** of filesystem operations w
2727

2828
| Module | Purpose | Status | Holes |
2929
|--------|---------|--------|-------|
30-
| `Filesystem.Model` | Core types: Path, Filesystem, FSEntry | ✅ Implemented | 2 (equivalence) |
31-
| `Filesystem.Operations` | mkdir, rmdir, touch, rm, writeFile | ✅ Implemented | 8 (reversibility) |
30+
| `Filesystem.Model` | Core types: Path, Filesystem, FSEntry | ✅ Implemented | 3 (equivalence) |
31+
| `Filesystem.Operations` | mkdir, rmdir, touch, rm, writeFile | ✅ Implemented | 11 (reversibility) |
3232
| `Filesystem.Composition` | Operation sequences, undo/redo | ✅ Implemented | 5 (composition) |
33-
| `Filesystem.RMO` | Irreversible operations (GDPR) | ✅ Implemented | 6 (irreversibility) |
33+
| `Filesystem.RMO` | Irreversible operations (GDPR) | ✅ Implemented | 4 (irreversibility) |
3434

35-
**Total**: 4 modules, 21 proof holes to fill
35+
**Total**: 4 modules, 23 proof holes to fill, 0 `partial` annotations (cleared 2026-06-02 via PRs #108 + #109)
3636

3737
### Proof Holes (TODO)
3838

@@ -105,13 +105,13 @@ just build-idris2 # cd proofs/idris2 && idris2 --build valence-shell.ipkg
105105
just verify-idris2 # build + count distinct ?holes for regression tracking
106106
```
107107

108-
#### Known oracle status (2026-06-01)
108+
#### Known oracle status (2026-06-02)
109109

110-
`build-idris2` currently fails on pre-existing issues outside #60/#61's scope:
110+
`build-idris2` currently fails on pre-existing issues outside the #60/#61/#89 scope:
111111

112-
- `Filesystem/Model.idr``equivSym` / `equivTrans` are deliberate `?holes`; trivial closure when needed.
113-
- `Filesystem/RMO.idr``hardwareEraseIrreversible`'s `() -> Filesystem` parameter has a parse issue under Idris2 0.8.0 (tracked as part of #94 alongside the 10 partial markers).
114-
- `Filesystem/Composition.idr`multiple holes pending Coq/Lean port.
112+
- `Filesystem/Model.idr``equivSym` / `equivTrans` / `equivReflProof` are deliberate `?holes`; trivial closure when needed.
113+
- `Filesystem/RMO.idr``hardwareEraseIrreversible`'s `() -> Filesystem` parameter has a parse issue under Idris2 0.8.0 (tracked as part of #94, the remaining practice gaps under #45). The 10 `partial` annotations previously listed in this bullet were cleared 2026-06-02 by PRs #108 + #109 (closing #89).
114+
- `Filesystem/Composition.idr`5 remaining holes pending Coq/Lean port.
115115

116116
The CI job is configured non-blocking until the pre-existing parse/typecheck
117117
issues land. Once green, flip the final `exit 0` in `idris-verification.yml`
@@ -285,7 +285,7 @@ pub extern "C" fn vsh_mkdir_wrapper(path: *const c_char) -> c_int {
285285

286286
### Phase 1: Complete Proofs (Weeks 1-2)
287287

288-
- [ ] Fill all 21 proof holes
288+
- [ ] Fill all 23 proof holes
289289
- [ ] Verify totality of all functions
290290
- [ ] Add property tests
291291

0 commit comments

Comments
 (0)