Retention Registry
This page is the lookup surface for POLICY_REGISTRY — the per-(entity_type, content_class) RetentionPolicy entries enforced by spectral.core.retention. For the doctrine — four states, derived state via views, the REFERENCED ⇌ ACTIVE transition, audit posture, late-corruption floor — see Data Retention.
POLICY_REGISTRY keys on (entity_type, content_class). RetentionPolicy.resolve(entity_type, content_class) returns a registered entry or falls back to DEFAULT_POLICY = (active_ttl_days=365, tombstoned_grace_days=30, disposal=HARD_DELETE).
Disposal modes:
HARD_DELETE— row removed entirely on tombstone-grace expiry.STRIP_PAYLOAD— body fields removed; structural metadata + action-linkage row preserved.RETAIN_METADATA— disposal applies only on explicit operator soft-delete; metadata persists.
Worlds-domain records that are operator-managed map to ContentClass.OPERATIONS; * means policy applies regardless of content class. Detailed rationale for each entry’s TTL lives in the linked ADRs and code; this page is the at-a-glance catalog.
Event substrate
Section titled “Event substrate”| Entity | Content class | TTL | Grace | Disposal |
|---|---|---|---|---|
outbox_row | * | 45d | 7d | HARD_DELETE |
event_handled | * | 60d | 7d | HARD_DELETE |
A contract test pins the inequality event_handled.active_ttl > outbox.active_ttl + outbox.grace. event_handled must strictly exceed the outbox active+grace floor (52 days) to guarantee dedup correctness across the full outbox window.
Optimization-engine records
Section titled “Optimization-engine records”Per optimization-engine — workspace-scoped, RLS-isolated per ADR-033, and HARD_DELETE-safe (payloads sanitized at emission; no raw customer output text persisted).
| Entity | Content class | TTL | Grace | Disposal |
|---|---|---|---|---|
regression_record | PLATFORM | 180d | 14d | HARD_DELETE |
rubric_divergence_record | PLATFORM | 180d | 14d | HARD_DELETE |
failure_cluster | PLATFORM | 180d | 14d | HARD_DELETE |
feedback_signal | PLATFORM | 365d | 14d | STRIP_PAYLOAD |
otel_trace | PLATFORM | 90d | 14d | STRIP_PAYLOAD |
ChangeSet family
Section titled “ChangeSet family”Per explainability — change-set lifecycle records share a 730d active window covering full customer review need.
| Entity | Content class | TTL | Grace | Disposal |
|---|---|---|---|---|
change_set | PLATFORM | 730d | 30d | STRIP_PAYLOAD |
change_set_agent_config | PLATFORM | 730d | 30d | STRIP_PAYLOAD |
explainability | PLATFORM | 730d | 30d | STRIP_PAYLOAD |
performance_card | PLATFORM | 730d | 30d | STRIP_PAYLOAD |
agent_performance_card | PLATFORM | 730d | 30d | RETAIN_METADATA |
agent_performance_card retains metadata indefinitely per ADR-026. The card is the canonical audit record and survives its parent change set’s payload disposal.
Spectral Agent conversational records
Section titled “Spectral Agent conversational records”Per agent architecture — workspace-scoped customer conversational records; two-year window matches the change-set family for paired co-queryability.
| Entity | Content class | TTL | Grace | Disposal |
|---|---|---|---|---|
conversation | PLATFORM | 730d | 30d | STRIP_PAYLOAD |
conversation_message | PLATFORM | 730d | 30d | STRIP_PAYLOAD |
conversation_channel_binding | PLATFORM | 730d | 30d | HARD_DELETE |
agent_task | PLATFORM | 365d | 30d | STRIP_PAYLOAD |
agent_approval | PLATFORM | 730d | 30d | STRIP_PAYLOAD |
These are workspace-scoped domain records, not agent memory. They follow the four-state lifecycle and the RetentionPolicy registry — distinct from the universal three-tier memory schema in ADR-058.
Worlds-side operator-action records
Section titled “Worlds-side operator-action records”Operator-action audit records persisted by enshrinement-gate, authoring, and distillation handlers. Operator-scoped (app.user_id per ADR-041 D4); no workspace RLS.
| Entity | Content class | TTL | Grace | Disposal |
|---|---|---|---|---|
approval_decision | WORLDS | 730d | 30d | STRIP_PAYLOAD |
world_authoring_audit | WORLDS | 730d | 30d | STRIP_PAYLOAD |
source_material | WORLDS | 1825d | 30d | RETAIN_METADATA |
distillation_run | WORLDS | 730d | 30d | STRIP_PAYLOAD |
distillation_run_source_status | WORLDS | — | — | bound to parent |
world_model_card | WORLDS | None | 30d | RETAIN_METADATA |
release_notes | WORLDS | None | 30d | RETAIN_METADATA |
release_notes_correction | WORLDS | — | — | bound to parent |
source_material carries a five-year window comfortably exceeding annual tax-year cycles; the REFERENCED ⇌ ACTIVE transition holds rows cited by enshrined rules indefinitely. world_model_card and release_notes opt out of TTL per ADR-026 — published versions remain authoritative indefinitely.
World Agent memory + worlds-side consumer state
Section titled “World Agent memory + worlds-side consumer state”Per world-agent. Action-linked memory at any tier is retained regardless of tier; transient tiers (interaction, session) inherit lifecycle from enclosing scope per ADR-058 D6.
| Entity | Content class | TTL | Grace | Disposal |
|---|---|---|---|---|
world_agent_memory | WORLDS | tier-driven | — | append-only soft supersession |
world_agent_memory_rule_refs | WORLDS | — | — | bound to parent |
world_agent_rule_contradictions | WORLDS | status-driven | — | parent-aligned |
world_agent_memory_corroborations | WORLDS | — | — | bound to parent |
world_agent_memory_embeddings | WORLDS | — | — | bound to parent |
rule_candidate_outcomes | WORLDS | 730d | 30d | STRIP_PAYLOAD |
world_agent_t3_projection_replica | WORLDS | TBD | TBD | TBD |
Operations Agent memory + platform-side consumer state
Section titled “Operations Agent memory + platform-side consumer state”Per operations-agent. Operator-scoped (app.user_id); no workspace RLS.
| Entity | Content class | TTL | Grace | Disposal |
|---|---|---|---|---|
operations_agent_memory | PLATFORM | tier-driven | — | append-only soft supersession |
operations_agent_memory_embeddings | PLATFORM | — | — | bound to parent |
operations_agent_approval | PLATFORM | 730d | 30d | STRIP_PAYLOAD |
rule_candidate_outcomes_replica | PLATFORM | 730d | 30d | STRIP_PAYLOAD |
rule_candidates_pending | PLATFORM | 180d | 14d | STRIP_PAYLOAD |