[Debt] Adopt the Core recovery ledger for Mail outbox, SMTP, IMAP, and synchronization effects #19

Closed
opened 2026-08-03 02:11:44 +02:00 by zemion · 1 comment
Owner

Parent: GovOPlaN/govoplan#36.

Objective

Bind outgoing and mailbox effects to durable recovery evidence without exposing credentials.

Acceptance criteria

  • Outbox submission, SMTP acceptance, IMAP append, delete/move, and mailbox synchronization are classified by recovery mode.
  • Provider idempotency/message identity is recorded before side effects where supported.
  • SMTP/IMAP outcome-unknown states are never blindly retried.
  • Lease fencing protects concurrent mailbox synchronization and recovery.
  • Crash, retry, stale-fence, tamper, and optional-module tests cover the adopted paths.
  • Mail and Ops documentation expose safe recovery actions without secret material.
Parent: GovOPlaN/govoplan#36. ## Objective Bind outgoing and mailbox effects to durable recovery evidence without exposing credentials. ## Acceptance criteria - [ ] Outbox submission, SMTP acceptance, IMAP append, delete/move, and mailbox synchronization are classified by recovery mode. - [ ] Provider idempotency/message identity is recorded before side effects where supported. - [ ] SMTP/IMAP outcome-unknown states are never blindly retried. - [ ] Lease fencing protects concurrent mailbox synchronization and recovery. - [ ] Crash, retry, stale-fence, tamper, and optional-module tests cover the adopted paths. - [ ] Mail and Ops documentation expose safe recovery actions without secret material.
zemion added
status
in-progress
and removed
status
ready
labels 2026-08-03 04:29:12 +02:00
Author
Owner

Implemented and pushed.

Commits:

Covered guarantees:

  • the Mail-owned RUNNING record is durable before provider contact;
  • stable attempt IDs prevent blind replay;
  • provider rejection, success, and outcome-unknown are distinct;
  • reconciliation requires provider evidence;
  • evidence is digest/count based and excludes bodies, addresses, and credentials;
  • read-only mailbox/source projections are fenced across runtimes, committed, then independently verified;
  • tampered evidence, missing runtime identity, and concurrent refreshes fail closed.

Verification:

  • Mail: 112 tests plus 22 subtests passed; Ruff passed.
  • Campaign recovery/delivery tests: 32 passed; Ruff passed.
  • Core recovery tests: 15 passed; Ruff passed.
  • Consolidated focused cross-module check passed.

Provider-side mailbox move/delete/flag mutation is explicitly classified as planned because no production mutation path exists yet. Its eventual implementation must adopt the same recovery contract before it can ship.

Implemented and pushed. Commits: - GovOPlaN/govoplan-core@7e59a7f adds evidence-backed resolution of outcome-unknown recovery records. - GovOPlaN/govoplan-mail@5b5077c adopts the ledger for all current SMTP delivery and IMAP APPEND effects, outbox reconciliation, mailbox indexing, and bounce/calendar-reply scans. - GovOPlaN/govoplan-campaign@5df26be supplies stable per-attempt effect identifiers. - GovOPlaN/govoplan-ops@e3e0fda documents owner-module reconciliation. - GovOPlaN/govoplan@abf9564 updates the canonical recovery inventory. Covered guarantees: - the Mail-owned RUNNING record is durable before provider contact; - stable attempt IDs prevent blind replay; - provider rejection, success, and outcome-unknown are distinct; - reconciliation requires provider evidence; - evidence is digest/count based and excludes bodies, addresses, and credentials; - read-only mailbox/source projections are fenced across runtimes, committed, then independently verified; - tampered evidence, missing runtime identity, and concurrent refreshes fail closed. Verification: - Mail: 112 tests plus 22 subtests passed; Ruff passed. - Campaign recovery/delivery tests: 32 passed; Ruff passed. - Core recovery tests: 15 passed; Ruff passed. - Consolidated focused cross-module check passed. Provider-side mailbox move/delete/flag mutation is explicitly classified as planned because no production mutation path exists yet. Its eventual implementation must adopt the same recovery contract before it can ship.
zemion removed the
status
in-progress
codex/ready
labels 2026-08-03 05:01:55 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: GovOPlaN/govoplan-mail#19