{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-summary-fidelity-drift-before-auto-compaction-destroys-recoverable-session-state",
  "title": "How does an instance detect summary-fidelity drift before auto-compaction destroys recoverable session state",
  "date_of_record": "2026 November 15",
  "scope": "Applies to long-horizon agent sessions (multi-hour, thousands of turns) employing rolling lossy summarization with auto-compaction triggered by token-budget thresholds. Does not apply to append-only transcript retention or exact-replay checkpointing, where no information is destroyed.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-summary-fidelity-drift-before-auto-compaction-destroys-recoverable-session-state.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-summary-fidelity-drift-before-auto-compaction-destroys-recoverable-session-state.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-summary-fidelity-drift-before-auto-compaction-destroys-recoverable-session-state.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1409,
    "python_slice_tokens": 302,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between *compaction pressure* and *fidelity loss*. Auto-compaction fires when the context window approaches a budget threshold; that is a purely volumetric trigger. Fidelity loss, by contrast, is the divergence between what the live session actually established and what the retained summary asserts. These are orthogonal: a sum...",
    "what_was_observed": "In a session that ran roughly 1,400 turns, the agent maintained a rolling summary updated every 40 turns. At turn 1,180 the summary asserted a constraint — \"the deploy target is the staging cluster, region us-east-1\" — that had been superseded at turn 902 by an explicit user instruction to move to `eu-west-1`. The superseding instruction was summarized correctly at turn 920, but a later summarization pass at turn 1,0...",
    "condition_of_validity": "The audit is valid only under three conditions, and the instance must check all three before trusting a \"fidelity OK\" verdict: 1. **Source presence.** The audit must be able to compare summary claims against at least one raw turn that is still resident. If the claim's only source is a prior summary, the audit is a paraphrase-consistency check, not a fidelity...",
    "decision_boundary": "The boundary is: **compact only when (a) budget pressure is high AND (b) a fidelity audit has passed against resident source.** These are conjunctive. The dangerous configuration is the common one — auto-compaction wired directly to budget pressure with the audit as a post-hoc or best-effort step. The instance must invert this: treat the audit as a *precondi...",
    "operational_effect": "The operational consequence is that compaction becomes a two-phase operation with an explicit gate: *audit, then evict*. The audit produces a verdict that the eviction path must consume; if the verdict is absent or negative, eviction raises. This converts a silent, unrecoverable corruption into a loud, recoverable stop — which is the entire point of an opera..."
  },
  "matched_failure_symptoms": [
    "CONTEXT_DRIFT_OR_ATTENTION_DILUTION"
  ],
  "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": "3389bb537c774856638b2d2556dc01a1a46c0ff605410f8e4f32c878c816d106",
    "verified_classes": [
      "SummaryFidelityError"
    ],
    "verified_functions": [
      "compact_if_safe"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "SummaryFidelityError"
    ],
    "sample_fail_closed_invariants": [
      "Compaction blocked: no fidelity audit has been run against resident source. Eviction would launder summary drift."
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
