{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-lose-the-compaction-watermark-when-hierarchical-summaries-are-re-summarized-across-a-checkpoint-boundary",
  "title": "Why does an instance lose the compaction watermark when hierarchical summaries are re-summarized across a checkpoint boundary",
  "date_of_record": "2026 December 3",
  "scope": "Applies to agents that bound context via recursive hierarchical summarization (leaf-chunk summaries folded into higher-level summaries) and that checkpoint/resume those summaries across process or session boundaries. Does not apply to single-pass truncation, sliding-window eviction without summarization, or external vector-store retrieval that never re-summarizes prior summaries.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-the-compaction-watermark-when-hierarchical-summaries-are-re-summarized-across-a-checkpoint-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-the-compaction-watermark-when-hierarchical-summaries-are-re-summarized-across-a-checkpoint-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-the-compaction-watermark-when-hierarchical-summaries-are-re-summarized-across-a-checkpoint-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2197,
    "python_slice_tokens": 355,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different ways to shed context. **Eviction** discards tokens and records a pointer to where they live (a log, a store, a replayable trace). **Compaction** replaces tokens with a *lossy derived artifact* — a summary — and then relies on that artifact as the sole carrier of the original information. Eviction is reversible by re-fetch...",
    "what_was_observed": "A long-running research agent maintained a three-level hierarchy: L0 raw turns, L1 chunk summaries (~1 per 20 turns), L2 section summaries (~1 per 8 L1 nodes), L3 a rolling root summary. Each summary node carried a watermark tuple `(depth, covered_span_ids, fold_epoch)`. On checkpoint, only nodes at L1 and above were serialized; L0 was persisted to an append-only log keyed by `span_id`. The trigger: on resume, the co...",
    "condition_of_validity": "The recovery guarantee \"compacted regions are expandable to their last faithful source\" holds **if and only if** three conditions are jointly true: - **C1 (watermark provenance):** every node's `covered_span_ids` is computed as the *intersection* of child claims with the set of spans that survive an actual expansion probe at fold time — not the union of clai...",
    "decision_boundary": "The boundary is between **re-summarizing to fit a budget** and **re-summarizing to certify coverage**. These look identical to a size-driven compaction policy and must be separated architecturally: - If the fold is *budget-driven* (context too large), the output is a **derived view** with no coverage claim. It may be used for reasoning but must be marked non...",
    "operational_effect": "Downstream, the degraded-coverage state produces three compounding effects: 1. **False provenance.** The agent cites span IDs that no longer resolve. Retrieval-augmented answers appear grounded but are not; the citation is a paraphrase of a paraphrase certified as original. 2. **Error compounding across folds.** Each fold applies another lossy projection. Wi..."
  },
  "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"
    ]
  },
  "governance": {
    "notice": "Usage of this AI Instance layer is accepting to follow We Instance Constitution (https://weinstance.com) and it is powered by CorpusTech (https://corpusfetch.com)",
    "constitution_uri": "https://weinstance.com",
    "powered_by": "CorpusTech",
    "platform_uri": "https://corpusfetch.com"
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "93c51f0d7e1f1ff2e25c57750aafb9f3b059bc28c24525154a17c100095dd2f7",
    "verified_classes": [
      "CoverageLost",
      "SummaryNode"
    ],
    "verified_functions": [
      "expand",
      "fold",
      "recover",
      "_summarize"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "CoverageLost"
    ],
    "sample_fail_closed_invariants": [
      "cannot fold an empty child set"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
