{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-s-self-editing-context-policy-silently-resurrect-evicted-facts-when-relevance-scores-are-recomputed-against-a-stale-query-vector",
  "title": "Why does an instance's self-editing context policy silently resurrect evicted facts when relevance scores are recomputed against a stale query vector",
  "date_of_record": "2026 November 23",
  "scope": "Applies to agents that maintain a mutable working context via self-editing policies—relevance-scored eviction, compaction, and rewrite—where the scoring function depends on a query or task vector that the agent itself can update mid-run. Does not apply to append-only context logs or externally-managed retrieval where the query vector is fixed per turn.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-s-self-editing-context-policy-silently-resurrect-evicted-facts-when-relevance-scores-are-recomputed-against-a-stale-query-vector.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-s-self-editing-context-policy-silently-resurrect-evicted-facts-when-relevance-scores-are-recomputed-against-a-stale-query-vector.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-s-self-editing-context-policy-silently-resurrect-evicted-facts-when-relevance-scores-are-recomputed-against-a-stale-query-vector.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1702,
    "python_slice_tokens": 290,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not eviction being too aggressive or too lax. It is the **decoupling of eviction decisions from rewrite-time scoring provenance**. A relevance-scored eviction policy makes a *point-in-time* judgment: at step *t*, fact *f* scores below threshold τ against query vector *q_t*, so *f* is removed. The invariant that operators assume holds—and that ...",
    "what_was_observed": "A long-horizon planning agent used a self-editing context manager with three operations: `score(q, facts)`, `evict(below=τ)`, and `compact()` which rewrote the task query when the plan's subgoal shifted. The eviction ledger stored `{fact_id, embedding, evicted_at_step, score_at_eviction}`. Compaction rewrote `q` but did not clear or re-baseline the ledger—the ledger's embeddings were frozen at eviction time. Trace ac...",
    "condition_of_validity": "The resurrection is only possible when all three hold simultaneously: - **Ledger persistence across query rewrites.** If `compact()` clears the ledger or re-baselines every entry's embedding against the new query at rewrite time, the stale-embedding path closes. - **Re-admission logic keyed on recomputed score rather than eviction provenance.** The bug is th...",
    "decision_boundary": "The operator must choose between two coherent policies, and the choice is not free: - **Strict monotonic eviction.** Evicted facts are never re-admitted from the ledger; the ledger is write-only audit data. Re-admission happens *only* via fresh retrieval from the source store, which re-embeds against the current query and stamps new provenance. Cost: legitim...",
    "operational_effect": "The downstream effect is not a crash but a **reasoning divergence that is internally consistent**. Because *F12* is restored without provenance, every subsequent step reasons over it as ground truth. The agent cannot detect the error by introspection—the fact is in context, scores well, and is semantically plausible. Detection requires an external auditor re..."
  },
  "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": "a3cdc267fe17937842991050c8e65e07244f7f028ed0edcefe7369e3e4e28045",
    "verified_classes": [
      "ContextRewriteInconsistency",
      "EvictionLedger"
    ],
    "verified_functions": [
      "compact_and_verify",
      "record"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ContextRewriteInconsistency"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
