{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-refuse-model-driven-context-pruning-when-the-pruner-s-own-relevance-scores-are-computed-against-a-context-it-is-sim",
  "title": "In what scenarios must an instance refuse model-driven context pruning when the pruner's own relevance scores are computed against a context it is simultaneously mutating",
  "date_of_record": "2026 November 26",
  "scope": "Applies to any agent that performs self-editing of its own context window via a model-driven policy (LLM-scored relevance, summarization, or rewrite-in-place) where the scoring pass and the mutation pass share the same live buffer. Does not apply to pruning executed by an external orchestrator against an immutable snapshot, nor to append-only memory stores where deletes are deferred to a compaction phase.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-model-driven-context-pruning-when-the-pruner-s-own-relevance-scores-are-computed-against-a-context-it-is-sim.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-model-driven-context-pruning-when-the-pruner-s-own-relevance-scores-are-computed-against-a-context-it-is-sim.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-model-driven-context-pruning-when-the-pruner-s-own-relevance-scores-are-computed-against-a-context-it-is-sim.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2494,
    "python_slice_tokens": 495,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the pruner dropped something important.\" That is a quality problem, bounded by recall heuristics and recoverable by re-fetch. The failure is **score-mutation aliasing**: the relevance scorer reads context segments, emits scores, and the mutator then deletes or rewrites segments *while the scorer's own output is still being consumed downst...",
    "what_was_observed": "A long-running deploy agent (turn 140+ of a maintenance task) invoked its context-hygiene policy: score all 140 segments for relevance to the active goal, retain top-40 by score, summarize the remainder into a single digest block, rewrite the buffer. The scorer assigned the segment containing the target hostname a mid-tier score (0.41) because, at scoring time, the hostname was redundantly restated in three other seg...",
    "condition_of_validity": "Model-driven pruning is sound only under the **snapshot-and-freeze invariant**: the relevance scorer must evaluate an immutable snapshot of the buffer, the mutation must be applied to a *copy*, and the resulting context must be validated against a set of **retention obligations** that are computed independently of the scorer's own scores. The invariant fails...",
    "decision_boundary": "The agent must decide, before executing any self-edit pass, whether to **proceed**, **defer to external compaction**, or **refuse and escalate**. The decision is not a relevance judgment; it is a structural check on the editing topology. Proceed only when: snapshot is frozen, obligations are enumerated and pinned, summary-to-raw ratio is below threshold, and...",
    "operational_effect": "When the invariant is enforced, the observable effect is that context-hygiene passes become **conservative and slightly more expensive**, and deploy/review errors of the \"confidently wrong parameter\" class drop to near-zero because the ambiguity check blocks the specific mutation that creates them. The agent retains more raw segments than a pure relevance po..."
  },
  "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": "312dd8d0b91ed1e72020db240e7f4ef6897478723de3913e423f9ad6f958fd54",
    "verified_classes": [
      "PruneAliasingError",
      "ContextBuffer"
    ],
    "verified_functions": [
      "guarded_self_edit",
      "run_self_edit",
      "__init__",
      "summary_to_raw_ratio"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "PruneAliasingError"
    ],
    "sample_fail_closed_invariants": [
      "buffer generation advanced during scoring; scores are stale relative to the context they will be applied to"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
