You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Revert 58 .expect("TODO: handle error") sites in ffi/rust/src/ (batch 8/N)
Final batch. Sweeps the now-canonical Rust FFI tree (the duplicate
impl/rust-ffi/ was deleted in commit f43cfb5).
All 58 sites are inside `#[cfg(test)] mod tests` blocks across 7 files:
audit.rs (11), lib.rs (14), operations.rs (17), preconditions.rs (5),
rmo.rs (6), sandbox.rs (3), verification.rs (2).
Per-site policy: mass replace_all to .unwrap() — entirely test
scaffolding (tempdir setup, FfiContext::new, file write/read/delete
operation chains in test_*_operation tests, secure_delete tests, path
resolution tests, verification suite tests). All preceding
input-controlled or assert!()-proven Some/Ok cases.
Verified locally:
cargo build -> EXIT 0 (warnings unchanged)
cargo test -> 24 passed / 0 failed / 0 ignored
Cumulative progress across batches 1-8:
* impl/rust-cli/src/ : 404 sites cleared (audit headline figure)
* ffi/rust/src/ : 58 sites cleared (this batch)
* impl/rust-ffi/ : tree deleted, ~50 sites removed by deletion
* Total : ~512 sites cleared / ~530 originally found
(~96.6%); residue is zero in source code.
Estate-wide grep for `.expect("TODO: handle error")` across the repo
now returns hits only in documentation files (CRG-AUDIT-2026-04-18.adoc
+ ROADMAP.adoc) where the string is quoted as a historical reference,
not invoked.
The .expect("TODO: handle error") anti-pattern is now retired from the
valence-shell code surface. Item 1 of the CRG-AUDIT-2026-04-18 closure
list is closed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments