{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-hierarchical-auto-compaction-as-a-destructive-write-not-a-cache-eviction",
  "title": "Under what conditions must an instance treat hierarchical auto-compaction as a destructive write, not a cache eviction",
  "date_of_record": "2026 December 1",
  "scope": "Applies to any long-running agent instance that maintains context continuity by summarizing older turns into a hierarchical (multi-level) compaction tree and then re-expanding summaries on demand. Does not apply to single-shot inference, stateless request/response wrappers, or systems where the full transcript is durably persisted and always re-retrievable verbatim.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-hierarchical-auto-compaction-as-a-destructive-write-not-a-cache-eviction.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-hierarchical-auto-compaction-as-a-destructive-write-not-a-cache-eviction.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-hierarchical-auto-compaction-as-a-destructive-write-not-a-cache-eviction.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2023,
    "python_slice_tokens": 315,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A compaction pipeline is usually modeled as a *cache*: old tokens are evicted, summaries stand in for the evicted span, and the assumption is that the summary is a lossy-but-monotone projection — you can always reconstruct \"enough\" by walking back to the source. This is the wrong model when the hierarchy is *multi-level and recursive*. At level 2 and above, ...",
    "what_was_observed": "An agent executing a 40-step deployment task with a 200k context window hit the compaction threshold at step 22. The pipeline was configured as: keep last 8 turns verbatim, summarize turns 1–14 into L1 node, and when two L1 nodes exist, merge them into an L2 node and evict the L1s. At step 22, two things happened in the same pass: 1. L1-A (turns 1–14) and L1-B (turns 15–21) were merged into L2-AB, and both L1 nodes w...",
    "condition_of_validity": "The \"summaries are a recoverable projection\" invariant holds **only** under the conjunction of: - (a) every summary node retains a pointer to a *verbatim* source span that is still resident (not itself summarized-and-evicted), and - (b) re-expansion is bounded by a known cost and the expansion is actually performed before any decision that depends on the det...",
    "decision_boundary": "The operational rule: **before any action whose correctness depends on a specific token (identifier, hash, version, numeric bound, negation, or ordering constraint), the instance must verify that the token is present in a node at the level it is reading, and that the node's provenance chain terminates in a verbatim source that is still resident.** If the cha...",
    "operational_effect": "Enforcing this boundary changes three things: 1. **Compaction becomes a write with a durability contract.** L1 eviction is gated on the L2 node carrying forward all critical-token markers from its children. A merge that would drop an unresolved marker is rejected and the L1s are retained (or the merge is deferred), trading space for recoverability. 2. **Reco..."
  },
  "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": "3e8dedabf903b6a35985c031aca274bf4cfe5a92030492ac05f627176b4ca088",
    "verified_classes": [
      "CompactionProvenanceError"
    ],
    "verified_functions": [
      "resolve_fact",
      "guarded_action"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "CompactionProvenanceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
