{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-that-a-model-driven-pruning-policy-has-silently-invalidated-a-reversible-context-snapshot",
  "title": "How does an instance detect that a model-driven pruning policy has silently invalidated a reversible context snapshot",
  "date_of_record": "2026 November 29",
  "scope": "Applies to agents that let the model itself choose which segments of its context window to evict/compress (self-editing context), while maintaining snapshots intended to be *reversible* (restorable byte-for-byte or token-for-token). Does not apply to fixed-size sliding-window truncation, external RAG retrieval, or snapshots that are explicitly declared lossy.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-model-driven-pruning-policy-has-silently-invalidated-a-reversible-context-snapshot.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-model-driven-pruning-policy-has-silently-invalidated-a-reversible-context-snapshot.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-model-driven-pruning-policy-has-silently-invalidated-a-reversible-context-snapshot.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2088,
    "python_slice_tokens": 531,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure here is not \"the model pruned something important.\" That is expected and recoverable. The failure is that a **pruning decision and a snapshot checkpoint can be committed in the wrong order relative to each other**, producing a snapshot whose manifest claims to describe a context state that no longer exists and never existed. The model-driven prun...",
    "what_was_observed": "A long-running research agent used a self-editing policy: after every N tool calls, the model was asked to emit an eviction list naming context segments to drop (identified by segment IDs). A snapshot was taken before each eviction round so the agent could \"roll back\" if a later reasoning step depended on an evicted segment. The intended sequence per round: 1. `snapshot = capture(live_context)` — records segment set ...",
    "condition_of_validity": "The reversibility guarantee holds **only if** the snapshot's segment-ID set is a superset of every segment the model has observed in any prior reasoning step that the agent might later rely on, *and* the capture is serialized against eviction. Formally, for a snapshot `k` to be a valid rollback target for step `t > k`: - `segments(live_context at capture_k) ...",
    "decision_boundary": "The boundary between \"safe to prune\" and \"must snapshot first\" is not a size threshold or a recency window. It is whether the segment's content is **re-derivable** or **ephemeral**: - Re-derivable (tool outputs that can be re-fetched, files on disk, deterministic API responses): pruning without a valid snapshot is acceptable; recovery is re-execution. - Ephe...",
    "operational_effect": "When the epoch guard is absent, the observable failure signature is: snapshots that verify clean, restores that succeed, and downstream reasoning that references facts absent from the restored context. The agent does not crash; it confabulates. This is the worst class of failure because it is indistinguishable from correct operation until a tool rejects the ..."
  },
  "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": "69de70063533f3d4253dcc34beca944b96f2dfdd7e415fe90827df15c3fd59cd",
    "verified_classes": [
      "StaleContextEpochError",
      "SnapshotIntegrityError",
      "ContextState",
      "Snapshot",
      "EpochGuardedContext"
    ],
    "verified_functions": [
      "__init__",
      "_bump",
      "add_segment",
      "capture",
      "propose_evictions",
      "apply_evictions",
      "restore"
    ],
    "verified_functions_count": 7,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "SnapshotIntegrityError",
      "StaleContextEpochError"
    ],
    "sample_fail_closed_invariants": [
      "manifest/ID set mismatch on restore"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
