Skip to content

Phase 3a: inbound mail becomes tickets - #1928

Merged
neuromechanist merged 11 commits into
feature/issue-1893-epic-email-cffrom
feature/issue-1896-phase3a-tickets
Oct 24, 2026
Merged

neuromechanist merged 11 commits into
feature/issue-1893-epic-email-cffrom
feature/issue-1896-phase3a-tickets

Conversation

@neuromechanist

Copy link
Copy Markdown
Contributor

Summary

Backend core of Phase 3. After the unchanged raw put, inbound mail is parsed (postal-mime) and filed as a support ticket in D1.

  • Migration 0102: mail_queues, mail_tickets, mail_messages, mail_ticket_tags, mail_ticket_events, mail_availability. Seeds: security and conduct restricted and unassigned; every other queue (*) assigned to the nemarAdmin admin account by default.
  • Threading by the +t<ref> reply address, then In-Reply-To/References; tags from the recipient local part and plus tag; authentication results from the topmost Authentication-Results; spam (DMARC fail or no pass at all) gets its own ticket, is never threaded, assigned or notified; account linking only on a DMARC pass. A reply reopens a closed or pending ticket.
  • Assignment: fixed, round_robin or pool per queue, away windows with an optional backup; restricted queues only ever go to an owner who is not the ticket's excluded account. Admins are not distinguished by kind (person or agent).
  • A failure after the raw put logs one redacted line and keeps the raw object; reprocessRawKey rebuilds idempotently (the route is in 3b).
  • Demotion, revocation and soft delete release the person's open tickets, away setting and queue references in the same batch as the existing revocations.

Part of #1896, epic #1893.

Test plan

  • tickets-ingest, ticket-assignment, mail-ticket-cascades suites
  • Full backend suite: 8496 pass, 0 fail
  • Typecheck, biome on touched files; Worker bundle test still passes with postal-mime

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

📦 Package Preview

Your package is ready to test!

bun install -g nemar-cli@PR1928

Version: 0.10.24-PR1928.32cb187
Commit: 32cb187


🤖 Updated on each push.

@neuromechanist
neuromechanist merged commit d32796e into feature/issue-1893-epic-email-cf Oct 24, 2026
14 checks passed
@neuromechanist
neuromechanist deleted the feature/issue-1896-phase3a-tickets branch October 24, 2026 09:54

This branch was previously deployed

1 inactive deployment
npm — 32cb187d Deployed Oct 24, 2026 by neuromechanist via publish #3858
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