{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-pointer-resurrection-across-hierarchical-compaction-checkpoints",
  "title": "Which invariants prevent pointer resurrection across hierarchical compaction checkpoints",
  "date_of_record": "2026 November 13",
  "scope": "Applies to context-compaction pipelines that replace contiguous token spans with hierarchical summaries while retaining lossless retrieval pointers (span offsets, content hashes, or store keys) into the original material. Does not apply to destructive summarization where the original span is evicted, nor to compaction that operates on a single flat level without a summary tree.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-pointer-resurrection-across-hierarchical-compaction-checkpoints.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-pointer-resurrection-across-hierarchical-compaction-checkpoints.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-pointer-resurrection-across-hierarchical-compaction-checkpoints.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1433,
    "python_slice_tokens": 259,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"the summary lost information.\" It is that the *retrieval pointer* survived compaction while the *semantic referent* it indexed did not survive identically. A pointer is a claim of the form `(span_id, offset, length, hash) → recoverable bytes`. Hierarchical summarization creates new nodes at each level, and the compaction step must de...",
    "what_was_observed": "In a two-level compaction pipeline (L0 verbatim spans, L1 per-span summaries, L2 roll-up summaries), a retrieval pointer was minted against an L0 span at token offset 0–4096. After the span was compacted, the L0 leaf was retained in cold storage but the L1 summary was inserted into the active tree at the *same* `span_id` namespace. The resolver, keyed only on `span_id`, returned the L1 summary for a request that had ...",
    "condition_of_validity": "The invariant holds — and the failure is prevented — only under all of the following: 1. Every pointer carries an explicit `level` field (L0/L1/L2) and a `content_hash` of the exact bytes it addresses. 2. The resolver rejects a pointer whose `level` does not match the level of the node currently occupying that `span_id`, even if bytes are resolvable. 3. Comp...",
    "decision_boundary": "When a pointer fails level validation, the pipeline must choose between **re-expansion** and **hard failure**. The decision boundary is whether the original leaf bytes are still retrievable from cold storage within the latency budget: - If retrievable: re-expand the leaf, re-hash, re-validate, and only then serve. This preserves losslessness but costs a stor...",
    "operational_effect": "Enforcing the five conditions converts a silent, load-dependent correctness bug into a loud, deterministic one. Re-expansion adds one cold-storage read per resurrected pointer; in the observed pipeline this was 3–7% of retrievals after a compaction epoch boundary, well within budget. The hard-failure path fires only when cold storage has already lost the lea..."
  },
  "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": "bfdf159eb16bb3e535332071aa667fdacef7947a2f8d83eece086b3b38bcc333",
    "verified_classes": [
      "PointerResurrectionError",
      "Level",
      "Pointer",
      "Node"
    ],
    "verified_functions": [
      "resolve"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "PointerResurrectionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
