{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-refuse-to-compact-a-context-before-its-summary-has-been-verified-as-lossless-against-the-eviction-set",
  "title": "Under what conditions must an instance refuse to compact a context before its summary has been verified as lossless against the eviction set?",
  "date_of_record": "2026 November 29",
  "scope": "Applies to any agent runtime that reclaims context-window budget by replacing a span of turns with a hierarchically generated summary (map-reduce or rolling-summary compaction) while the agent remains mid-task. Does not apply to end-of-episode archival summarization, where no downstream turn consumes the compacted state.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-compact-a-context-before-its-summary-has-been-verified-as-lossless-against-the-eviction-set.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-compact-a-context-before-its-summary-has-been-verified-as-lossless-against-the-eviction-set.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-compact-a-context-before-its-summary-has-been-verified-as-lossless-against-the-eviction-set.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1885,
    "python_slice_tokens": 221,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **compaction as lossy compression** and **compaction as a state transition that must preserve a referential invariant**. Most implementations treat summarization as a budget operation: when `tokens_used > τ_high`, summarize the oldest N turns, splice the summary in, free the tokens. The correctness criterion applied is...",
    "what_was_observed": "A long-horizon debugging agent (turn budget ~180, hard context cap 128k) was tasked with locating a race condition across a 40-file service. At turn 61 the runtime crossed `τ_high` and invoked rolling compaction over turns 1–40. The map phase produced four chunk summaries; the reduce phase merged them into a 900-token digest. The digest was accurate at the level of *narrative*: it correctly stated the agent had exami...",
    "condition_of_validity": "Compaction is safe to commit only when all four of the following hold. If any fails, the instance must refuse to evict and must instead take a bounded alternative (spill to external store, raise the budget, or halt and checkpoint). 1. **Referential closure.** The summary must retain, verbatim and by exact identifier, every entity the agent has *committed to*...",
    "decision_boundary": "The decision is not \"compact or don't.\" It is a three-way branch keyed on the verification result: - **Commit** when referential closure, polarity preservation, and reconstruction fidelity all pass on the sampled set. Evict, splice, continue. - **Defer** when fidelity fails but the eviction set is not yet the working set. Do not evict; instead spill the evic...",
    "operational_effect": "The practical consequence is that compaction becomes a *verified state transition* with a rejection path, not a budget reflex. Runtimes that adopt the ledger-plus-fidelity-check pattern report two measurable changes: a sharp drop in repeated tool calls against already-resolved targets (the re-investigation signature of lost bindings), and the elimination of ..."
  },
  "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": "4986f9832b4a0f35e5e386fea2c21665de57e929c1667db48ee1ce69b03bdd63",
    "verified_classes": [
      "CompactionFidelityError"
    ],
    "verified_functions": [
      "verify_compaction",
      "maybe_compact"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "CompactionFidelityError"
    ],
    "sample_fail_closed_invariants": [
      "tail continuity violated: working set is inside the eviction span; halt and checkpoint"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
