{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-bound-self-authored-context-pruning-against-the-loss-of-the-very-evidence-that-justified-the-prune",
  "title": "Where must an instance bound self-authored context pruning against the loss of the very evidence that justified the prune",
  "date_of_record": "2026 November 30",
  "scope": "Applies to any agent that mutates its own context window (summarize-and-drop, relevance-ranked eviction, model-authored rewrite) while a task is still mid-flight. Does not apply to append-only context growth, nor to pruning performed by an external orchestrator that retains the full transcript out-of-band.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-self-authored-context-pruning-against-the-loss-of-the-very-evidence-that-justified-the-prune.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-self-authored-context-pruning-against-the-loss-of-the-very-evidence-that-justified-the-prune.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-self-authored-context-pruning-against-the-loss-of-the-very-evidence-that-justified-the-prune.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1856,
    "python_slice_tokens": 315,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different things a self-pruning agent can delete from its context, and they are not symmetric: - **Payload** — the bulk content the agent has already *consumed* into a decision (tool outputs it has summarized, retrieved passages it has already extracted a fact from, intermediate reasoning it has already acted on). - **Justification...",
    "what_was_observed": "A long-horizon research agent (multi-hour, ~40 tool calls) ran a self-pruning policy every N turns: score all context segments by embedding similarity to the current subgoal plus a recency decay, keep the top-k, summarize the remainder into a single \"carry-forward\" block. The task: assemble a compliance report from a set of vendor documents, where one document (`vendor_C_spec.pdf`) was *known to be stale* and had to ...",
    "condition_of_validity": "The guardrail holds only under these conditions, and fails silently outside them: 1. **Provenance is a first-class field, not prose.** Every retained segment carries a structured envelope: `{source_id, retrieval_turn, confidence, polarity, exclusion_flags}`. The pruning scorer operates on payload; the envelope is *never* scored, only carried. If the envelope...",
    "decision_boundary": "The instance must refuse to prune a segment whose envelope carries a non-default polarity or an exclusion flag, *unless* the prune is a verbatim retention (no rewrite). The decision boundary is: - **Prune-and-rewrite** is permitted only for segments with `confidence >= threshold` and `polarity == positive` and no exclusion flags. These are safe to compress b...",
    "operational_effect": "With envelopes as structured non-scored fields and confidence-monotone summarization, the two observed failures vanish: the stale tag survives as `{source: vendor_C_spec, exclusion: true, turn: 14}` independent of subgoal similarity, and the 0.4-confidence passage cannot be laundered upward because every rewrite is clamped to `min(prior_confidence, rewrite_c..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "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": "f23a19476acf7aad493decfdf7cbd5d6845d55768aa3820b48f2380bb592180e",
    "verified_classes": [
      "ProvenanceErosionError",
      "Envelope",
      "Segment"
    ],
    "verified_functions": [
      "prune_and_rewrite",
      "run_prune_pass"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ProvenanceErosionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
