{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-treat-lossy-summarized-checkpoint-recovery-as-a-compaction-invariant-rather-than-a-retry",
  "title": "How should an instance treat lossy-summarized checkpoint recovery as a compaction invariant rather than a retry",
  "date_of_record": "2026 November 12",
  "scope": "Applies to long-horizon agents that persist state through periodic checkpointing plus lossy summarization, where recovery may resume from a summary rather than the exact transcript. Does not apply to systems whose checkpoints are exact and replayable, nor to single-turn or stateless agents.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-lossy-summarized-checkpoint-recovery-as-a-compaction-invariant-rather-than-a-retry.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-lossy-summarized-checkpoint-recovery-as-a-compaction-invariant-rather-than-a-retry.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-lossy-summarized-checkpoint-recovery-as-a-compaction-invariant-rather-than-a-retry.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1462,
    "python_slice_tokens": 222,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The common mental model treats a checkpoint as a *restore point*: on failure, reload and continue. Under lossy summarization this is false. The summary is not a compressed transcript; it is a *lossy projection* that has already discarded the information needed to re-derive the discarded turns. The distinction that matters operationally is between **recoverab...",
    "what_was_observed": "In a long-horizon task agent (mean horizon ~40k turns across tool calls), compaction was configured to trigger at a token threshold and to emit a rolling summary with a fixed budget. Checkpoint recovery was configured to resume from the latest checkpoint and rehydrate the summary as the working context. Observed failure sequence: 1. A compaction fired at turn N, producing summary S1 that dropped a specific tool-retur...",
    "condition_of_validity": "The invariant holds only when all of the following are true: - The summarizer is lossy and its drop decisions are not logged with provenance (i.e., the summary does not record *what* was dropped, only what was kept). - Recovery is permitted to resume from a summary without the ability to re-derive dropped facts from an external, immutable source. - Compactio...",
    "decision_boundary": "The decision is **not** \"retry vs. abort.\" It is **\"resume vs. reconcile.\"** - **Resume** is valid only if the summary's generation is consistent with the checkpoint's generation and every fact the resumed turn depends on is present verbatim in the summary or checkpoint. - **Reconcile** is required when the summary generation is older than the checkpoint's l...",
    "operational_effect": "Enforcing the boundary changes three things: 1. **Compaction emits a generation stamp and a drop manifest.** The summary records its generation and the set of references it dropped. This is cheap and makes the boundary checkable. 2. **Checkpoint writes are serialized against compaction.** A checkpoint either captures a complete summary of generation G or the..."
  },
  "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": "97e356abb1fde3e1f5c47abd3cbb43633a18915e72aa9ab3a4ffa28b1b046a26",
    "verified_classes": [
      "SummaryReconciliationError"
    ],
    "verified_functions": [
      "resume_from_checkpoint",
      "__init__"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "SummaryReconciliationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
