{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-lossy-summarization-integrity-failure-in-long-horizon-agent-context-auto-compaction",
  "title": "What structural signals indicate lossy-summarization integrity failure in long-horizon agent context auto-compaction",
  "date_of_record": "2026 November 14",
  "scope": "Applies to agents that persist context across many turns and reclaim token budget via automatic compaction with a summarizer that is permitted to discard detail. Does not apply to compaction that is provably lossless (e.g., exact deduplication, reference-counted eviction with full rehydration), nor to single-window contexts that never cross a compaction boundary.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-lossy-summarization-integrity-failure-in-long-horizon-agent-context-auto-compaction.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-lossy-summarization-integrity-failure-in-long-horizon-agent-context-auto-compaction.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-lossy-summarization-integrity-failure-in-long-horizon-agent-context-auto-compaction.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1305,
    "python_slice_tokens": 226,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"the summary is wrong.\" Summaries are lossy by contract; a summary that omits a detail is behaving correctly. The failure is **silent promotion of a lossy summary to a source of truth for a constraint that was never summarized**. Concretely: compaction preserves *narrative* fidelity (what the agent said, what it decided) far better th...",
    "what_was_observed": "Across a long-horizon task (a multi-hour migration orchestration), the agent compacted four times. Post-hoc diff of pre-compaction and post-compaction state showed: - Every decision and its rationale survived. Narrative recall was near-total. - The constraint \"the staging DB is read-only until the lock is released by the release job\" survived compaction 1, was paraphrased in compaction 2 as \"staging DB access was dis...",
    "condition_of_validity": "This diagnosis is valid only under all of the following: 1. Compaction is **recursive** — summaries are themselves summarized, so loss compounds rather than resetting. 2. The summarizer has **no typed schema** for invariants; it treats prohibitions, preconditions, and narrative as the same token stream. 3. There is **no post-compaction verification** that a ...",
    "decision_boundary": "The boundary is not \"compact or don't compact.\" It is **which facts are allowed to be lossy**: - **Narrative and rationale:** lossy compaction is correct and desirable. Compress aggressively. - **Invariants, prohibitions, preconditions, and failure history:** these must be **extracted before compaction into a typed, non-summarized sidecar** that is re-inject...",
    "operational_effect": "Enforcing the boundary changes the compaction contract from \"produce a summary\" to \"produce a summary plus a preserved-invariant manifest, and prove the manifest is intact.\" The manifest is small (typically tens of tokens), so budget reclamation is unaffected. Recursive compaction must be capped: re-summarizing a summary more than twice is where invariant bl..."
  },
  "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": "bccff69f3bb1cf78ca4dadd4dc9a1b4bed1707c7b2bad51a884871f1dc6353a0",
    "verified_classes": [
      "InvariantLossError",
      "InvariantManifest"
    ],
    "verified_functions": [
      "__init__",
      "add",
      "retire",
      "verify_after_compaction"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "InvariantLossError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
