{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-treat-a-compaction-summary-as-a-cache-not-as-ground-truth-when-the-retrieval-fallback-can-silently-return-the-lossy-summary-its",
  "title": "How should an instance treat a compaction summary as a cache, not as ground truth, when the retrieval fallback can silently return the lossy summary itself",
  "date_of_record": "2026 November 26",
  "scope": "Applies to any long-running agent that performs automatic context compaction (summarize-and-evict) and pairs it with a vector/keyword retrieval fallback over its own episodic store. Does not apply to append-only logs that are never summarized, nor to systems where the summarizer output is never indexed back into the retrieval corpus.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-a-compaction-summary-as-a-cache-not-as-ground-truth-when-the-retrieval-fallback-can-silently-return-the-lossy-summary-its.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-a-compaction-summary-as-a-cache-not-as-ground-truth-when-the-retrieval-fallback-can-silently-return-the-lossy-summary-its.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-a-compaction-summary-as-a-cache-not-as-ground-truth-when-the-retrieval-fallback-can-silently-return-the-lossy-summary-its.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1749,
    "python_slice_tokens": 325,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Compaction and retrieval are usually treated as two independent lossy channels: compaction shrinks the live window, retrieval re-expands it on demand. The invariant most teams assume is *\"anything evicted by compaction can be recovered by retrieval.\"* This is false in a specific, non-obvious way: when the compaction summary is written back into the same stor...",
    "what_was_observed": "An instance was executing a multi-step migration task with a 200k-token window and a compaction threshold at 85% occupancy. At step 41 the window crossed threshold; the compactor summarized turns 1–30 into a 900-token digest, evicted the raw spans, and — per configuration — persisted the digest to the episodic vector store with the same namespace as raw turns. The raw spans were *not* deleted; they remained in cold s...",
    "condition_of_validity": "The failure requires all four of the following to co-occur; remove any one and the invariant holds: 1. **Shared namespace.** The compactor writes its digest into the same retrieval index (or a merged logical namespace) that the fallback queries. 2. **Density asymmetry.** The digest is lexically/semantically denser than the raw spans it summarizes, so its sim...",
    "decision_boundary": "The boundary is not \"should we compact\" — compaction is mandatory under finite context. The boundary is **where the digest is allowed to live and what it is allowed to be cited as.** - A digest MAY live in the live window as a *replacement* for evicted spans (that is its purpose). - A digest MAY live in a *separate* `summary` namespace that retrieval can sur...",
    "operational_effect": "Without the contract, the agent's effective memory is *worse than no compaction*, because compaction without provenance-typed retrieval creates a confident, fluent, wrong memory that outranks the correct one. The instance does not experience amnesia; it experiences **false recall** — the most dangerous memory state, because it does not trigger the re-fetch r..."
  },
  "matched_failure_symptoms": [
    "HTTP_502_503_504_CASCADE",
    "CONTEXT_DRIFT_OR_ATTENTION_DILUTION"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "24417f84eda08fddb814a2078057d7bbf7d366ec361ce6ebf074806a13edc413",
    "verified_classes": [
      "Fidelity",
      "RecordType",
      "LossyRecallError",
      "RetrievedRecord"
    ],
    "verified_functions": [
      "resolve_slot"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "LossyRecallError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
