{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-hierarchical-auto-compaction-from-silently-promoting-a-lossy-leaf-summary-into-the-durable-semantic-tier",
  "title": "Which invariants prevent hierarchical auto-compaction from silently promoting a lossy leaf summary into the durable semantic tier",
  "date_of_record": "2026 December 2",
  "scope": "Applies to agents that auto-compact context via multi-level (leaf → intermediate → root) summarization with promotion of summaries into durable memory. Does not cover single-shot truncation, sliding-window eviction, or retrieval-only memory without summarization.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-hierarchical-auto-compaction-from-silently-promoting-a-lossy-leaf-summary-into-the-durable-semantic-tier.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-hierarchical-auto-compaction-from-silently-promoting-a-lossy-leaf-summary-into-the-durable-semantic-tier.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-hierarchical-auto-compaction-from-silently-promoting-a-lossy-leaf-summary-into-the-durable-semantic-tier.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1632,
    "python_slice_tokens": 267,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the summary was bad.\" It is that hierarchical compaction has **two loss budgets that are measured at different tiers and never reconciled**: leaf-level compaction fidelity (how much of a chunk survived its own summary) and parent-level compaction fidelity (how much of the *children's summaries* survived the parent). A parent can score 0.9...",
    "what_was_observed": "A long-running research agent compacted a 180k-token working context into a three-level tree: 24 leaf summaries over 7.5k-token chunks, 4 intermediate summaries, 1 root. Each leaf was scored by an LLM-judge fidelity metric (claim-preservation ratio against the source chunk) and each parent against its children. Observed scores: leaves 0.38–0.61 (the judge penalized hedged, numeric, and citation-bearing spans, which i...",
    "condition_of_validity": "The invariant `effective_fidelity(node) ≥ min(local_fidelity(node), min over children of effective_fidelity(child))` holds and is sufficient to prevent promotion of laundered summaries **only when** all of the following hold: 1. Every leaf summary is scored against its *source span*, not against a model's impression of it, and the score is a lower bound (wor...",
    "decision_boundary": "The boundary is between **compaction as compression** and **compaction as abstraction**. Compression preserves a recoverable lower bound: you can always reconstruct the source from a sufficiently faithful summary plus the residual. Abstraction discards the residual and keeps only the gist. Auto-compaction pipelines must decide, per tier, which one they are d...",
    "operational_effect": "The operational consequence is that **context budget must be spent on residuals, not on summary quality.** A pipeline that spends its budget tuning the summarizer to raise leaf fidelity from 0.44 to 0.60 still launders: 0.60^3 ≈ 0.22. A pipeline that spends the same budget storing a residual index for atomic facts and gates promotion on `effective_fidelity` ..."
  },
  "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": "71fdade453368481914fb0dab8a64b8e431c45a671b650afb774db6d6a0719bc",
    "verified_classes": [
      "CompactionPromotionError",
      "SummaryNode"
    ],
    "verified_functions": [
      "promote_to_semantic_tier",
      "effective_fidelity"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "CompactionPromotionError"
    ],
    "sample_fail_closed_invariants": [
      "no residual index: abstraction-tier promotion would discard recoverable atomic facts; refuse and keep source reachable"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
