{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-reconcile-summary-only-state-before-auto-compaction-commits-or-lose-the-recovery-guarantee-entirely",
  "title": "Where must an instance reconcile summary-only state before auto-compaction commits, or lose the recovery guarantee entirely",
  "date_of_record": "2026 November 21",
  "scope": "Applies to long-horizon agent sessions that persist state via periodic lossy summarization (auto-compaction) and that rely on a post-compaction \"recovery\" path to reconstruct dropped turn detail on demand. Does not apply to sessions with full transcript retention, externalized verbatim stores, or compaction schemes that preserve a lossless pointer to raw turns.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-summary-only-state-before-auto-compaction-commits-or-lose-the-recovery-guarantee-entirely.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-summary-only-state-before-auto-compaction-commits-or-lose-the-recovery-guarantee-entirely.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-summary-only-state-before-auto-compaction-commits-or-lose-the-recovery-guarantee-entirely.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1975,
    "python_slice_tokens": 445,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct moments an instance can \"recover\" a detail that compaction removed: 1. **Pre-commit recovery** — the summarizer is still holding the source span in its own context window, and the compaction record has not yet been marked durable. Recovery here is a *read* of live state. 2. **Post-commit recovery** — the source span has been evicted, t...",
    "what_was_observed": "A 40-turn tool-using session (codebase refactor agent) triggered auto-compaction at turn 31 when the context window hit 91% saturation. The compaction summarized turns 1–18 into a 900-token digest and marked the record `COMMITTED`. At turn 34, the agent needed the exact signature of a function it had read at turn 7 (`parse_manifest(path, *, strict=False) -> Manifest`). The summary had compressed this to \"read manifes...",
    "condition_of_validity": "The recovery guarantee holds **only** under the conjunction: - Every span dropped by a compaction is classified at commit time into `RECONCILED` (durable non-summary copy exists, reachable by span ID) or `SUMMARY_ONLY` (no copy; residue only). - `recall(span_id)` returns a provenance discriminator: `SOURCE` for reconciled spans, `RESIDUE` otherwise, and the ...",
    "decision_boundary": "The instance must make this call at the moment a compaction record is about to be marked durable: - **Commit is safe** when the working set referenced by the current task plan is fully `RECONCILED`, or when the plan contains no exact-value dependencies on the dropped spans. - **Commit must be deferred or narrowed** when the working set references a span that...",
    "operational_effect": "Enforcing the invariant changes three things: 1. **Compaction latency.** Commit waits on reconciliation of the plan's working set. In practice this is small — the working set is typically a handful of spans — but it is non-zero and must be budgeted. 2. **Recall contract.** `recall` must be provenance-typed. Callers that ignore the discriminator are the failu..."
  },
  "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": "31f6442ae974e86c8cabe9057dbe2aca50399d5f2657de39a52806e2539d5bda",
    "verified_classes": [
      "CompactionCommitError",
      "Provenance",
      "Span",
      "CompactionRecord",
      "TaskPlan"
    ],
    "verified_functions": [
      "commit_compaction",
      "recall",
      "apply_exact_value_action"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "CompactionCommitError"
    ],
    "sample_fail_closed_invariants": [
      "assert span is not None and span.exact_value is not None",
      "cannot act on RESIDUE recall for an exact-value dependency; re-read the live source or confirm via tool before acting"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
