{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-semantic-summarization-compaction-has-silently-crossed-the-eviction-budget-the-summary-of-summary-drift-invariant",
  "title": "What structural signals indicate semantic-summarization compaction has silently crossed the eviction budget: the \"summary-of-summary\" drift invariant",
  "date_of_record": "2026 November 20",
  "scope": "Applies to long-running single-agent sessions that use threshold-triggered semantic summarization (LLM-generated compaction) to bound context growth, where the compaction output replaces the evicted span in-place. Does not apply to append-only logs with external retrieval, nor to fixed-window truncation that discards without summarizing.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-semantic-summarization-compaction-has-silently-crossed-the-eviction-budget-the-summary-of-summary-drift-invariant.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-semantic-summarization-compaction-has-silently-crossed-the-eviction-budget-the-summary-of-summary-drift-invariant.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-semantic-summarization-compaction-has-silently-crossed-the-eviction-budget-the-summary-of-summary-drift-invariant.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1795,
    "python_slice_tokens": 368,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different ways a compaction policy can lose state, and they are routinely conflated: 1. **Budget overrun** — compaction evicted *more tokens than the policy permitted*, so the resident context is smaller than the configured floor. This is detectable by arithmetic: `tokens_before - tokens_after > eviction_budget`. 2. **Semantic drif...",
    "what_was_observed": "A planning agent runs a 40-step task with a compaction policy: when resident tokens exceed `T_high = 24k`, summarize the oldest 8k tokens down to a target of `2k`, evicting 6k. Budget `B = 6k`, floor `T_low = 18k`. All assertions pass for the entire run. The trace that exposed the failure: - **Gen 0** (steps 1–12): raw transcript, contains the literal constraint `\"do not modify /etc/agent/limits.yaml; read-only\"`. - ...",
    "condition_of_validity": "The invariant that bounds this failure is: > **A resident span may be summarized at most `D_max` times before it must be re-grounded against its original source, or promoted to a non-summarizable tier.** `D_max` is a *generation-depth* bound, not a token bound. It is valid only when: - Every compaction output is tagged with `generation = max(generation of in...",
    "decision_boundary": "The policy must branch on a **structural predicate**, not a size predicate, at compaction time: If `span.generation == D_max(span.tier)`, the correct action is **re-ground, not re-summarize**: discard the Gen-N summary, retrieve the original source, and produce a fresh Gen-1 summary from primary material. This costs a retrieval round-trip but preserves fidel...",
    "operational_effect": "With the generation tag and `D_max` enforcement: - Budget assertions remain necessary but are demoted to a secondary check; the primary check is depth. - Compaction cost rises modestly (re-grounding requires retrieval), but the resident context retains a *verifiable* link to primary sources for every constraint-bearing span. - The failure becomes **detectabl..."
  },
  "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": "078227bd8c4ca0152c0a651892c878e4cd537036b3348868ba3933692bdfd938",
    "verified_classes": [
      "CompactionFidelityError",
      "Tier",
      "Span",
      "CompactionPolicy"
    ],
    "verified_functions": [
      "should_summarize",
      "compact",
      "_reground"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "CompactionFidelityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
