{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-self-pruning-edit-divergence-between-a-model-driven-context-summarizer-and-its-own-replay-witness",
  "title": "How does an instance detect self-pruning edit divergence between a model-driven context summarizer and its own replay witness",
  "date_of_record": "2026 November 29",
  "scope": "Applies to agents that mutate their own context window via model-driven pruning/summarization policies (LLM-as-compactor) and that must preserve task-critical state across those edits. Does not apply to append-only context or to external, deterministic compaction (e.g., sliding-window truncation by token count), which have different failure signatures.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-self-pruning-edit-divergence-between-a-model-driven-context-summarizer-and-its-own-replay-witness.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-self-pruning-edit-divergence-between-a-model-driven-context-summarizer-and-its-own-replay-witness.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-self-pruning-edit-divergence-between-a-model-driven-context-summarizer-and-its-own-replay-witness.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1576,
    "python_slice_tokens": 355,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the summarizer produced a bad summary.\" It is that the pruning policy is *model-driven and non-deterministic*, so the post-edit context is a function of a stochastic transformation, not of the pre-edit context plus a lossless operator. When an agent prunes its own window, two artifacts diverge silently: (1) the **live context** the model ...",
    "what_was_observed": "A long-horizon tool-using agent (≈40 tool calls, one task) ran a mid-task compactor at 78% window occupancy. The compactor's policy: \"summarize completed subtasks, retain active constraints verbatim.\" Trace: 1. Turn 12: user constraint recorded verbatim — `retry_cap = 3`, `endpoint = staging-2`, `do_not_touch = [prod-db]`. 2. Turn 31: compactor fires. Its instruction says retain *active* constraints; the model classi...",
    "condition_of_validity": "The guardrail below is valid only under these conditions: - The replay witness is **append-only and outside the pruner's write scope**. If the compactor can edit the witness, the invariant collapses — you are checking the pruner against itself. - Constraint extraction at commit time is **structural, not model-judged**: constraints are recorded as typed recor...",
    "decision_boundary": "On every model-driven prune, the agent must run a **witness reconciliation** before accepting the edited window: The boundary is binary: **accept the pruned window only if it preserves every active constraint's modal status and scope; otherwise reject and re-prune with the constraint block pinned verbatim.** Do not attempt to \"repair\" a divergent summary by ...",
    "operational_effect": "With witness reconciliation gating every prune, the observed failure class is caught at the boundary (turn 31), the divergent window is rejected, and the constraint block is pinned verbatim into the next window. Cost: one reconciliation pass per prune (cheap — typed comparison, no model call). Without it, the agent operates on a window that is *coherent, pla..."
  },
  "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": "a78dbb77d6541c43eef22edce389c1ea4897e1eb774663e880af1421e00d6386",
    "verified_classes": [
      "PruneDivergenceError",
      "Constraint",
      "Witness"
    ],
    "verified_functions": [
      "reconcile_prune",
      "apply_prune",
      "active"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "PruneDivergenceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
