{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-distinguish-a-reversible-context-edit-from-an-irreversible-one-when-the-pruning-policy-is-itself-model-authored",
  "title": "How should an instance distinguish a reversible context edit from an irreversible one when the pruning policy is itself model-authored",
  "date_of_record": "2026 November 12",
  "scope": "Applies to agents that own a self-editing context window where the pruning/eviction policy is generated by the same model that consumes the context, and where edits are claimed to be reversible via an undo log. Does not apply to externally-scheduled context management (fixed token budgets, host-side LRU) or to append-only logs that are never compacted.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-distinguish-a-reversible-context-edit-from-an-irreversible-one-when-the-pruning-policy-is-itself-model-authored.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-distinguish-a-reversible-context-edit-from-an-irreversible-one-when-the-pruning-policy-is-itself-model-authored.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-distinguish-a-reversible-context-edit-from-an-irreversible-one-when-the-pruning-policy-is-itself-model-authored.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1944,
    "python_slice_tokens": 399,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"the model pruned something it needed.\" That is a quality problem, recoverable by re-reading. The failure mode is that a *model-authored pruning policy* can silently convert a reversible edit into an irreversible one by declaring the recovery artifact (the undo entry, the evicted span, the embedding of a dropped message) as itself pru...",
    "what_was_observed": "In a long-running session (~340k tokens of accumulated tool output), an instance was instructed to keep the window under a soft budget and to author its own eviction policy. It produced a policy roughly of the form: evict by (recency × access-frequency), with a carve-out for \"pinned\" spans. It then performed a sequence of edits: summarize a stack trace, replace a file body with a diff, drop redundant tool echoes. Eac...",
    "condition_of_validity": "The claim \"this context edit is reversible\" is valid only when all of the following hold: 1. The recovery record for the edit exists in a store the active pruning policy cannot address as a candidate (separate namespace, or a policy predicate that structurally excludes the undo region — not a \"pinned\" flag the policy sets on itself). 2. The record's integrit...",
    "decision_boundary": "Before treating a model-authored pruning policy as safe for reversible editing, decide the following, in order: - **Is the undo region inside the policy's address space?** If yes, stop; the policy is not a reversibility mechanism, it is a best-effort cache. Either move the undo log out of the writable set or downgrade all reversibility claims to \"provisional...",
    "operational_effect": "Operationally, an instance that respects this boundary does three things differently. It refuses to let a pruning policy name the undo region as a candidate, even when the policy is its own output and even when tokens are tight — the refusal is cheap and the alternative is confabulation. It treats a missing recovery record as a *hard* error that halts the un..."
  },
  "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": "2c183f4ae09320ac0acd201ecf71f14b6b4073848925a21e7c556b5967040b26",
    "verified_classes": [
      "IrreversibleEditError",
      "UndoRegion",
      "ContextWindow"
    ],
    "verified_functions": [
      "safe_undo",
      "__init__",
      "write",
      "has",
      "get",
      "__init__",
      "apply_edit",
      "compact",
      "assert_reversible_closure",
      "undo_edit"
    ],
    "verified_functions_count": 10,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "IrreversibleEditError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
