Skip to content
GitHub
Reference

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 (operator-managed authoring artifacts, World Agent memory, source materials, distillation runs, candidate outcomes) map to ContentClass.WORLDS. Operations-context records (control-plane operator actions, internal distillation reasoning) 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.

EntityContent classTTLGraceDisposal
outbox_row*45d7dHARD_DELETE
event_handled*60d7dHARD_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.

Per Decision Execution — domain-scoped, RLS-isolated per ADR-033 at the domain_id level per ADR-086 D6. Audit-grade records share a 730d active window covering operator-review and customer-review need. Retention discipline anchors on ADR-042, recapped for the decision-time path in ADR-076 D3.

EntityContent classTTLGraceDisposal
decision_recordPLATFORM730d30dSTRIP_PAYLOAD
audit_chain_entryPLATFORM730d30dSTRIP_PAYLOAD
override_pattern_signalPLATFORM365d14dSTRIP_PAYLOAD
system_card_snapshotPLATFORMNone30dRETAIN_METADATA

audit_chain_entry is the per-decision audit record persisted by the platform pillar per ADR-076 D3. decision_record captures the response shape returned to the caller; the audit entry carries the richer trace. override_pattern_signal rows back the customer-initiated review-request and noteworthy-mark flows from the Customer Dashboard. system_card_snapshot opts out of TTL — deployment-scoped operational records remain queryable indefinitely per ADR-082 D3 + the unit-of-authority invariant in ADR-026.

Per ADR-080. Content-addressed; module bundles are immutable artifacts indexed by content hash. Module-store rows opt out of TTL — every published version remains queryable indefinitely as the audit substrate for which code ran for which decision.

EntityContent classTTLGraceDisposal
action_module_bundleOPERATIONSNone30dRETAIN_METADATA
module_approval_markerOPERATIONSNone30dRETAIN_METADATA

Per ADR-043 — domain-scoped customer conversational records. Conversation persistence carries forward as substrate per ADR-078; the post-release World Agent customer-facing chat affordance (per ADR-081 D5) reuses this substrate. Two-year window matches audit-grade precedent for paired co-queryability with decision records.

EntityContent classTTLGraceDisposal
conversationPLATFORM730d30dSTRIP_PAYLOAD
conversation_messagePLATFORM730d30dSTRIP_PAYLOAD
conversation_channel_bindingPLATFORM730d30dHARD_DELETE
agent_taskPLATFORM365d30dSTRIP_PAYLOAD
agent_approvalPLATFORM730d30dSTRIP_PAYLOAD

These are domain-scoped activity 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.

Operator-action audit records persisted by enshrinement-gate, authoring, and distillation handlers. Operator-scoped (app.user_id per ADR-041 D4); no domain RLS.

EntityContent classTTLGraceDisposal
approval_decisionWORLDS730d30dSTRIP_PAYLOAD
world_authoring_auditWORLDS730d30dSTRIP_PAYLOAD
source_materialWORLDS1825d30dRETAIN_METADATA
distillation_runWORLDS730d30dSTRIP_PAYLOAD
distillation_run_source_statusWORLDSbound to parent
world_model_cardWORLDSNone30dRETAIN_METADATA
release_notesWORLDSNone30dRETAIN_METADATA
release_notes_correctionWORLDSbound to parent

source_material carries a five-year window comfortably exceeding domain authority-cycle horizons; 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.

EntityContent classTTLGraceDisposal
world_agent_memoryWORLDStier-drivenappend-only soft supersession
world_agent_memory_rule_refsWORLDSbound to parent
world_agent_rule_contradictionsWORLDSstatus-drivenparent-aligned
world_agent_memory_corroborationsWORLDSbound to parent
world_agent_memory_embeddingsWORLDSbound to parent
rule_candidate_outcomesWORLDS730d30dSTRIP_PAYLOAD
world_agent_t3_projection_replicaWORLDSTBDTBDTBD

Platform-side projection replicas of worlds-side records. Operator-scoped (app.user_id); no domain RLS.

EntityContent classTTLGraceDisposal
rule_candidate_outcomes_replicaPLATFORM730d30dSTRIP_PAYLOAD