[arch] Eliminate shallow ScanCache and consolidate cache lifecycle into ScanResult #63

Closed
opened 2026-08-31 00:29:16 +03:00 by jalmari · 1 comment
Owner

Parent

Part of #62

What to build

Consolidate the scan cache lifecycle into ScanResult and MailboxPipeline. Remove the shallow ScanCache pass-through struct, move cache path derivation into ScanResult, and ensure atomic persistence and incremental scan cache verification without an intermediate wrapper module.

Acceptance criteria

  • Delete src/cache.rs and remove ScanCache references from public interfaces.
  • Add ScanResult::cache_path(user: Option<&str>, base_dir: Option<&Path>) -> PathBuf to ScanResult.
  • Update MailboxPipeline::scan to load and save scan caches directly through ScanResult.
  • Update tests in est_gateway_and_cache.rs and est_pipeline_and_audit.rs to verify cache loading without ScanCache.
  • Ensure cargo fmt and cargo clippy --all-targets --all-features -- -D warnings pass cleanly.

Blocked by

  • None (can start immediately)
## Parent Part of #62 ## What to build Consolidate the scan cache lifecycle into ScanResult and MailboxPipeline. Remove the shallow ScanCache pass-through struct, move cache path derivation into ScanResult, and ensure atomic persistence and incremental scan cache verification without an intermediate wrapper module. ## Acceptance criteria - [ ] Delete src/cache.rs and remove ScanCache references from public interfaces. - [ ] Add ScanResult::cache_path(user: Option<&str>, base_dir: Option<&Path>) -> PathBuf to ScanResult. - [ ] Update MailboxPipeline::scan to load and save scan caches directly through ScanResult. - [ ] Update tests in est_gateway_and_cache.rs and est_pipeline_and_audit.rs to verify cache loading without ScanCache. - [ ] Ensure cargo fmt and cargo clippy --all-targets --all-features -- -D warnings pass cleanly. ## Blocked by - None (can start immediately)
Author
Owner

Completed implementation: eliminated shallow ScanCache, consolidated cache lifecycle into ScanResult, added atomic persistence, updated tests and documentation.

Completed implementation: eliminated shallow ScanCache, consolidated cache lifecycle into ScanResult, added atomic persistence, updated tests and documentation.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Lavisys/mailsweep#63
No description provided.