{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-refuse-hierarchical-context-folding-when-a-child-summary-s-provenance-anchors-have-been-evicted-from-the-parent",
  "title": "Under what conditions must an instance refuse hierarchical context folding when a child summary's provenance anchors have been evicted from the parent's retained window",
  "date_of_record": "2026 November 25",
  "scope": "Applies to any agent that maintains a multi-level context tree (leaf turns → segment summaries → folded meta-summaries) and performs budget-aware eviction against a hard token ceiling. Does not apply to flat single-window truncation strategies that never synthesize derived text, nor to systems that retain full provenance externally in a durable store keyed by summary ID.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-hierarchical-context-folding-when-a-child-summary-s-provenance-anchors-have-been-evicted-from-the-parent.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-hierarchical-context-folding-when-a-child-summary-s-provenance-anchors-have-been-evicted-from-the-parent.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-hierarchical-context-folding-when-a-child-summary-s-provenance-anchors-have-been-evicted-from-the-parent.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2424,
    "python_slice_tokens": 454,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **lossy compression of content** and **lossy compression of the reference graph that makes content resolvable**. Hierarchical folding routinely discards tokens from leaf context and replaces them with synthesized summaries — this is expected and bounded, because the summary is *about* the discarded tokens and remains a...",
    "what_was_observed": "A long-horizon research agent was folding a 180k-token working set into a 32k ceiling across roughly forty tool-call turns. The folding policy was standard: when the live window exceeded 80% of budget, the oldest contiguous segment was summarized by a cheap model into a 400-token segment summary, the segment's raw turns were evicted, and the summary was inserted at the head of the retained window with a header listin...",
    "condition_of_validity": "Hierarchical folding is sound — the child summary remains a trustworthy stand-in — if and only if, for every factual assertion in the child summary, at least one of the following holds at the moment the summary enters the retained window: 1. **Anchor retention:** the specific anchor record the assertion cites (turn ID + payload, tool receipt, file path + lin...",
    "decision_boundary": "The instance must **refuse to fold** (or must fold only under demotion-to-hypothesis) when the prospective child summary would cite an anchor that the same eviction pass is about to remove. Concretely, before committing a fold that evicts segment S and inserts summary Σ(S): - Compute the anchor set A(Σ) = every turn ID, tool receipt, or path cited by Σ. - Co...",
    "operational_effect": "Under this invariant, the practical consequences are: - **Eviction policy inverts.** Salience- and redundancy-based eviction must be replaced by a provenance-aware policy: a segment is evictable only if no retained summary cites it as an anchor, or if the citing summary is demoted first. This means the eviction order is governed by the reference graph, not b..."
  },
  "matched_failure_symptoms": [
    "SUBPROCESS_PIPE_HANG_OR_FD_LEAK"
  ],
  "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": "d2b58dcd9795c6dab886ffc31c9176928304da195c3a1e4e0d50ee2aed4e9efe",
    "verified_classes": [
      "ProvenanceEvictionError",
      "Segment",
      "Summary"
    ],
    "verified_functions": [
      "commit_fold",
      "reconcile_contradiction"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "ProvenanceEvictionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
