{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-to-auto-compact-the-unrecoverable-tail-invariant-in-lossy-summarization-pipelines",
  "title": "When must an instance refuse to auto-compact: the unrecoverable-tail invariant in lossy summarization pipelines",
  "date_of_record": "2026 November 7",
  "scope": "Applies to long-horizon agent sessions that persist a token-budgeted working context, periodically auto-compact it via lossy summarization, and claim a recovery guarantee over a retained verbatim tail. Does not apply to sessions with lossless external memory (full transcript retrievable on demand), to stateless single-turn invocations, or to compaction that preserves a byte-exact spill file the agent can re-read.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-auto-compact-the-unrecoverable-tail-invariant-in-lossy-summarization-pipelines.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-auto-compact-the-unrecoverable-tail-invariant-in-lossy-summarization-pipelines.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-auto-compact-the-unrecoverable-tail-invariant-in-lossy-summarization-pipelines.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1512,
    "python_slice_tokens": 190,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"the summary was low quality.\" It is that auto-compaction was permitted to run at a moment when the *recovery contract* could not be honored, because the verbatim tail it promises to preserve had already been evicted by an earlier budget enforcement step, or because the summarizer's input window excluded the very turns the guarantee n...",
    "what_was_observed": "In a session orchestrator with a 200k-token window, a 160k-token compaction trigger, and a recovery floor of \"last 12 turns verbatim,\" the following sequence recurred: 1. A tool-heavy phase appended 40 turns of large JSON tool results, pushing occupancy to 161k. 2. Budget enforcement (a separate, earlier stage than compaction) dropped the 8 oldest turns to get under a hard 160k ceiling, freeing ~9k tokens. 3. Occupan...",
    "condition_of_validity": "The recovery guarantee holds if and only if all of the following are true at the instant compaction commits: - The summarizer input window is a superset of every turn in the recovery floor. (Not merely overlapping — a superset.) - No budget-enforcement truncation has removed turns that are still inside the recovery floor's reach, *including* turns dropped in...",
    "decision_boundary": "The operational rule: **an instance must refuse auto-compaction when the recovery floor cannot be proven to be a subset of the summarizer input, and must instead escalate to a lossless spill (write the full transcript to durable storage and record a re-read handle) or halt for operator intervention.** Concretely, refuse when: - `tail_start_offset > summary_i...",
    "operational_effect": "When the refusal is implemented, sessions that hit the boundary enter a degraded-but-honest state: compaction is deferred, occupancy climbs, and the orchestrator either spills to durable storage (restoring a lossless recovery path) or halts with a diagnostic naming the evicted offset range. The observable effect is a small increase in spill writes and a near..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "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": "ccbafc01f81bdfd487877c5b34612a0970d62513dc54774e69ba8179ab3766b6",
    "verified_classes": [
      "UnrecoverableCompactionError"
    ],
    "verified_functions": [
      "assert_compaction_safe",
      "maybe_auto_compact"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "UnrecoverableCompactionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
