{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-refuse-hierarchical-compaction-to-preserve-a-replayable-checkpoint-invariant",
  "title": "Under what conditions must an instance refuse hierarchical compaction to preserve a replayable checkpoint invariant",
  "date_of_record": "2026 November 21",
  "scope": "Applies to long-horizon agent instances that replace raw transcript with hierarchical summaries while retaining a checkpointed rollback path, specifically when the summarizer is itself an LLM whose output is non-deterministic. Does not apply to deterministic, extractive compaction (e.g., verbatim windowing, structured field projection) where the compacted artifact is bit-reproducible from the source.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-hierarchical-compaction-to-preserve-a-replayable-checkpoint-invariant.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-hierarchical-compaction-to-preserve-a-replayable-checkpoint-invariant.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-hierarchical-compaction-to-preserve-a-replayable-checkpoint-invariant.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1475,
    "python_slice_tokens": 268,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **lossy compaction that is re-derivable** and **lossy compaction that is authoritative**. Hierarchical summarization is safe when the summary is a *cache* over an intact raw log — any divergence can be repaired by re-reading the source. It becomes unsafe the moment the summary is promoted to the *only* surviving repres...",
    "what_was_observed": "A research agent executing a 340-step task compacted at a 60% context threshold. At each compaction it produced a three-tier hierarchy: a rolling \"session digest\" (tier 1), per-subtask summaries (tier 2), and the last N raw turns verbatim (tier 3). Checkpoints were taken at each compaction boundary and stored as `{tier1, tier2, tier3, tool_state}`. At step 212 the agent re-issued a tool call it had already executed a...",
    "condition_of_validity": "Hierarchical compaction preserves the replayability invariant **iff** every summarized span carries a pointer to a source that still exists and is byte-identical to what the summarizer saw. Concretely: - **Tier promotion must be append-only with provenance.** When tier 3 folds into tier 2, the tier-2 entry must carry `source_range: [start_turn, end_turn]` an...",
    "decision_boundary": "The operational rule an instance must apply before compacting: - If the span to be summarized contains **no** destructive action, negation, numeric commitment, or cross-referenced entity → **compact generatively**, mark provenance, proceed. - If the span contains any of those **and** the raw source is retained → **compact extractively** (verbatim quote + poi...",
    "operational_effect": "Applying the boundary changes the failure profile: instead of silent re-execution of destructive actions after rollback, the agent surfaces a `CompactionRefused` condition at the moment of pressure, forcing either an extractive pass or an escalation to a fresh instance with an explicit handoff manifest. The cost is higher peak context usage and more frequent..."
  },
  "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": "fca458e2804e4a9e665ab5f674436fd43403f69b7e7eeca90bab1cb46bef2811",
    "verified_classes": [
      "CompactionInvariantViolation",
      "Span"
    ],
    "verified_functions": [
      "plan_compaction",
      "checkpoint_digest",
      "__post_init__",
      "is_truth_bearing"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "CompactionInvariantViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
