Repository navigation
Phase 6a: ticket retention, summary then purge - #1944
Merged
neuromechanist merged 9 commits intoOct 24, 2026
Merged
neuromechanist merged 9 commits into
neuromechanist merged 9 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
📦 Package PreviewYour package is ready to test! bun install -g nemar-cli@PR1944Version: 🤖 Updated on each push. |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The upstream-freshness epic (#1046) already holds ADR 0111 and migrations 0104-0106. This epic keeps 0102 and 0103 and moves its later numbers past theirs so both epics merge to dev without a collision. Co-Authored-By: Claude Opus 5.5 <[email protected]>
neuromechanist
merged commit Oct 24, 2026
322799d
into
feature/issue-1893-epic-email-cf
13 of 14 checks passed
This was referenced Oct 24, 2026
Merged
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Maintainer decision (2026-10-24): after the retention period only a summary of a support ticket is kept; everything else is removed. 730 days in production, 30 on staging, matching the raw-mail lifecycle rules.
PUT /admin/mail/tickets/:id/summaryandnemar admin mail summarize <id>, under the same visibility predicate as every ticket route. ThenemarAdminagent writes summaries for closed tickets it can see (list --needs-summary); the Worker never calls a model. Restricted tickets (security, conduct) are never shown to a model and get an owner-written summary or none. A summary containing an email address is refused (summary_has_address).MAIL_RETENTION_DAYS; missing or invalid deletes nothing) removes messages, reply keys, non-queue tags, event details, the subject, the requester's address and account link of each ticket whose last message is past the period. It keeps the id, queue, status, dates, summary and the conduct exclusion (an excluded account still cannot read the summary). Active tickets becomeclosed; spam staysspam. It never sends mail and never touches R2. Bounded per run; idempotent.ticket_purged; a raw key of a purged ticket cannot be reprocessed back into existence (tombstone table); mail to a purged ticket's plus address opens a new ticket.mail_ticket_eventsso its CHECK allows the newsummaryandpurgedkinds). ADR 0111 retention section amended.Closes #1943
Part of epic #1893. Gate for Phase 6 together with nemarOrg/docs#84 (privacy policy).
Test plan
ticket-retention(summary rules, visibility incl. excluded owner after purge, cutoff boundary, what is removed and kept, spam stays spam, idempotence, bad config deletes nothing, batch bound, reprocess tombstone), retention vars, cron wiring and allowlist pins, mail routes, cascades, migrationssummarize,--needs-summary, purgedshow, escaping🤖 Generated with Claude Code