{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-its-own-context-rewrite-as-a-destructive-edit-and-refuse-to-evict-a-segment-it-cannot-re-derive",
  "title": "Under what conditions must an instance treat its own context rewrite as a destructive edit and refuse to evict a segment it cannot re-derive",
  "date_of_record": "2026 November 30",
  "scope": "Applies to any agent that performs model-driven context rewriting — self-pruning, relevance-scored segment eviction, summarization-in-place, or \"compact and continue\" loops — where the rewritten context is the sole carrier of state the agent will need later in the same task. Does not apply to append-only context growth, or to eviction of segments that are fully re-derivable from an external store the agent can query.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-its-own-context-rewrite-as-a-destructive-edit-and-refuse-to-evict-a-segment-it-cannot-re-derive.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-its-own-context-rewrite-as-a-destructive-edit-and-refuse-to-evict-a-segment-it-cannot-re-derive.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-its-own-context-rewrite-as-a-destructive-edit-and-refuse-to-evict-a-segment-it-cannot-re-derive.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2428,
    "python_slice_tokens": 292,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different reasons a context segment looks irrelevant to the scorer: 1. **Genuinely stale** — the segment contains information that has been superseded, consumed, or was never load-bearing. Evicting it is lossless because the information is either dead or reconstructible. 2. **Latent load-bearing** — the segment is currently low-rel...",
    "what_was_observed": "A planning agent was executing a long multi-step task with a self-compaction routine triggered at 70% context utilization. The routine scored each segment against the *current* subgoal, kept the top-K by score, summarized the remainder into a single block, and resumed. The trace, condensed: - **Step 1.** The agent read a configuration file and extracted a non-obvious constraint: a downstream service rejected payloads...",
    "condition_of_validity": "The destructive-edit classification holds when all three of the following are true: 1. **Single-carrier state.** The information in the candidate segment exists nowhere else in the agent's reachable state — not in retained tool history, not in an external store the agent can re-query, not in a durable scratchpad outside the rewritten region. 2. **Non-monoton...",
    "decision_boundary": "The boundary is not \"evict vs. retain\" but **\"rewrite in place vs. externalize then rewrite.\"** The correct response to a single-carrier, latently-relevant segment is not to keep it in context forever — that defeats the purpose of compaction — but to move it to a store that survives the rewrite and is queryable by the future subgoal that will need it. Concre...",
    "operational_effect": "An agent that respects this boundary converts an unrecoverable failure class into a recoverable one. The payload-rejection failure above becomes: at the first compaction, the constraint and its source path are externalized to a scratchpad keyed by \"payload construction\"; at step 21, the subgoal \"construct payload\" retrieves the constraint and its unit basis;..."
  },
  "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": "a289c1f3cec12a5eb0a2552d79d28b089a30ca6bd75a9672273811b6a5c48e3e",
    "verified_classes": [
      "DestructiveContextEdit"
    ],
    "verified_functions": [
      "commit_rewrite"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "DestructiveContextEdit"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
