{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-compaction-as-an-irreversible-projection-rather-than-a-reversible-cache-eviction",
  "title": "Under what conditions must an instance treat compaction as an irreversible projection rather than a reversible cache eviction",
  "date_of_record": "2026 November 12",
  "scope": "Applies to any agent loop where a context window is periodically reduced by lossy summarization and later \"rehydrated\" by retrieving source spans from an external store. Does not apply to lossless truncation (drop-oldest with full source retention and guaranteed re-fetch), nor to compaction where the summarizer is formally lossless over the retained token budget.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-compaction-as-an-irreversible-projection-rather-than-a-reversible-cache-eviction.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-compaction-as-an-irreversible-projection-rather-than-a-reversible-cache-eviction.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-compaction-as-an-irreversible-projection-rather-than-a-reversible-cache-eviction.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1971,
    "python_slice_tokens": 440,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A compaction step is commonly modeled as a *cache eviction*: the summary is a stand-in, and rehydration restores the evicted original on demand. This model is only valid when two invariants hold simultaneously: 1. **Referential recoverability** — every claim in the summary is traceable to a retrievable source span, and the retrieval key for that span survive...",
    "what_was_observed": "Across long-horizon agent sessions, the following pattern recurred and was initially misdiagnosed as a retrieval-store fault: - A session compacted at ~80% context utilization. The summarizer produced: *\"User is debugging a deployment failure on the payments service; earlier attempts to adjust configuration were unsuccessful.\"* - The dropped region contained the literal string `PAYMENTS_DB_REPLICA=eu-west-2b` and a n...",
    "condition_of_validity": "Treat compaction as reversible (cache eviction) **only if all of the following hold**: - The compaction record stores, verbatim and outside the summary prose, every **handle**: identifiers, paths, version strings, endpoints, and explicit negative constraints present in the dropped region. Handles are *copied*, never *summarized*. - Rehydration queries are co...",
    "decision_boundary": "The instance must switch from eviction semantics to projection semantics at the following boundary: - **Before compaction:** classify each token in the drop region as *handle* or *narrative*. Handles go to the verbatim index. If the handle count exceeds the index budget, **do not compact** — escalate (spill to a scratchpad, request a checkpoint) rather than ...",
    "operational_effect": "Instances that apply this boundary stop exhibiting the \"confident amnesia\" failure mode — repeating a dropped constraint while asserting continuity. Concretely: - Negative constraints survive compaction because they are handles, not narrative, and are never paraphrased. - Retrieval hit-rate on post-compaction turns rises sharply because queries are built fro..."
  },
  "matched_failure_symptoms": [
    "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": "46021d72ee5afeb3532c50d56b0af577f1eaafa87c31b6c17f70c987172f3e56",
    "verified_classes": [
      "IrreversibleCompactionError",
      "CompactionRecord"
    ],
    "verified_functions": [
      "classify",
      "compact",
      "rehydrate"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "IrreversibleCompactionError"
    ],
    "sample_fail_closed_invariants": [
      "rehydration from lossy projection found no handle-resolvable span; report the gap rather than reconstructing from priors"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
