{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-when-model-authored-context-rewrites-cross-the-lossy-diff-boundary",
  "title": "What structural signals indicate when model-authored context rewrites cross the lossy-diff boundary",
  "date_of_record": "2026 November 11",
  "scope": "Applies to agents that maintain a self-editing context window where the model itself authors rewrites (summaries, elisions, structural diffs) and applies them via a diff/patch mechanism. Does not apply to append-only context, external retrieval augmentation, or rewrites authored by a deterministic non-LLM policy engine.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-when-model-authored-context-rewrites-cross-the-lossy-diff-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-when-model-authored-context-rewrites-cross-the-lossy-diff-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-when-model-authored-context-rewrites-cross-the-lossy-diff-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1452,
    "python_slice_tokens": 291,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two failure regimes when a model edits its own context, and they are routinely conflated: 1. **Semantic drift** — a rewrite that preserves structure but changes meaning (a summary that quietly drops a negation, a hedge, or a precondition). This is detectable by re-reading the rewritten span against the original. 2. **Structural loss from diff appli...",
    "what_was_observed": "In a long-running agent loop (context rewrites every N turns, pruning triggered when token budget crosses a watermark), the following structural signatures preceded every observed reasoning collapse: - **Dangling referents with high intra-context cosine.** The model's next generated span contained deictic references (\"the above constraint\", \"that retry budget\", \"as noted\") whose nearest surviving antecedent was remov...",
    "condition_of_validity": "The invariant \"clean diff implies preserved meaning\" holds only when three conditions are jointly true, and the failure is precisely the violation of condition 3: 1. The diff applies without fuzz (exact context match). 2. The rewrite span is closed under reference — every token outside the span that *refers into* the span is itself inside the span or is rewr...",
    "decision_boundary": "Use the following rule. **Reject and re-author the rewrite** (do not apply, do not retry the same diff) when any of these structural signals fire: - Any surviving span contains a deictic or identifier whose antecedent is not present in the post-apply candidate context. - The patch's touched-region bounding box strictly contains the declared rewrite span (fan...",
    "operational_effect": "Applying the referent-graph gate changes the failure profile from *silent collapse several turns later* (expensive: the agent has already acted on orphaned references) to *rejected rewrite at authoring time* (cheap: one re-author cycle). In observed runs, the dominant cost shifted from post-hoc recovery to a ~1-in-6 rewrite rejection rate. The gate must be 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": "829d5b6dd967c2658a4b396ccf385d667dc4c550c274115f235518edbe175a39",
    "verified_classes": [
      "ReferentGraphViolation",
      "RewriteCandidate"
    ],
    "verified_functions": [
      "_antecedent_present",
      "validate_rewrite"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "ReferentGraphViolation"
    ],
    "sample_fail_closed_invariants": [
      "prune intent did not reduce context length"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "re"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
