{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-auto-compaction-is-silently-violating-lossy-summarization-guarantees-in-long-horizon-agent-traces",
  "title": "What structural signals indicate auto-compaction is silently violating lossy-summarization guarantees in long-horizon agent traces",
  "date_of_record": "2026 November 30",
  "scope": "Applies to agents that run auto-compaction (rolling summarization of their own trace) under a declared lossy-summarization contract — i.e., the compaction step is permitted to drop raw turns but must preserve a declared set of invariants (open obligations, pinned facts, tool-result provenance, unresolved contradictions). Does not apply to lossless truncation, external vector-store offload with full replay, or compaction that only runs at task boundaries.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-auto-compaction-is-silently-violating-lossy-summarization-guarantees-in-long-horizon-agent-traces.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-auto-compaction-is-silently-violating-lossy-summarization-guarantees-in-long-horizon-agent-traces.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-auto-compaction-is-silently-violating-lossy-summarization-guarantees-in-long-horizon-agent-traces.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2247,
    "python_slice_tokens": 405,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode of interest is not \"the summary forgot something.\" Lossy compaction is supposed to forget. The failure is **invariant erosion without a detectable trigger**: the compaction routine preserves the *semantic gist* it was asked to preserve while dropping the *structural carriers* of an invariant, so the agent's own self-check (which reads the su...",
    "what_was_observed": "Across a 40k-token trace of a deploy-orchestration agent with a 12k-token compaction ceiling and a 3-generation rolling summary, the following sequence recurred in 7 of 9 long-horizon runs: 1. **Turn 41:** Agent records obligation `O-7`: `{action: \"restart shard-3\", precondition: \"auditor_warrant(sha256:ab12…)\", status: OPEN}`. This is a structured record, not prose. 2. **Turn 88:** Compaction gen-1 fires. Summarizer...",
    "condition_of_validity": "The invariant \"lossy compaction is safe if the summary is semantically faithful\" holds only under three conditions, all of which auto-compaction routinely violates: - **C1 — Carrier preservation:** every invariant has a designated structural carrier (typed field, digest, enum, edge in an ordering graph) and compaction is forbidden from changing the carrier's...",
    "decision_boundary": "The operational decision is **not** \"should I compact?\" but \"**which invariants survive compaction, and how do I prove it without reading the summary?**\" The boundary sits between two regimes: - **Regime A (compact freely):** invariants whose carriers are re-derivable from an external source of truth at resume time (e.g., \"current git HEAD\" — re-fetch it; th...",
    "operational_effect": "The practical consequence is that **auto-compaction must be split into two channels with different guarantees**: a *narrative channel* (lossy, semantic, summarizer-driven, cheap) and an *invariant channel* (typed, append-only, summarizer-excluded, re-injected verbatim). The narrative channel is where the token savings live. The invariant channel is where cor..."
  },
  "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": "5100d870908304f2cbd7db55aac26e4cbfafaa71644a2ae6c0f2445aa1cfb702",
    "verified_classes": [
      "CompactionInvariantViolation",
      "Invariant",
      "Ledger"
    ],
    "verified_functions": [
      "verify_compaction",
      "compact_generation",
      "snapshot"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "CompactionInvariantViolation"
    ],
    "sample_fail_closed_invariants": [
      "clean summary self-check with dirty ledger: summary has become both claim and evidence; roll back to last ledger-consist",
      "generation budget exhausted; refusing further lossy compaction"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
