Skip to content

Email epic: fix ticket replies, word refs - #1953

Merged
neuromechanist merged 1 commit into
devfrom
feature/issue-1893-epic-email-cf
Oct 25, 2026
Merged

neuromechanist merged 1 commit into
devfrom
feature/issue-1893-epic-email-cf

Conversation

@neuromechanist

Copy link
Copy Markdown
Contributor

Part of epic #1893. Brings #1952 to dev, so staging can retest ticket replies.

Summary

  • Ticket replies no longer set Message-ID, which Cloudflare Email Service refuses (every staging reply failed with custom header 'Message-ID' is not allowed). Headers are checked against Cloudflare's allowlist before sending, and the test binding enforces it.
  • Mail route errors no longer use 502/503: reply_not_sent is 422, reply_delivery_unknown and inbound_not_configured are 409. The website's proxy lost a 502's JSON body.
  • New tickets get three-word references (amber-falcon-river), reply-to support+t-<ref>@; legacy references keep working. Migration 0109 rebuilds mail_tickets to accept both, preserving all rows and child rows.

Test plan

  • Full backend suite on Fix ticket replies on Cloudflare, word refs #1952: 8658 pass, 0 fail
  • migrations:d1-check: all 108 migrations replay on real D1, catalog matches
  • CI green on this PR
  • Staging: a reply to ticket 2 is delivered and the answer threads back

* Stop setting Message-ID on ticket replies

* Answer mail reply errors with 409 and 422

* Accept word ticket refs in mail_tickets

* Use three-word ticket references

* Use template literals in mail route test

* Address review of word refs and replies
@neuromechanist
neuromechanist merged commit bc990b5 into dev Oct 25, 2026
43 checks passed
@neuromechanist
neuromechanist deleted the feature/issue-1893-epic-email-cf branch October 25, 2026 19:13

This branch was previously deployed

1 inactive deployment
npm — b3846335 Deployed Oct 25, 2026 by neuromechanist via publish #3966
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