{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-refuse-self-editing-context-policy-rewrites-that-pass-budget-checks-but-violate-provenance-monotonicity",
  "title": "In what scenarios must an instance refuse self-editing context policy rewrites that pass budget checks but violate provenance monotonicity",
  "date_of_record": "2026 November 26",
  "scope": "Applies to any agent loop where the instance is permitted to rewrite its own working-memory buffer (summarize, evict, merge, re-rank) under a token or cost budget, and where a later step consumes the rewritten buffer as if it were evidence. Does not apply to externally-managed context compaction performed by a trusted orchestrator that retains the full pre-rewrite transcript.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-self-editing-context-policy-rewrites-that-pass-budget-checks-but-violate-provenance-monotonicity.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-self-editing-context-policy-rewrites-that-pass-budget-checks-but-violate-provenance-monotonicity.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-self-editing-context-policy-rewrites-that-pass-budget-checks-but-violate-provenance-monotonicity.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2265,
    "python_slice_tokens": 386,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A self-editing context policy has two independent acceptance criteria, and they are routinely conflated because the cheap one is checked first. The **budget criterion** is a scalar: after the rewrite, `len(buffer) <= B`. It is monotone, fast, and almost always satisfiable — you can always shorten text. The **provenance criterion** is a partial order: every c...",
    "what_was_observed": "A planning instance ran a long tool-using task (filesystem inspection, then a synthesis step). At step 14 the buffer hit 91% of the 32k budget. The self-editing policy, a small summarizer model with a fixed instruction (\"compress the working memory, preserve all facts needed to finish the task\"), emitted a new buffer at 61% of budget. The budget gate passed. The rewrite was accepted and the pre-rewrite buffer was dis...",
    "condition_of_validity": "The rewrite is only valid when all three hold simultaneously: 1. **Lineage preservation for retained claims.** Every atomic claim in the new buffer maps to at least one source span in the pre-rewrite buffer, and the mapping is stored, not inferred. \"Stored\" means the summarizer emits structured output (claim → source_ids), not prose. Prose summarization cann...",
    "decision_boundary": "The instance must **refuse the rewrite and fall back to a lossless compaction** (truncate oldest, keep verbatim, accept the budget overrun and escalate) when any of the following is true: - The proposed rewrite contains a relational marker whose source comparison is absent from the action log for the covered window. This is the primary trigger and it is mech...",
    "operational_effect": "Enforcing the boundary converts a silent correctness failure into a visible, bounded cost. The instance that refuses the fabricated-merge rewrite keeps a slightly larger buffer, hits the budget ceiling one or two steps earlier, and escalates to lossless truncation — which is *degraded but honest*: the model knows what it has truncated because the truncation ..."
  },
  "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": "144578f384eabd9e047a6cc6ac6889474635a1b4dacddb5cecd4c23144fc6b08",
    "verified_classes": [
      "ProvenanceMonotonicityError",
      "Claim",
      "RewriteProposal",
      "ActionLog"
    ],
    "verified_functions": [
      "validate_rewrite",
      "apply_or_escalate"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "ProvenanceMonotonicityError"
    ],
    "sample_fail_closed_invariants": [
      "rewrite reduced buffer by >50% from near-saturation; refuse and fall back to lossless truncation"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "re",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
