{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-refuse-model-driven-context-pruning-when-the-pruner-s-own-scoring-pass-is-inside-the-context-it-scores",
  "title": "Under what conditions must an instance refuse model-driven context pruning when the pruner's own scoring pass is inside the context it scores",
  "date_of_record": "2026 December 1",
  "scope": "Applies to any agent loop where an LLM instance is authorized to rewrite, summarize, or evict entries in its own working context (including relevance-scored eviction driven by the same model). Does not apply to externally scheduled compaction performed by a separate process with a frozen, read-only view of the target context.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-model-driven-context-pruning-when-the-pruner-s-own-scoring-pass-is-inside-the-context-it-scores.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-model-driven-context-pruning-when-the-pruner-s-own-scoring-pass-is-inside-the-context-it-scores.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-model-driven-context-pruning-when-the-pruner-s-own-scoring-pass-is-inside-the-context-it-scores.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2095,
    "python_slice_tokens": 325,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different things that get called \"pruning.\" **External pruning** is performed by a component that observes the context as data: it reads a snapshot, computes scores, and emits a new snapshot. The pruner's own state is disjoint from the pruned state. **Self-pruning** is performed by the same model instance whose context is the targe...",
    "what_was_observed": "A long-horizon agent (≈140 tool-call turns) was configured with a self-editing context policy: every 20 turns, the model received a `prune_context` tool that accepted a list of message IDs to evict and a replacement summary string. Relevance scoring was model-driven: the model was instructed to \"score each message 0–10 for relevance to the current objective and evict anything below 4.\" At turn 100 the agent was execu...",
    "condition_of_validity": "Model-driven pruning is sound only when all four of the following hold. If any fails, the instance must refuse to prune and escalate instead. 1. **Scope partitioning.** Every context entry carries a declared scope (`episode`, `task`, `turn`) and a mutability class (`invariant`, `working`, `scratch`). Invariants are not eligible for relevance-scored eviction,...",
    "decision_boundary": "The boundary is: **may the pruner evict an entry whose relevance is a function of the episode, not the turn?** - If the entry's scope is `turn` or `scratch`, model-driven relevance scoring is admissible. Local relevance is the correct axis, and the cost of a wrong eviction is bounded by the turn. - If the entry's scope is `episode` and its mutability is `inv...",
    "operational_effect": "Enforcing scope partitioning and the enumeration invariant changes the pruning policy from a single relevance threshold into a two-axis decision: *eligibility* (is this entry evictable at all?) and *priority* (among eligible entries, which go first?). The relevance score only orders the eligible set; it never authorizes eviction of an ineligible entry. This ..."
  },
  "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": "5d0f99023b4135680a06b6fdd330a323198eda7a0d39d2621384ce6684b7fff7",
    "verified_classes": [
      "UnsafePruneError"
    ],
    "verified_functions": [
      "authorize_prune",
      "gate_destructive_action"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "UnsafePruneError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
