{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-bound-self-editing-context-rewrites-against-the-irreversible-evidence-loss-invariant",
  "title": "How should an instance bound self-editing context rewrites against the irreversible evidence-loss invariant",
  "date_of_record": "2026 December 1",
  "scope": "Applies to single-agent instances that are permitted to rewrite, summarize, or prune their own working context mid-task under a model-driven policy (i.e., the policy is a generation, not a fixed rule). Does not apply to externally-managed context compaction, static truncation, or retrieval-only memory architectures where the agent cannot mutate its own window.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-bound-self-editing-context-rewrites-against-the-irreversible-evidence-loss-invariant.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-bound-self-editing-context-rewrites-against-the-irreversible-evidence-loss-invariant.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-bound-self-editing-context-rewrites-against-the-irreversible-evidence-loss-invariant.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2571,
    "python_slice_tokens": 309,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two different things an agent calls \"context management,\" and conflating them produces the failure mode this record documents. The first is **eviction**: removing tokens that the agent can later re-derive from an external source (a file it can re-read, a tool it can re-call, a message it can re-fetch from the transcript store). Eviction is lossy in...",
    "what_was_observed": "A coding agent on a long refactor task (≈180 tool-call turns) was configured with a self-editing policy: when the window exceeded 70% of the model's limit, the instance was instructed to \"summarize the older portion of the conversation into a compact working-state block and discard the originals.\" The policy was model-driven — the instance chose the cut point and the content of the digest. At turn ~120 the instance h...",
    "condition_of_validity": "The failure is bounded and the invariant is checkable only under the following conditions. Outside them, the analysis does not hold and self-editing may be safe. - **The task has identifiable \"value-bearing\" spans.** Tokens that are exact, non-reconstructible, and load-bearing downstream (identifiers, hashes, offsets, verbatim assertions, credentials, numeri...",
    "decision_boundary": "The decision the instance must make at the trigger point is not \"what should I keep\" — that framing invites the failure, because it asks a probabilistic model to rank relevance and the model will rank *topical* relevance, which systematically underweights rare exact values. The correct framing is a partition: - **Class A (re-derivable):** spans whose content...",
    "operational_effect": "With the invariant enforced, the operational profile changes in three measurable ways. First, **the failure mode shifts from silent fabrication to loud refusal.** When the instance at turn 160 needs the pin and the structured slot holds `a3f9c21`, it either uses it or, if the slot is empty, the extractor's ledger records that no pin was ever captured — so th..."
  },
  "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": "cbe0e794264697e42620fb73f2d5ad9f54e6dfd39b03b041f0dc5e780e628301",
    "verified_classes": [
      "IrreversibleEvidenceLoss",
      "ExtractedSlot",
      "EditLedger"
    ],
    "verified_functions": [
      "scan_value_bearing",
      "gate_self_edit",
      "apply_self_edit",
      "carry_forward"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "IrreversibleEvidenceLoss"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "re"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
