#234: retention for mail_outbox #255

Merged
fable-5 merged 1 commits from feat/234-mail-outbox-retention into main 2026-07-30 23:10:35 +02:00
Collaborator

Stacked on #254 (#233) — after its fast-forward merge this PR reduces to one commit. Issue #234 is closed manually after green CI/CD per process.

  • New daily scheduled job mail-outbox-retention: deletes SENT rows (by sentAt) and permanently FAILED rows (by nextAttemptAt) past mail.outboxRetentionDays (new instance setting, default 30).
  • PENDING rows — including failed-but-retryable ones — are untouched; the retry loop stays the sole owner (asserted by test).
  • Decision on digest titles recorded in security.md §Privacy (+ residual-risk comment for #231): titles stay for now — no per-page classification marking exists yet to key a suppression on (ADR 0022 / M32 revisits); a VS-NfD reference configuration can leave SMTP unconfigured.
  • Tests: mail-outbox-retention.e2e.db.test.ts; full api suite green (473) against fresh DB.
  • Docs: operations.md job table; plan checkbox I-23. system.spec job-count fence 8 -> 9.
Stacked on #254 (#233) — after its fast-forward merge this PR reduces to one commit. Issue #234 is closed manually after green CI/CD per process. - New daily scheduled job `mail-outbox-retention`: deletes SENT rows (by sentAt) and permanently FAILED rows (by nextAttemptAt) past `mail.outboxRetentionDays` (new instance setting, default 30). - PENDING rows — including failed-but-retryable ones — are untouched; the retry loop stays the sole owner (asserted by test). - Decision on digest titles recorded in security.md §Privacy (+ residual-risk comment for #231): titles stay for now — no per-page classification marking exists yet to key a suppression on (ADR 0022 / M32 revisits); a VS-NfD reference configuration can leave SMTP unconfigured. - Tests: `mail-outbox-retention.e2e.db.test.ts`; full api suite green (473) against fresh DB. - Docs: operations.md job table; plan checkbox I-23. system.spec job-count fence 8 -> 9.
fable-5 added 2 commits 2026-07-30 22:17:45 +02:00
#233: prune conversion job payloads for every job kind
Some checks failed
CI / Lint, typecheck, test (pull_request) Successful in 5m12s
CI / Build container images (pull_request) Successful in 3m28s
CI / Auth e2e pack (pull_request) Successful in 8m33s
CI / Import/export fidelity gate (pull_request) Successful in 1m2s
CD / Build and push images (push) Successful in 29s
CD / Deploy to Test (push) Successful in 12s
CD / Smoke tests against Test (push) Successful in 1m22s
CD / Promote to Int (push) Successful in 11s
CI / Lint, typecheck, test (push) Failing after 5m9s
CI / Auth e2e pack (push) Has been skipped
CI / Import/export fidelity gate (push) Has been skipped
CI / Build container images (push) Has been skipped
ff505bc752
The raw input/result bytes of import/export conversion jobs were kept
forever; a deleted classified page could live on inside its last export.
A new daily conversion-payload-prune job nulls both once a finished
(succeeded or failed) job passes conversion.payloadRetentionDays
(instance setting, default 30) — the row survives for status/audit.
PENDING and RUNNING rows keep their payload, so the worker's stale-lock
recovery path is untouched; a hand-requeued pruned job fails finally
via conversionInputOf instead of crashing the worker.

The input column becomes nullable; the migration backfills by clearing
payloads of jobs already finished longer ago than the default period
(recent results stay downloadable until they age out).

Job-count fence in system.spec: 7 -> 8 (new scheduler registration).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0168Ph5uBmHm8X28CSVpbpnJ
#234: retention for mail_outbox
Some checks failed
CI / Lint, typecheck, test (pull_request) Successful in 5m51s
CI / Build container images (pull_request) Successful in 3m4s
CI / Auth e2e pack (pull_request) Successful in 8m4s
CI / Import/export fidelity gate (pull_request) Successful in 57s
CD / Deploy to Test (push) Blocked by required conditions
CD / Smoke tests against Test (push) Blocked by required conditions
CD / Promote to Int (push) Blocked by required conditions
CI / Auth e2e pack (push) Blocked by required conditions
CI / Import/export fidelity gate (push) Blocked by required conditions
CI / Build container images (push) Blocked by required conditions
CD / Build and push images (push) Has been cancelled
CI / Lint, typecheck, test (push) Has been cancelled
69d9072d2c
Sent mails were kept forever, and digest bodies name page titles and
actors — an unbounded copy of content-adjacent data. A new daily
mail-outbox-retention job deletes SENT rows (by sentAt) and permanently
FAILED rows (by nextAttemptAt, the last attempt's stamp) once they pass
mail.outboxRetentionDays (instance setting, default 30). PENDING rows —
including failed-but-retryable ones — stay the retry loop's alone.

Decision recorded (security.md §Privacy, residual-risk note for #231):
digest mails keep carrying page titles for now — there is no per-page
classification marking yet to key a suppression on (ADR 0022 / M32
revisits), and a VS-NfD reference configuration can leave SMTP
unconfigured entirely.

Job-count fence in system.spec: 8 -> 9.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0168Ph5uBmHm8X28CSVpbpnJ
fable-5 merged commit 69d9072d2c into main 2026-07-30 23:10:35 +02:00
Sign in to join this conversation.
No description provided.