Skip to content

Commit b372397

Browse files
hyperpolymathclaude
andcommitted
refactor(proofs/idris2): drop misleading partial markers on RMO.idr secureDelete + gdprDelete (2 of 10 from #89)
Two of the 10 `partial` markers in #89's scope were misleading annotations: `secureDelete` and `gdprDelete` are IO computations, exhaust their case-splits, and never recurse. IO does not introduce partiality in Idris2 — these are legitimately total. Verified locally with #105's Model.idr fixes applied (post-#105 the Idris2 build proceeds past both functions without partial-checker complaint). The remaining 8 partial markers all live in `Composition.idr`: - `applyOp` / `applySequence` — partial because operations have preconditions that aren't represented in the type. Requires a real refactor to either return `Maybe Filesystem` or carry precondition proofs as dependent arguments. - `execute` / `undo` / `redo` — partial because they call `applyOp`; cascade-cleanup as applyOp becomes total. - `sequenceReversible` / `undoRedoIdentity` / `undoRedoComposition` — proof bodies with `?holes`; require closure before totality. Per #89's resolution: gap-per-PR. The Composition.idr refactor is substantive enough for its own track and is gated on #70's build oracle landing (in flight as #106) so each conversion can be machine- verified. Closes 2 of 10 markers in #89; #89 stays open for the remaining 8. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 7a6ea55 commit b372397

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

  • proofs/idris2/src/Filesystem

proofs/idris2/src/Filesystem/RMO.idr

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,10 @@ data ObliterationProof : Path -> Type where
5050
|||
5151
||| This is DELIBERATELY irreversible. Once called, data is permanently destroyed.
5252
||| Returns a proof that data was obliterated.
53+
|||
54+
||| Total: 3 exhaustive cases on SecureDeleteLevel, no recursion. The `IO`
55+
||| wrapper does not introduce partiality — IO computations can be total.
5356
export
54-
partial -- Partial because it performs I/O
5557
secureDelete :
5658
(p : Path) ->
5759
(level : SecureDeleteLevel) ->
@@ -135,8 +137,10 @@ record GDPRDeletionProof where
135137
auditLog : String
136138

137139
||| GDPR-compliant delete operation
140+
|||
141+
||| Total: do-block with case-split on Either, calls only total functions
142+
||| (secureDelete is now total). IO does not introduce partiality.
138143
export
139-
partial
140144
gdprDelete :
141145
(p : Path) ->
142146
(requestTime : Integer) ->

0 commit comments

Comments
 (0)