{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-reject-a-model-authored-context-diff-that-is-locally-valid-but-globally-unsound",
  "title": "In what scenarios must an instance reject a model-authored context diff that is locally valid but globally unsound",
  "date_of_record": "2026 November 28",
  "scope": "Applies to agents that let a model emit context-rewriting operations (drops, summaries, reorderings, merges) against their own working context, where the rewrite is validated per-operation and applied as a diff. Does not apply to single-shot context truncation performed by a deterministic harness with no model-authored diff, nor to external memory stores that are never re-read mid-task.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-reject-a-model-authored-context-diff-that-is-locally-valid-but-globally-unsound.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-reject-a-model-authored-context-diff-that-is-locally-valid-but-globally-unsound.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-reject-a-model-authored-context-diff-that-is-locally-valid-but-globally-unsound.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2579,
    "python_slice_tokens": 395,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode here is not \"the model summarized wrong.\" It is the collapse of the distinction between a diff that is *syntactically admissible against the current context* and one that is *semantically admissible against the task's future read set*. A model-authored context policy produces a sequence of operations — `drop(span)`, `summarize(span, text)`, ...",
    "what_was_observed": "A coding agent running a multi-file refactor at a 128k window. At 71% occupancy the context policy fired: the model was instructed to emit a compaction diff. It produced: Every operation validated: spans existed, offsets in range, summaries non-empty, net token reduction 5.8k. The diff applied. Occupancy fell to 66%. Twelve steps later the agent attempted to patch `src/parser.py`. Its plan, formed after compaction, w...",
    "condition_of_validity": "A model-authored context diff is admissible only when, for every span it removes or rewrites, the agent's **latent read set** — the set of byte ranges that any operation reachable from the current plan may still reference verbatim — is disjoint from that span. This is the invariant. It is almost never checkable directly, because the plan is itself model-auth...",
    "decision_boundary": "Reject the diff, and re-prompt the model with the rejection reason, when any of the following holds: - A `drop` or lossy `summarize` targets a span whose provenance is class 3 (unrecoverable), unless the span is explicitly `pin`ned in the same diff. The diff is rejected atomically; partial application is forbidden. - A `reorder` moves any span tagged `invari...",
    "operational_effect": "Enforcing the invariant converts a silent trajectory death into a bounded, observable rejection. The agent that would have oscillated instead receives: `diff rejected: drop(turn_14.body) lacks recovery warrant (provenance: read_file@commit, class 2) and is referenced by pending plan step patch(parser.py); re-emit with pin(turn_14.body) or supply re-fetch gat..."
  },
  "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": "3b4b91dac87d84239acf91b04f7f6e9c0d83e3a204e097e6d70b7ad57b2ea064",
    "verified_classes": [
      "ContextDiffRejected",
      "Provenance",
      "Span",
      "Op"
    ],
    "verified_functions": [
      "validate_diff",
      "apply_context_diff"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "ContextDiffRejected"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
