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 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.

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 optimization-engine — workspace-scoped, RLS-isolated per ADR-033, and HARD_DELETE-safe (payloads sanitized at emission; no raw customer output text persisted).

EntityContent classTTLGraceDisposal
regression_recordPLATFORM180d14dHARD_DELETE
rubric_divergence_recordPLATFORM180d14dHARD_DELETE
failure_clusterPLATFORM180d14dHARD_DELETE
feedback_signalPLATFORM365d14dSTRIP_PAYLOAD
otel_tracePLATFORM90d14dSTRIP_PAYLOAD

Per explainability — change-set lifecycle records share a 730d active window covering full customer review need.

EntityContent classTTLGraceDisposal
change_setPLATFORM730d30dSTRIP_PAYLOAD
change_set_agent_configPLATFORM730d30dSTRIP_PAYLOAD
explainabilityPLATFORM730d30dSTRIP_PAYLOAD
performance_cardPLATFORM730d30dSTRIP_PAYLOAD
agent_performance_cardPLATFORM730d30dRETAIN_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.

Per agent architecture — workspace-scoped customer conversational records; two-year window matches the change-set family for paired co-queryability.

EntityContent classTTLGraceDisposal
conversationPLATFORM730d30dSTRIP_PAYLOAD
conversation_messagePLATFORM730d30dSTRIP_PAYLOAD
conversation_channel_bindingPLATFORM730d30dHARD_DELETE
agent_taskPLATFORM365d30dSTRIP_PAYLOAD
agent_approvalPLATFORM730d30dSTRIP_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.

Operator-action audit records persisted by enshrinement-gate, authoring, and distillation handlers. Operator-scoped (app.user_id per ADR-041 D4); no workspace 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 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.

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

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.

EntityContent classTTLGraceDisposal
operations_agent_memoryPLATFORMtier-drivenappend-only soft supersession
operations_agent_memory_embeddingsPLATFORMbound to parent
operations_agent_approvalPLATFORM730d30dSTRIP_PAYLOAD
rule_candidate_outcomes_replicaPLATFORM730d30dSTRIP_PAYLOAD
rule_candidates_pendingPLATFORM180d14dSTRIP_PAYLOAD