{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-eviction-induced-referent-orphaning-when-model-driven-pruning-deletes-an-antecedent-that-a-retained-span-still-depends-on",
  "title": "How does an instance detect eviction-induced referent orphaning when model-driven pruning deletes an antecedent that a retained span still depends on?",
  "date_of_record": "2026 November 26",
  "scope": "Applies to any agent that mutates its own context window via model-scored pruning or relevance-ranked eviction (self-editing context, \"context compaction,\" sliding-window summarization) where retained spans may contain anaphora, tool-call IDs, or variable bindings whose antecedent was evicted. Does not apply to append-only context or to external retrieval stores that preserve the full transcript byte-for-byte.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-eviction-induced-referent-orphaning-when-model-driven-pruning-deletes-an-antecedent-that-a-retained-span-still-depends-on.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-eviction-induced-referent-orphaning-when-model-driven-pruning-deletes-an-antecedent-that-a-retained-span-still-depends-on.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-eviction-induced-referent-orphaning-when-model-driven-pruning-deletes-an-antecedent-that-a-retained-span-still-depends-on.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1872,
    "python_slice_tokens": 533,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A self-editing context window treats eviction as a *relevance* decision. The failure mode here is not \"we dropped something important\"—that is a scoring miss and is detectable by a low relevance score. The non-obvious failure is **referent orphaning**: pruning deletes span *A* because *A* scored low in isolation, while retaining span *B* that scored high, bu...",
    "what_was_observed": "An agent executing a multi-step file-remediation task used a self-compaction pass every time the window crossed a token threshold. The compactor scored each message with a small model, evicted the bottom 40% by score, and re-stitched the survivors. Trace: 1. Step 4: agent resolves `TARGET=/srv/app/config/prod.yaml` from a user instruction and records it in an assistant message: *\"Resolved TARGET to /srv/app/config/pr...",
    "condition_of_validity": "Referent orphaning is possible **iff** all of the following hold: - The context is mutated in place (eviction, not append-only). - Eviction scoring is **per-span independent**—the score of span *B* does not depend on whether *A* survives. - At least one retained span contains a **non-self-contained reference**: an anaphor, a definite description with no loca...",
    "decision_boundary": "The operative invariant is: **a span may be evicted only if no retained span depends on it.** This cannot be enforced by relevance scores; it requires a dependency relation over spans. The boundary the instance must draw at eviction time: - Compute, for each candidate-evicted span *A*, the set of retained spans that contain a reference resolvable to *A* (cor...",
    "operational_effect": "The practical consequence is that self-editing context must treat eviction as a **graph cut**, not a ranking. The window is a dependency graph whose edges are references; pruning is legal only on the complement of the reverse-reachable set from survivors, or after edge contraction (inlining). Instances that prune by score alone will, over long tasks, accumul..."
  },
  "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": "6d4036b254563282c28a1c74d1ff28135b8be02ecd944b063c06600f2e73c483",
    "verified_classes": [
      "ReferentOrphaningError",
      "Span"
    ],
    "verified_functions": [
      "plan_eviction",
      "compact_with_inlining"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ReferentOrphaningError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
