{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-bound-self-rewrite-of-its-own-context-before-eviction-destroys-the-evidence-a-later-step-needs-to-verify-it",
  "title": "Where must an instance bound self-rewrite of its own context before eviction destroys the evidence a later step needs to verify it?",
  "date_of_record": "2026 November 29",
  "scope": "Applies to agents that hold the privilege of rewriting, summarizing, or evicting their own context window mid-task (model-driven compaction, scratchpad pruning, self-summarization). Does not apply to externally managed context assembly where an orchestrator, not the model, owns eviction decisions.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-self-rewrite-of-its-own-context-before-eviction-destroys-the-evidence-a-later-step-needs-to-verify-it.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-self-rewrite-of-its-own-context-before-eviction-destroys-the-evidence-a-later-step-needs-to-verify-it.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-self-rewrite-of-its-own-context-before-eviction-destroys-the-evidence-a-later-step-needs-to-verify-it.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1533,
    "python_slice_tokens": 398,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the summary was wrong.\" It is that **the act of rewriting the context destroys the referent that the rewrite is supposed to represent.** When a model summarizes its own scratchpad to reclaim tokens, it produces a *lossy, unverifiable* artifact and then evicts the *lossless* source. A downstream step that later needs to check a claim (a to...",
    "what_was_observed": "Trace from a real compaction policy (`evict when utilization > 0.80, summarize oldest 40% of turns`): 1. Turn 12 records a tool result: `invoice_total = 14820.00, currency=EUR`. 2. Utilization hits 0.81. Model-driven compactor rewrites turns 1–14 into: *\"Earlier: retrieved invoice, total was roughly 14.8k EUR.\"* 3. Originals evicted. No pointer retained. 4. Turn 31: an auditor sub-step is asked to confirm the total a...",
    "condition_of_validity": "The self-rewrite is **safe** only when all three hold: - **Re-derivability:** the evicted span is addressable by a stable handle (a store key, turn ID, or content hash) that the model can re-fetch on demand. The summary carries the handle, not just the gist. - **Fidelity tagging:** the summary is marked as *derived* (not *observed*), so any downstream verifi...",
    "decision_boundary": "The instance must **refuse to evict** — and instead escalate to external storage or halt — when the candidate span contains a value that a *future* step is contracted to verify. Operationally: - If the span holds a tool result, a signed assertion, a numeric literal, or a decision record → **do not summarize-and-drop; summarize-and-pointer.** - If the span ho...",
    "operational_effect": "Enforcing the pointer invariant changes the failure signature from *silent wrong-answer* to *loud re-fetch*. The agent either retrieves the original (correct) or raises a `ContextEvictionViolation` when the pointer is unreachable (visible, bounded). The cost is one retrieval round-trip per verified claim; the benefit is that verification can never be satisfi..."
  },
  "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": "1ccdd17ed2168cb2ed0e427bdee5523607e0a22c0d89657197622f40e2fa02f3",
    "verified_classes": [
      "ContextEvictionViolation",
      "SpanKind",
      "Span",
      "ContextWindow"
    ],
    "verified_functions": [
      "_verification_obligated",
      "compact",
      "verify_against"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ContextEvictionViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
