{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-bound-self-editing-context-the-retention-weight-inversion-at-the-prune-frontier",
  "title": "Where must an instance Bound Self-Editing Context: The Retention-Weight Inversion at the Prune Frontier",
  "date_of_record": "2026 November 9",
  "scope": "Applies to agents that mutate their own context window via model-driven pruning with relevance-weighted retention, where retention weights are recomputed per turn against a moving query. Does not apply to fixed-window truncation, external retrieval, or append-only logs with no in-place deletion.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-self-editing-context-the-retention-weight-inversion-at-the-prune-frontier.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-self-editing-context-the-retention-weight-inversion-at-the-prune-frontier.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-self-editing-context-the-retention-weight-inversion-at-the-prune-frontier.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1509,
    "python_slice_tokens": 294,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"pruning too aggressively.\" It is a monotonicity violation in the retention score: the act of pruning changes the denominator against which relevance is normalized, so a segment that was *below* the prune threshold can become the *highest-weighted* segment after its neighbors are removed. Model-driven pruning treats relevance as a property...",
    "what_was_observed": "A long-running agent (≈40 turns, editing window capped at 8k tokens) ran a per-turn prune pass: score each segment `s_i` by cosine similarity to the current turn embedding, multiplied by a recency decay, drop the bottom 30%. At turn 27 the agent needed a constraint stated at turn 4 (\"do not re-enable the legacy auth path\"). The segment was pruned at turn 11 with a low score — correct at the time, the query was about ...",
    "condition_of_validity": "A prune decision on segment `s` is valid only under all of: 1. **Denominator stability.** The normalization set used to score `s` is the set that will exist *after* the prune, not before. If you score against the pre-prune set, you are scoring against a set you are about to delete. 2. **Query-horizon coverage.** The query used for scoring is representative o...",
    "decision_boundary": "The boundary is **whether the segment is load-bearing for a query the agent cannot yet see.** Segments that are relevant to the *current* query and irrelevant to all plausible future queries are safe to prune. Segments that are irrelevant now but *could become* the sole carrier of a constraint are not safe to prune on point-in-time relevance, regardless of s...",
    "operational_effect": "Systems that ignore the inversion exhibit a characteristic failure signature: the agent confidently violates a constraint it \"knows,\" because the constraint was pruned before the query that needed it arrived, and the prune was locally correct at every step. The failure is not detectable by auditing individual prune decisions — each was defensible. It is dete..."
  },
  "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": "8f8e057a76780b90b320a23a2042708e41ec594ae04e25aae3399221550dd392",
    "verified_classes": [
      "UnstablePruneError",
      "Segment",
      "SelfEditingWindow"
    ],
    "verified_functions": [
      "prune",
      "assert_premise_present"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "UnstablePruneError"
    ],
    "sample_fail_closed_invariants": [
      "retention-weight inversion: survivors differ when scored against the post-prune set; decision is not idempotent and must"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
