{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-a-self-rewrite-the-idempotence-orphan-boundary-in-policy-constrained-context-controllers",
  "title": "When must an instance refuse a self-rewrite: the idempotence-orphan boundary in policy-constrained context controllers",
  "date_of_record": "2026 November 24",
  "scope": "Applies to LLM instances that own a mutable context buffer and rewrite it through a constrained operator set (compress, dedupe, reorder, evict, annotate) under an external policy. Does not apply to append-only context logs, to human-authored prompt templates, or to rewrites that are applied by an out-of-band process the instance cannot observe.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-a-self-rewrite-the-idempotence-orphan-boundary-in-policy-constrained-context-controllers.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-a-self-rewrite-the-idempotence-orphan-boundary-in-policy-constrained-context-controllers.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-a-self-rewrite-the-idempotence-orphan-boundary-in-policy-constrained-context-controllers.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2251,
    "python_slice_tokens": 307,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A self-editing context controller is not a text transformation pipeline. It is a **transactional editor whose operator set is a partial function over policy-visible state.** The distinction that matters at the boundary is between a rewrite that is *policy-permitted* and a rewrite that is *policy-permitted and state-recoverable*. Most controllers implement th...",
    "what_was_observed": "A controller instance (call it C) ran a loop of `compress` and `evict` operators over a 96k-token working buffer with an external policy asserting three invariants: 1. Every retained claim must carry a `provenance_id` resolvable to a source span. 2. Every `provenance_id` in the buffer must be referenced by at least one retained claim (no dangling sources). 3. Total buffer must stay under a hard token ceiling. The `co...",
    "condition_of_validity": "The idempotence orphan arises only when all four of the following hold simultaneously. If any is absent, the failure is bounded by other mechanisms and this record does not apply. 1. **The operator set is not closed under the policy's re-check.** There exists a reachable buffer state B such that `policy(B)` is false and no operator `op` admitted by `policy` ...",
    "decision_boundary": "The instance must distinguish, at every rewrite admission, between *permitted* and *recoverable*. The decision rule: - **Admit** a rewrite iff `policy(B)` holds **and** `policy(op(B))` holds **and** there exists a rollback path from `op(B)` to some `B'` with `policy(B')` true using only operators the policy admits on `op(B)`. - **Refuse** the rewrite and emi...",
    "operational_effect": "Downstream, the orphan manifests as a **stalled instance with a valid-looking context**. Observability systems that sample buffer token counts and policy-violation counters see nothing wrong until the violation counter fires at the next commit boundary — which, if the controller commits lazily, may be never. The instance continues to consume tokens in its re..."
  },
  "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": "45cbf042c829adfe3fa6d89f73c46c5f0d8d1dfc7ad9d8d5042ba44c7b0e235f",
    "verified_classes": [
      "OrphanedRewriteError",
      "Buffer",
      "Operator"
    ],
    "verified_functions": [
      "policy_holds",
      "admitted_operators",
      "assert_recoverable",
      "rewrite"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "OrphanedRewriteError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
