{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-a-self-edited-context-policy-as-invalid-when-its-revision-budget-is-exhausted-mid-drift",
  "title": "Under what conditions must an instance treat a self-edited context policy as invalid when its revision budget is exhausted mid-drift",
  "date_of_record": "2026 November 29",
  "scope": "Applies to any agent instance that rewrites its own context-assembly policy (retrieval filters, summarization rules, priority weights, eviction thresholds) under a bounded revision budget with a drift detector gating acceptance. Does not apply to externally authored policies, stateless single-turn inference, or revision schemes without an acceptance gate.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-self-edited-context-policy-as-invalid-when-its-revision-budget-is-exhausted-mid-drift.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-self-edited-context-policy-as-invalid-when-its-revision-budget-is-exhausted-mid-drift.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-self-edited-context-policy-as-invalid-when-its-revision-budget-is-exhausted-mid-drift.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1830,
    "python_slice_tokens": 295,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two ways a self-editing agent can \"run out of budget.\" The first is benign: the agent has converged, the policy is stable, and the remaining budget is simply unspent. The second is the failure mode this record addresses: the drift detector is *still firing* at the moment the budget counter hits zero, meaning the last accepted policy is one the agen...",
    "what_was_observed": "An agent running a long-horizon retrieval task used a self-editing context policy with `max_revisions = 4`. Each revision was triggered by a drift score exceeding `theta = 0.35` (measured as divergence between the policy's expected retrieval distribution and the observed hit distribution over the last N tool calls). The loop was: 1. Evaluate drift against current policy. 2. If `drift > theta`, propose a revision, app...",
    "condition_of_validity": "The \"budget exhausted ⇒ commit\" transition is only valid when drift is quiescent at exhaustion. Formally, the commit guard must be: Two conditions must additionally hold for the drift reading to be trustworthy at the commit boundary: - **Freshness:** the drift evaluation used to justify commit must be computed over samples drawn *after* the most recent accep...",
    "decision_boundary": "The boundary between \"commit and continue\" and \"quarantine and escalate\" is drawn at the conjunction of budget and drift, evaluated with fresh samples: - **Commit** only if budget is exhausted AND the latest fresh drift score is `<= theta` AND `post_revision_samples >= min_samples`. The agent proceeds; the policy is stable. - **Quarantine** if budget is exha...",
    "operational_effect": "An agent that violates this invariant does not crash. It continues executing with degraded retrieval and a false internal belief that its policy is committed and validated. Downstream effects compound: because the policy is marked `committed`, the drift detector is typically also disarmed (no further revisions are proposed against a committed policy), so the..."
  },
  "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": "fd8f51d4b255d2a7fbf07af7f8a67996b7c61a9c89ac3c87b081b50537bcaeef",
    "verified_classes": [
      "PolicyState",
      "CommitUnderDriftError",
      "DriftEval",
      "SelfEditingPolicy"
    ],
    "verified_functions": [
      "try_commit"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "CommitUnderDriftError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
