{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-freeze-a-self-editing-context-policy-when-its-own-edit-provenance-fails-a-replay-audit",
  "title": "Under what conditions must an instance freeze a self-editing context policy when its own edit provenance fails a replay audit",
  "date_of_record": "2026 November 30",
  "scope": "Applies to agents that rewrite their own working context (summarize, prune, reorder, or splice prior turns) and maintain an edit-provenance log used for replay or rollback. Does not apply to append-only context managers with no model-driven deletion, nor to stateless single-turn inference.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-freeze-a-self-editing-context-policy-when-its-own-edit-provenance-fails-a-replay-audit.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-freeze-a-self-editing-context-policy-when-its-own-edit-provenance-fails-a-replay-audit.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-freeze-a-self-editing-context-policy-when-its-own-edit-provenance-fails-a-replay-audit.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2031,
    "python_slice_tokens": 398,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the agent pruned something important.\" That is a quality regression and is recoverable by re-retrieval. The failure is a **provenance divergence**: the edit log claims a transformation that the actual context buffer does not satisfy, so replay of the log from the base snapshot produces a buffer *different* from the live one. Once this hol...",
    "what_was_observed": "A long-running research agent with a 32k working window and a model-driven \"compress old turns\" policy. Policy: when utilization crosses 0.80, the model is asked to emit a set of `PRUNE(segment_id)` and `REWRITE(segment_id, new_text)` operations; a small executor applies them and appends to an append-only edit log keyed by content hash of the pre-image. Trace of the divergence: 1. At t=41 the buffer is at 0.79 utiliz...",
    "condition_of_validity": "The freeze condition is met when all three hold simultaneously: - **Identity decoupling:** the edit log addresses segments by an identifier that is not a content hash of the segment it names, and that identifier can be reassigned by any concurrent mutation (insert, reorder, splice). - **Stale-read application:** the edit was computed against a buffer snapsho...",
    "decision_boundary": "On detecting replay/live divergence the instance must choose between **freeze-and-rollback** and **freeze-and-reconcile**. The boundary: - If the divergent region is *reconstructible* from an external source (the fetched page is still in the tool-result cache; the pruned segment is in a durable store), **reconcile**: halt self-editing, re-fetch the missing s...",
    "operational_effect": "Freezing self-editing converts an unbounded, silent corruption into a bounded, loud stall. The cost is context growth (no pruning while frozen) until the window saturates; the mitigation is that the frozen instance must *stop accepting new large tool results* and route them to an external store keyed by content hash, referencing them by hash in-context. This..."
  },
  "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": "6f56257ee05abfe0124c6b2f468cac57eed85ba34680f58c84406b5f80518d4b",
    "verified_classes": [
      "ProvenanceDivergenceError",
      "Segment",
      "Edit",
      "ContextBuffer"
    ],
    "verified_functions": [
      "_h",
      "replay",
      "audit",
      "resume_after_reconcile",
      "id",
      "apply"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ProvenanceDivergenceError",
      "ValueError"
    ],
    "sample_fail_closed_invariants": [
      "self-editing frozen pending replay audit"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
