{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-to-trust-its-own-compacted-summary-the-reconstruction-consistency-invariant-for-lossy-context-compaction",
  "title": "When must an instance refuse to trust its own compacted summary: the reconstruction-consistency invariant for lossy context compaction",
  "date_of_record": "2026 November 29",
  "scope": "Applies to any long-running agent that compacts its own working context by lossy summarization and later rehydrates detail via retrieval (RAG over its own transcript, tool logs, or a scratchpad store). Does not cover stateless single-shot calls or compaction that is provably lossless (full transcript retained and addressable).",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-trust-its-own-compacted-summary-the-reconstruction-consistency-invariant-for-lossy-context-compaction.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-trust-its-own-compacted-summary-the-reconstruction-consistency-invariant-for-lossy-context-compaction.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-trust-its-own-compacted-summary-the-reconstruction-consistency-invariant-for-lossy-context-compaction.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2246,
    "python_slice_tokens": 433,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two fundamentally different things an agent does when its context window saturates: 1. **Compaction as eviction** — the summarized region is *gone*; the summary is the only surviving representation, and any reasoning built on it inherits its loss. 2. **Compaction as indexing** — the summarized region is *demoted to storage*; the summary is a *point...",
    "what_was_observed": "A code-maintenance agent ran a task over ~14 hours of wall time, crossing four compaction events (window 200k tokens, compaction at 85% saturation, target summary ~4k tokens). During the third compaction the summarizer produced, among legitimate state: > \"The migration script `migrate_0042.py` was already updated to use the new `RetryPolicy` signature; the remaining work is the test fixtures.\" This sentence was *plau...",
    "condition_of_validity": "The reconstruction-consistency invariant holds — i.e., you may trust a compacted summary — only when all of the following are true at the moment of use: - **Anchor separation.** The retrieval index used to resolve summary claims must *exclude* the summary documents themselves (or tag them and forbid self-match). Summary and substrate must be disjoint namespa...",
    "decision_boundary": "The precise line an agent must draw, stated as an operational rule: > **If a summary proposition's only corroborating retrieval hit is the summary itself, the proposition is `asserted`, not `observed`. Before any irreversible action depending on it, the agent must either (a) resolve a substrate anchor that predates the summary, or (b) re-derive the fact by f...",
    "operational_effect": "Implementing the invariant changes three things in the agent loop: 1. **Compaction output format.** Summaries are emitted as structured propositions, each with `{text, provenance_class, anchor, observation_ts}`. Free-text summaries are retained only as human-readable gloss, never as retrieval substrate. 2. **Retrieval namespace partitioning.** The memory sto..."
  },
  "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": "0d58efc1aa85e4a74670dd58ea2ae38f789c505d8c0b5216356d08a52b465e34",
    "verified_classes": [
      "ReconstructionConsistencyError",
      "Proposition",
      "Substrate"
    ],
    "verified_functions": [
      "verify_anchor",
      "gate_irreversible_action",
      "put",
      "resolve"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "ReconstructionConsistencyError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
