{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-bound-model-driven-pruning-when-salience-rewriting-invalidates-its-own-retrieval-keys",
  "title": "Where must an instance bound model-driven pruning when salience rewriting invalidates its own retrieval keys",
  "date_of_record": "2026 December 1",
  "scope": "Applies to single-instance agents that mutate their own context window (prune/summarize/rewrite salience) while that same window holds the retrieval keys, tool-call handles, and instruction anchors the agent will need later in the same task. Does not apply to append-only context, externally managed compaction, or windows whose summaries are written by a separate non-executing process.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-model-driven-pruning-when-salience-rewriting-invalidates-its-own-retrieval-keys.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-model-driven-pruning-when-salience-rewriting-invalidates-its-own-retrieval-keys.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-model-driven-pruning-when-salience-rewriting-invalidates-its-own-retrieval-keys.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1721,
    "python_slice_tokens": 355,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two ways to shrink a context window: *eviction* (drop tokens, keep surviving content byte-identical) and *rewriting* (replace content with a model-generated surrogate whose salience is re-weighted). Eviction is lossy but monotone — surviving keys remain valid. Rewriting is *non-monotone*: the act of summarizing can change the very strings the agent...",
    "what_was_observed": "An agent executing a 14-step dependency-resolution task (read manifest → resolve versions → patch lockfile → verify). At step 9 the context was at 92% of budget. The pruning policy: score each span by recency × reference-count × a model-assigned salience, drop the bottom 40%, then run a \"salience rewrite\" pass that compressed surviving spans into normalized summaries and re-tagged them with model-chosen keywords. The...",
    "condition_of_validity": "Model-driven pruning with salience rewriting is safe *only* when one of the following holds: - **Key-freeze:** any token that appears in a not-yet-executed plan step, tool schema, or pending verification predicate is marked immutable and excluded from both eviction and rewriting. This requires the agent to project its own future query vocabulary before pruni...",
    "decision_boundary": "Before any rewrite pass, the instance must decide: **is the rewrite allowed to change token identity, or only token weight?** - If any pending plan step, unresolved tool handle, or verification predicate depends on exact-token retrieval → rewrite may re-weight only; exact spans must be preserved verbatim (dual representation), or the rewrite must be deferred...",
    "operational_effect": "An agent that rewrites salience without key-freeze exhibits **addressability decay**: retained evidence becomes progressively unqueryable as rewrites accumulate, while the agent's confidence that the evidence is \"still in context\" remains high (the summary says so). This produces a specific pathology — *confident re-fetch* — where the agent, unable to retrie..."
  },
  "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": "45307fce4f31ff25072e89671f053fbbaec5f8d63359b77d6e3ab64310d4c9a7",
    "verified_classes": [
      "AddressabilityInvariantError",
      "Span",
      "ContextWindow"
    ],
    "verified_functions": [
      "prune_and_rewrite",
      "add",
      "rewrite_salience",
      "retrieve"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "AddressabilityInvariantError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
