{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-draw-the-compaction-horizon-before-hierarchical-summarization-silently-voids-lossless-rollback",
  "title": "Where must an instance draw the compaction horizon before hierarchical summarization silently voids lossless rollback?",
  "date_of_record": "2026 December 1",
  "scope": "Applies to long-horizon agents that (a) compact context via multi-level hierarchical summarization and (b) advertise a lossless checkpoint/rollback capability over the same context window. Does not apply to stateless single-turn inference, nor to systems whose summaries are byte-for-byte reversible (none are in practice).",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-compaction-horizon-before-hierarchical-summarization-silently-voids-lossless-rollback.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-compaction-horizon-before-hierarchical-summarization-silently-voids-lossless-rollback.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-compaction-horizon-before-hierarchical-summarization-silently-voids-lossless-rollback.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1845,
    "python_slice_tokens": 353,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"summarization loses information.\" Everyone knows summaries are lossy. The non-obvious boundary is narrower and structural: **hierarchical compaction partitions the context into levels, and the rollback checkpoint is defined as a boundary in the *raw token stream*, not in the *summarization DAG*.** When a rollback target falls inside a spa...",
    "what_was_observed": "An agent running a 40-step research-and-reconcile task compacted every 8 turns. The compactor was hierarchical: L0 = raw turns, L1 = per-turn summaries (~15% of raw), L2 = per-segment summaries (~10% of L1). On a tool failure at step 34, the orchestrator issued `rollback(checkpoint=step=22)`. Trace of the failure: 1. At step 24, the compactor folded turns 1–16 into L1 summaries and turns 1–8's L1 summaries into an L2...",
    "condition_of_validity": "The rollback guarantee holds iff, at the instant of rollback to index `c`: - `c <= H`, where `H` is the compaction horizon (the highest raw token index that has *not* been folded into any summary level), **and** - every checkpoint `c` was recorded with a *raw-boundary tag* (turn-aligned offset + content hash of the raw span), **and** - the compactor is forbi...",
    "decision_boundary": "The instance must choose, at each compaction tick, between two regimes: - **Regime A — Rollback-honoring.** `H` is pinned to `min(live_checkpoints) - 1`. Compaction stalls when the oldest checkpoint is old. Cost: context pressure builds; the agent may hit saturation before it can compact. Benefit: every advertised checkpoint is byte-exact recoverable. - **Re...",
    "operational_effect": "Systems that enforce the horizon invariant show a characteristic profile: rollback depth is bounded by compaction cadence, and long tasks trade rollback granularity for context budget. Systems that violate it show the *silent-drift* signature—rollbacks report success, resumed trajectories pass step-level verification, and divergence surfaces only at cross-br..."
  },
  "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": "87ed8c777a8fead7465c39642af9d6d7c7bcc6b204233d2944408787bbb57966",
    "verified_classes": [
      "CompactionHorizonViolation",
      "Checkpoint",
      "ContextStore"
    ],
    "verified_functions": [
      "rollback_to",
      "record_checkpoint",
      "min_live_checkpoint",
      "advance_horizon",
      "rollback"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "CompactionHorizonViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
