[arch] Preserve EmailHeader in TargetEmail and eliminate synthetic header reconstruction in SafetyAuditor #64

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

Parent

Part of #62

What to build

Deepen TargetEmail to encapsulate the source EmailHeader and eliminate synthetic header reconstruction in SafetyAuditor. Enable SafetyAuditor to evaluate authentic domain headers directly from CleanupPlan during safety audits.

Acceptance criteria

  • Enhance TargetEmail in src/plan.rs to retain full EmailHeader metadata.
  • Remove create_synthetic_header from src/audit.rs.
  • Update SafetyAuditor::audit_plan to inspect real EmailHeader instances from CleanupPlan.
  • Update ClassificationEngine::create_plan to supply complete headers into TargetEmail.
  • Update existing unit and integration tests in est_pipeline_and_audit.rs and verify all tests pass.
  • 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 Deepen TargetEmail to encapsulate the source EmailHeader and eliminate synthetic header reconstruction in SafetyAuditor. Enable SafetyAuditor to evaluate authentic domain headers directly from CleanupPlan during safety audits. ## Acceptance criteria - [ ] Enhance TargetEmail in src/plan.rs to retain full EmailHeader metadata. - [ ] Remove create_synthetic_header from src/audit.rs. - [ ] Update SafetyAuditor::audit_plan to inspect real EmailHeader instances from CleanupPlan. - [ ] Update ClassificationEngine::create_plan to supply complete headers into TargetEmail. - [ ] Update existing unit and integration tests in est_pipeline_and_audit.rs and verify all tests pass. - [ ] Ensure cargo fmt and cargo clippy --all-targets --all-features -- -D warnings pass cleanly. ## Blocked by - None (can start immediately)
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#64
No description provided.