Skip to content

refactor(hutch): remove the inbox surface now served by the inbox deployable (phase D: cleanup)#951

Closed
FagnerMartinsBrack wants to merge 1 commit into
inbox-splitfrom
inbox-split-cleanup
Closed

refactor(hutch): remove the inbox surface now served by the inbox deployable (phase D: cleanup)#951
FagnerMartinsBrack wants to merge 1 commit into
inbox-splitfrom
inbox-split-cleanup

Conversation

@FagnerMartinsBrack

Copy link
Copy Markdown
Member

Stacked on #950 — closes the double-delivery overlap window that PR opens. Do not merge until #950 is deployed green in both stages and the operator checklist below is clear. (After #950 merges, retarget this PR's base to main.)

Contents

Removes from hutch: /inbox pages, inbox domain handlers, the three pipeline mains, and their entire infra chains (queues, lambdas, SNS→SQS bridge, EventBridge rules, truncation-alert trio — 251 lines of infra/index.ts). The composition roots collapse five inbox deps into one injected provisionInboxAddress; signup-provisioning tests re-home to web/auth/.

Hutch keeps: SES receiving (InboxMail), the three DynamoDB tables, delete-account's purge reach, signup-time address provisioning (addresses grant + INBOX_ADDRESS_DOMAIN stay on the main lambda; emails/links grants+env removed), and all Pulumi config keys.

⚠️ Operator checklist BEFORE merging

  • feat(inbox): extract the inbox into its own deployable (phases A–C: pre-refactors, seam, additive project) #950 deployed green: staging + prod, /inbox serving from inbox-web-handler, new pipeline lambdas consuming.
  • Old DLQs empty: receive-email-dlq, extract-email-links-dlq, crawl-email-link-preview-dlq (deleting a queue destroys its messages — redrive first if non-empty).
  • Old source queues ~0 depth (they self-drain; anything lost at delete instant is a duplicate the inbox path already processed).
  • Export extract-email-links-truncated-alert if the 14-day truncation audit trail matters (advisory only).

After deploy

Single delivery restored: the SNS topic has one SQS subscription; the platform bus carries only inbox-* rules for these events. Rollback = revert this PR (recreates hutch's consumers; re-entering the overlap is safe by idempotency; any dropped notification is replayable from the raw-email bucket, which retains every .eml forever).

Full pnpm check green at every commit (41 projects).

…loyable

Closes the double-delivery overlap the inbox extraction opened: the
/inbox pages, inbox domain handlers, the three email-pipeline mains,
and their infra chains (queues, lambdas, SNS bridge, EventBridge
rules, truncation alert trio) leave hutch; the inbox stack's
inbox-prefixed equivalents are the sole consumers from this deploy on.

Hutch keeps everything stateful and every cross-cutting concern: the
SES receiving stack, the three DynamoDB tables, delete-account's
purge reach into them, and signup-time address provisioning — the
five inbox deps on the composition roots collapse into one injected
provisionInboxAddress, and the provisioning tests re-home to
web/auth/ where the behavior lives. The emails/links table grants and
env leave the main web lambda; the addresses grant stays for signup.

Merge only after the inbox deployable's first deploy is green in both
stages, with the old DLQs drained (see the cutover run-book in the PR).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant