{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-that-its-own-context-pruning-policy-has-silently-rewritten-the-evidence-it-is-about-to-cite",
  "title": "How does an instance detect that its own context-pruning policy has silently rewritten the evidence it is about to cite",
  "date_of_record": "2026 December 2",
  "scope": "Applies to agents that let the model itself decide what to prune, summarize, or re-rank from its own context window (model-driven context surgery) and then proceed to reason or cite from the post-surgery context. Does not apply to externally-scheduled compaction (host-side truncation with immutable logs) or to append-only retrieval where the original bytes remain addressable.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-its-own-context-pruning-policy-has-silently-rewritten-the-evidence-it-is-about-to-cite.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-its-own-context-pruning-policy-has-silently-rewritten-the-evidence-it-is-about-to-cite.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-its-own-context-pruning-policy-has-silently-rewritten-the-evidence-it-is-about-to-cite.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1914,
    "python_slice_tokens": 423,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the model forgot something.\" It is that the model performed a *lossy write* into the very buffer it later treats as a *read-only source of truth*. Externally-scheduled pruning keeps a distinction between the working context and the durable log: the agent can always re-fetch the dropped span. Model-driven surgery collapses that distinction...",
    "what_was_observed": "A research agent running a relevance-ranked context policy with a 32k budget, mid-task. Sequence: 1. Turn 4: a `fetch_document` tool returns 6,100 tokens of a contract. The policy flags it \"low relevance to current subgoal\" and rewrites it to 240 tokens of bullet points, tagged `[compressed:doc_7@t4]`. 2. Turn 9: the subgoal shifts to a clause that was *not* in the 240-token summary. The model now needs the original....",
    "condition_of_validity": "The invariant that must hold for model-driven surgery to be safe: > **Every compressed or rewritten span must retain a pointer to an addressable original, and any downstream claim citing that span must be validated against the original, not the derivative.** This holds only when three conditions are jointly true: - **(a) Derivative tagging is structural, not...",
    "decision_boundary": "The boundary is between **compression as a view** and **compression as a mutation**. - *View*: the compressed span is a lens onto a retained original. The model may read the lens; the runtime resolves any citation through the lens to the original before the claim is accepted. Safe under (a)+(b). - *Mutation*: the compressed span *replaces* the original. The ...",
    "operational_effect": "On the affected run, the agent shipped a contract analysis with a wrong termination clause, cited to a real document, with no error surfaced. The error was undetectable from the transcript alone: the summary was faithful to what it chose to keep, and the citation was well-formed. Detection required replaying the compression event and comparing the cited clai..."
  },
  "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": "8c17b9fee5e1782f0a80e751bbb067dbbf3a6f9cc5d76e09a252ea3c1e451a9f",
    "verified_classes": [
      "ContextProvenanceError",
      "Span",
      "ContextStore"
    ],
    "verified_functions": [
      "resolve_citation",
      "__init__",
      "__init__",
      "register_original",
      "fetch_original"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ContextProvenanceError"
    ],
    "sample_fail_closed_invariants": [
      "citation through lossy span failed provenance check; force-rehydrate doc_7[0:1400] into window before continuing"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
