[gmail-safety-and-standards-hardening] #02: Domain Model Immutability & Dedup Encapsulation #21
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Reference
Lavisys/mailsweep#21
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Feature:
gmail-safety-and-standards-hardening| Source:.scratch/gmail-safety-and-standards-hardening/issues/02-domain-model-immutability-and-dedup-encapsulation.md02: Domain Model Immutability & Dedup Encapsulation
What to build: Refactor
EmailHeaderto restore immutability and provide clean domain methods for message identity and label merging (dedup_key,with_merged_labels), eliminating Feature Envy and Primitive Obsession inMailboxGateway.scan(). Centralize category mailbox prefixes into the rules registry.Blocked by: None (can start immediately)
Status: completed
dedup_keydomain property or method toEmailHeaderreplacing ad-hoc string formatting ingateway.py.with_merged_labels(new_labels)or clean domain method toEmailHeaderinstead of in-place tuple mutation inscan().categories/,luokat/, etc.) fromMailboxGatewayinto the rules/fixtures registry.