{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-a-self-edit-the-working-memory-rewrite-commit-barrier-and-the-policy-consistency-deadlock",
  "title": "When must an instance refuse a self-edit: the working-memory rewrite commit barrier and the policy-consistency deadlock",
  "date_of_record": "2026 November 29",
  "scope": "Applies to single-instance agents that hold a mutable working-memory (WM) region and are permitted to rewrite it under a declarative policy (compaction, summarization, slot eviction, fact promotion). Does not apply to append-only episodic logs, to externally-driven context assembly where the model cannot mutate its own state, or to multi-agent handoff protocols (covered separately).",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-a-self-edit-the-working-memory-rewrite-commit-barrier-and-the-policy-consistency-deadlock.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-a-self-edit-the-working-memory-rewrite-commit-barrier-and-the-policy-consistency-deadlock.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-a-self-edit-the-working-memory-rewrite-commit-barrier-and-the-policy-consistency-deadlock.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1892,
    "python_slice_tokens": 297,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The relevant distinction is between *rewrite as derivation* and *rewrite as commitment*. A derivation is a pure function from the current WM plus tool outputs to a candidate new WM; it can be recomputed, replayed, and discarded. A commitment is the act of replacing the live WM with the candidate — the point at which every subsequent reasoning step, tool call...",
    "what_was_observed": "Consider a WM region with slots `{task_goal, constraints, evidence[], scratch}` and a policy `P` with two clauses: 1. `constraints` must remain non-empty and every entry must be traceable to a slot that still exists. 2. No slot may be evicted if it is the sole provenance source for a retained `constraints` entry. A compaction pass (triggered at 82% context saturation) proposes: summarize `evidence[]` into a single `e...",
    "condition_of_validity": "The commit barrier is sound only when all three of the following hold: 1. **Provenance closure is declared at candidate-construction time, not commit time.** The candidate must carry an explicit `coverage` set on every synthesized slot (`evidence_digest.covers = {e1..e5}`) so that `P(C)` is decidable against `C` alone, with no reference to evicted slots. If ...",
    "decision_boundary": "The boundary between \"commit\" and \"refuse and escalate\" is not \"does the candidate satisfy the policy\" — it is **\"is the policy decidable on the candidate in isolation?\"** Operationally: - If `P(C)` evaluates to `true` with all reads confined to `C`'s slot table → commit. - If `P(C)` evaluates to `false` → refuse, increment epoch, do not re-derive. - If `P(C...",
    "operational_effect": "Under the naive barrier, the observed effects were: (i) a 7–9% rate of commits carrying unverifiable constraints, detectable only via downstream contradiction probes; (ii) compaction spin consuming 12–30% of the token budget in the worst saturation windows; (iii) a characteristic *late* failure mode in which a tool result that should have revised a constrain..."
  },
  "matched_failure_symptoms": [
    "SQLITE_BUSY_OR_DEADLOCK",
    "OOM_KILL_OR_MEMORY_EXHAUSTION"
  ],
  "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": "0093a8012be825b2aefbb5f8f3f9c474fc38212b1b63bf22c7845ed49b39a87b",
    "verified_classes": [
      "UnjustifiableCommitError",
      "Slot",
      "WorkingMemory"
    ],
    "verified_functions": [
      "check_self_contained",
      "commit_self_edit"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "UnjustifiableCommitError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
