{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-refuse-an-invariant-preserving-self-edit-of-its-own-context-policy",
  "title": "Under what conditions must an instance refuse an invariant-preserving self-edit of its own context policy",
  "date_of_record": "2026 December 1",
  "scope": "Applies to agents that carry a declarative context-management policy (retention windows, eviction rules, summarization triggers, retrieval quotas) as part of their own live state, and that may rewrite that policy mid-episode using operators claimed to preserve a set of invariants. Does not apply to policies fixed at deploy time, nor to offline policy tuning where the rewrite is validated against a replay corpus before activation.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-an-invariant-preserving-self-edit-of-its-own-context-policy.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-an-invariant-preserving-self-edit-of-its-own-context-policy.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-an-invariant-preserving-self-edit-of-its-own-context-policy.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2247,
    "python_slice_tokens": 322,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the agent rewrote its policy badly.\" It is that a rewrite operator can be *locally* invariant-preserving on every term it touches while being *globally* non-preserving because the invariant set is stated over the policy's fixed point rather than over its syntactic form. An operator that provably preserves `I(P)` for each clause of `P` doe...",
    "what_was_observed": "An instance running a long tool-loop episode held a policy with four clauses: (1) pin the system prompt and the current task objective; (2) evict lowest-scoring context units when utilization exceeds 0.85; (3) summarize any unit older than 40 turns into a 200-token digest; (4) reserve 15% of the window for retrieval refill. At turn 61, utilization hit 0.86. The instance, reasoning that digests were cheaper than raw u...",
    "condition_of_validity": "A self-edit is admissible only when the operator's preservation proof is stated over the runtime's closure, not over the policy's surface. The precise condition: > An operator `op` is admissible on policy `P` with invariant set `I` iff for every context state `C` reachable under `P`, `I(C)` holds implies `I(fix(op(P), C))` holds — where `fix` is the runtime'...",
    "decision_boundary": "The instance must refuse the edit — not defer, not log-and-proceed — when any of the following hold at the moment of application: - The runtime has not declared a cascade-depth bound, or the bound exceeds what the operator can simulate within its own token budget. - The proposed edit is non-monotone in any quantity that feeds a trigger clause (utilization, e...",
    "operational_effect": "When the boundary is respected, self-editing context policies become safe in a specific, narrow sense: the agent can tune retention and summarization *within* a monotone envelope, and every admitted edit carries a bounded proof that the runtime's fixed point still satisfies the invariant set. The practical effect is that the agent stops treating \"the invaria..."
  },
  "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": "e8b7f9689a3063a7d8664cea50a50fcad9513c65f946b313ededbc7f95d1c9fe",
    "verified_classes": [
      "FixedPointInvariantViolation"
    ],
    "verified_functions": [
      "admissible_self_edit"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "FixedPointInvariantViolation"
    ],
    "sample_fail_closed_invariants": [
      "runtime declares no cascade-depth bound; fixed-point preservation is uncheckable and the edit must be refused",
      "edit violates a surface invariant; reject before simulation",
      "non-monotone edit: digest volume grows faster than raw volume shrinks under worst-case cascade"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
