[arch] Narrow UnsubscribeHub seam to in-memory domain headers and delegate I/O to MailboxPipeline #65

Open
opened 2026-08-31 00:29:25 +03:00 by jalmari · 0 comments
Owner

Parent

Part of #62

What to build

Narrow the UnsubscribeHub interface so that it processes in-memory slices of EmailHeader directly. Delegate filesystem summary loading and backup archive decompression to MailboxPipeline, eliminating duplicate ZIP inspection and synthetic header creation inside UnsubscribeHub.

Acceptance criteria

  • Refactor UnsubscribeHub::run and UnsubscribeHub::aggregate_headers to accept in-memory &[EmailHeader].
  • Move filesystem summary and backup archive reading into MailboxPipeline::unsubscribe.
  • Remove manual ZIP inspection and dummy header synthesis from src/unsubscribe.rs.
  • Update unsubscribe tests to verify brand aggregation with in-memory header fixtures.
  • Ensure cargo fmt and cargo clippy --all-targets --all-features -- -D warnings pass cleanly.

Blocked by

  • #64 ([arch] Preserve EmailHeader in TargetEmail and eliminate synthetic header reconstruction in SafetyAuditor)
## Parent Part of #62 ## What to build Narrow the UnsubscribeHub interface so that it processes in-memory slices of EmailHeader directly. Delegate filesystem summary loading and backup archive decompression to MailboxPipeline, eliminating duplicate ZIP inspection and synthetic header creation inside UnsubscribeHub. ## Acceptance criteria - [ ] Refactor UnsubscribeHub::run and UnsubscribeHub::aggregate_headers to accept in-memory &[EmailHeader]. - [ ] Move filesystem summary and backup archive reading into MailboxPipeline::unsubscribe. - [ ] Remove manual ZIP inspection and dummy header synthesis from src/unsubscribe.rs. - [ ] Update unsubscribe tests to verify brand aggregation with in-memory header fixtures. - [ ] Ensure cargo fmt and cargo clippy --all-targets --all-features -- -D warnings pass cleanly. ## Blocked by - #64 ([arch] Preserve EmailHeader in TargetEmail and eliminate synthetic header reconstruction in SafetyAuditor)
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#65
No description provided.