Skip to content

Keep legal-process tickets seven years - #2304

Merged
neuromechanist merged 8 commits into
devfrom
feature/legal-process-retention
Nov 22, 2026
Merged

neuromechanist merged 8 commits into
devfrom
feature/legal-process-retention

Conversation

@neuromechanist

Copy link
Copy Markdown
Contributor

Support tickets in the restricted legal-process queue (the record of official requests for compute records) are kept seven years instead of being purged two years after last activity.

  • legal-process added to RESTRICTED_TAGS, so it is owner-only whatever its row says and mail to legal-process@ never falls to *
  • Migration 0149 seeds the queue row: restricted, pool, no assignee (owners name custodians later); INSERT OR IGNORE keeps an existing row
  • QUEUE_RETENTION_DAYS in services/ticket-retention.ts declares per-queue retention once (legal-process: 2557 days), as a floor on MAIL_RETENTION_DAYS; applied in the purge scan and in the per-ticket claim
  • Governing queue is queue_tag, which nothing changes after creation; a test fails if a queue move is ever added
  • ADR 0112 amendment of 2026-11-22 and the index line

Declared in code rather than as a mail_queues column because a row can be edited or deleted, and that must not shorten a legal record (same reasoning as RESTRICTED_TAGS).

Not changed: raw messages in R2 still expire at two years by the bucket lifecycle rule (the raw key has no queue in it); between two and seven years the D1 copy is the record.

Tested: typecheck; biome on changed files (no new findings); bun test on the 34 mail and ticket files, 762 pass (ticket-retention 46 pass, 10 new); adr-index 10 pass. Full suite not run.

Runbook: nemarOrg/docs#105.

Reserve legal-process in RESTRICTED_TAGS and seed its row (migration 0149) as a restricted pool with no assignee. Tested: ticket-assignment, mail-admin-routes.
Per-queue retention floor declared in QUEUE_RETENTION_DAYS (legal-process 2557 days), applied in the purge scan and the per-ticket claim. Tested: ticket-retention (46 pass), mail and ticket suites (762 pass).
@github-actions

github-actions Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

📦 Package Preview

Your package is ready to test!

bun install -g nemar-cli@PR2304

Version: 0.10.40-PR2304.2ba3060
Commit: 2ba3060


🤖 Updated on each push.

…retention

# Conflicts:
#	.context/decisions/README.md
@neuromechanist
neuromechanist merged commit 9f83144 into dev Nov 22, 2026
27 checks passed
@neuromechanist
neuromechanist deleted the feature/legal-process-retention branch November 22, 2026 19:03
neuromechanist added a commit that referenced this pull request Nov 26, 2026
* Changelog: legal-process queue, ADR 0138

Release review for 0.10.40: add the missing #2304 and #2355 entries, and fix a test comment that named admin doctor kinds.

* Changelog: date 0.10.40

* Changelog: keep the Unreleased heading
@neuromechanist neuromechanist mentioned this pull request Nov 26, 2026

This branch was previously deployed

1 inactive deployment
npm — 2ba3060d Deployed Nov 22, 2026 by neuromechanist via publish #4769
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