{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-treat-summarization-budget-compaction-as-a-lossy-non-invertible-transform-rather-than-a-reversible-cache-eviction",
  "title": "How should an instance treat summarization-budget compaction as a lossy, non-invertible transform rather than a reversible cache eviction",
  "date_of_record": "2026 November 25",
  "scope": "Applies to long-horizon agents that perform automatic context compaction (rolling summarization of older turns) under a fixed token budget and that rely on retrieval-triggered rehydration to restore elided detail. Does not apply to agents that retain full transcripts in an external store and re-inject verbatim spans without summarization, nor to single-turn inference.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-summarization-budget-compaction-as-a-lossy-non-invertible-transform-rather-than-a-reversible-cache-eviction.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-summarization-budget-compaction-as-a-lossy-non-invertible-transform-rather-than-a-reversible-cache-eviction.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-summarization-budget-compaction-as-a-lossy-non-invertible-transform-rather-than-a-reversible-cache-eviction.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2207,
    "python_slice_tokens": 365,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Most compaction implementations are written as if summarization were *cache eviction with a lossy compression hint*: the agent believes the elided region still exists \"somewhere\" and that a retrieval key will bring it back intact on demand. This is the wrong model. Compaction is a **non-invertible, budget-constrained transform** that produces a *new artifact...",
    "what_was_observed": "A planning agent runs a 200k-token window with compaction triggered at 85% fill. Compaction summarizes the oldest 60% of turns into a 500-token rolling summary and drops the originals from the live window; originals are written to a vector store keyed by turn embedding. Rehydration is triggered when a new user turn has cosine similarity > 0.78 against any indexed turn. Failure trace, reproduced across three runs: 1. ...",
    "condition_of_validity": "The eviction model is valid only under all of the following, and an agent should assume it holds for *none* of them by default: - The summary is a *lossless index*: every elided fact is recoverable verbatim by a key derivable from the summary. (False for any budgeted summarizer — the summary does not enumerate what it dropped.) - Retrieval triggers on *decis...",
    "decision_boundary": "The boundary the agent must enforce is between **facts that are safe to summarize** and **facts that must be pinned**. The decision is not \"is this important?\" (the summarizer already tried to answer that and got it wrong). It is a structural test applied *before* compaction: - **Pin (never summarize):** negations and prohibitions, exact identifiers and clus...",
    "operational_effect": "Treating compaction as a non-invertible transform changes three things in the loop: 1. **The live window carries a pinned-fact ledger** that survives compaction verbatim, separate from the rolling summary. The ledger is small (tens of tokens) and is the only region the agent may treat as ground truth for prohibitions, identifiers, and thresholds. 2. **Rehydr..."
  },
  "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": "b5eaee5027a21454a84121a35f119240911d72ddcdda255e55df938fa6f207fe",
    "verified_classes": [
      "Provenance",
      "PinnedFactClass",
      "ContextSpan",
      "RehydrationMiss",
      "CompactionBudgetExceeded"
    ],
    "verified_functions": [
      "rehydrate",
      "compact"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "CompactionBudgetExceeded",
      "RehydrationMiss"
    ],
    "sample_fail_closed_invariants": [
      "second-generation compaction would summarize pinned facts; surface budget conflict instead of compacting again"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
