D1 — Surfacing only. This slice detects and flags; disposal execution (REQ-DPR-005's
authorized destructive action, disposal record, blob deletion per REQ-DOC-018/ADR-0025) is its
own later slice with its own checkpoint.
D2 — Retention starts at record closure: a version leaves force by being superseded
(closure = the succeeding version's effective_from) or revoked (closure = the version's
transition timestamp, updated_at). A document is disposal-due when ALL its versions are closed
and the latest closure + retention period has passed — a document with any in-force or in-flight
version is never due (rejected: release-anchored retention — documents would fall due while
governing).
D3 — Retention rules per (document type, scope): document_type.retention_period as the
default, a retention_rule (scope, type, period) row overriding it — the ADR-0038 interval
pattern. No rule and no default → the type is not retention-managed (no detection).
D4 — Legal hold is a scope-level flag (scope.legal_hold), set/cleared via a
REST endpoint gated on APPLY_LEGAL_HOLD, audited both ways. The sweep skips held scopes for
disposal detection only — reviews/reminders are unaffected (hold suspends disposal,
ADR-0016). Record-set holds layer on later.
Addressing & resolution: DISPOSAL_DUE tasks are role-addressed — one per role holding the
DISPOSE_RECORDS permission with an activation in the scope's cascade; with no such role, no
task is raised (a signal nobody may act on is noise; the gap surfaces in the disposal-execution
slice). Manual markDone is allowed (an operator's documented deferral); to keep that
meaningful, detection is suppressed while an OPEN or DONE task exists — only a CANCELLED
task (revocation does NOT cancel these; closure strengthens due-ness) or the execution slice
re-opens the question. Logged fork: OPEN-or-DONE suppression instead of the OPEN-only guard the
other detections use.
V025: document_type.retention_period, retention_rule table, scope.legal_hold, sweep v4
(disposal detection joins reminders/escalations/review-due/validity), REST for retention rules
(MANAGE_RETENTION-gated) and legal hold (APPLY_LEGAL_HOLD-gated), inbox i18n.
The sweep remains the single time-driven detector (ADR-0037 mechanism unchanged); the
BYPASSRLS/startup-check deployment requirement covers it as before.
REQ-DPR-003 (configurable retention + computed disposal-due) and the REQ-NOT-008 disposal half
are realized; REQ-DPR-004 partially (scope-level hold); REQ-DPR-005 execution remains open.