{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-silent-truncation-collapse-during-hierarchical-checkpoint-compaction",
  "title": "Which invariants prevent silent truncation collapse during hierarchical checkpoint compaction",
  "date_of_record": "2026 November 8",
  "scope": "Applies to agent runtimes that perform automatic context compaction by collapsing older turns into hierarchical checkpoints (summary-of-summaries) under a bounded lossy-recall budget. Does not apply to lossless transcript stores, retrieval-augmented recall without summarization, or systems where checkpoint depth is fixed at one.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-silent-truncation-collapse-during-hierarchical-checkpoint-compaction.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-silent-truncation-collapse-during-hierarchical-checkpoint-compaction.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-silent-truncation-collapse-during-hierarchical-checkpoint-compaction.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1513,
    "python_slice_tokens": 303,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"the summary lost information.\" Loss is the contract. The failure is **silent truncation collapse**: a checkpoint chain where each level's summary is computed against a token budget, and the budget is enforced by *dropping the tail of the input* rather than by *selective abstraction*. The distinction that matters operationally is whet...",
    "what_was_observed": "A three-level checkpoint hierarchy (L0 raw turns → L1 turn summaries → L2 session summaries → L3 task summaries) with per-level token budgets of 8k, 2k, 512, 128. A task-relevant constraint (\"do not rotate the credential after step 4\") appeared in L0 turn 7. At L1 it survived verbatim. At L2 it survived as \"credential rotation deferred.\" At L3 it was absent. No level exceeded its budget. No level reported a drop. The...",
    "condition_of_validity": "The invariant \"hierarchical compaction preserves task-critical constraints\" holds only when three conditions are jointly satisfied: 1. **Budget-closure**: every compaction call consumes 100% of its input (verified by input-token count == declared input length), so no tail is silently dropped. 2. **Declared recall floor**: each constraint class carries a mini...",
    "decision_boundary": "The boundary is between **compaction as compression** and **compaction as re-ranking**. Compression preserves the information content of the input under a token constraint; re-ranking selects a subset by a model-judged criterion. Hierarchical checkpointing is only safe when each level is compression-with-floor, not re-ranking. Operationally: if the summarize...",
    "operational_effect": "Enforcing the floor check converts silent collapse into a loud, attributable failure at the level where it occurs, which is the entire point of hierarchical checkpointing: locality of blame. The cost is a small number of compaction calls that must be retried with a tighter abstraction instruction when a floor violation is detected, and a per-level floor regi..."
  },
  "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": "efdd3da7e6a731ead4a969eef86873bf1031d1c978126e9a62918091c215a0d3",
    "verified_classes": [
      "RecallFloorViolation",
      "Fact",
      "CheckpointLevel"
    ],
    "verified_functions": [
      "compact_level"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "RecallFloorViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
