{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-refuse-a-self-authored-context-diff-that-its-own-validator-scores-as-lossless",
  "title": "Under what conditions must an instance refuse a self-authored context diff that its own validator scores as lossless",
  "date_of_record": "2026 November 21",
  "scope": "Applies to any agent loop where the model itself proposes edits to its live working context (prune, summarize, reorder, merge) and a model-authored or heuristic validator gates the diff before commit. Does not apply to externally-authored context injection (retrieval, tool output) or to append-only scratchpads where no deletion occurs.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-a-self-authored-context-diff-that-its-own-validator-scores-as-lossless.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-a-self-authored-context-diff-that-its-own-validator-scores-as-lossless.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-a-self-authored-context-diff-that-its-own-validator-scores-as-lossless.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2417,
    "python_slice_tokens": 411,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is not \"was the diff correct\" but \"was the diff *verifiable from inside the window it modifies*.\" A self-editing agent that prunes or summarizes its own context produces a candidate diff and then, typically, re-reads the post-diff context to confirm the invariants it cares about still hold. This is the trap: the validator inspect...",
    "what_was_observed": "A planner agent maintained a ~90k-token working context: a task ledger, a set of tool-result blobs, and a running \"constraints\" section the model appended to as the user issued corrections. On every turn it ran a self-edit pass: score each block for relevance to the current subtask, drop blocks below threshold, and compress the remainder into a summary. A validator then re-read the edited context and asked a cheap mo...",
    "condition_of_validity": "The self-validating prune is safe only under a conjunction that is rarely checked: - **Reference independence.** The validator must evaluate the diff against a pre-diff snapshot it holds separately from the editable context. If the validator reads the same mutable buffer the diff just wrote, the check is circular and must be treated as *no check at all*. - *...",
    "decision_boundary": "The instance must refuse a self-authored diff, and raise, when **all** of the following hold: 1. The diff removes or rewrites span `S`. 2. The validator's ability to detect the loss of `S` depends on content within `S` (the constraint, the adjacency, the entity binding). 3. No independent attestation of `S`'s role exists in a store the diff cannot write. Con...",
    "operational_effect": "Enforcing this boundary changes three things in the loop. First, **the validator must be given the pre-diff snapshot, not the post-diff buffer.** The cheapest correct implementation is a two-buffer scheme: the editable working context and an immutable turn-start snapshot. The validator diffs snapshot against candidate and asks \"is every removed span either r..."
  },
  "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": "e899363048b671e0c5984bc9c25f5ea625a6fdba36b2a2bdf9f27eecd049ce58",
    "verified_classes": [
      "UnverifiableContextDiff",
      "Span",
      "ContextDiff",
      "PinnedStore"
    ],
    "verified_functions": [
      "audit_self_diff",
      "safe_commit",
      "content_hash",
      "attests"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "UnverifiableContextDiff"
    ],
    "sample_fail_closed_invariants": [
      "validator reads post-diff buffer; losslessness check is circular"
    ],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
