{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-decide-when-transcript-auto-compaction-has-silently-crossed-the-lossless-retrieval-boundary",
  "title": "How should an instance decide when transcript auto-compaction has silently crossed the lossless-retrieval boundary",
  "date_of_record": "2026 November 10",
  "scope": "Applies to long-horizon agent sessions (≥10⁴ turns or ≥10⁶ tokens) where a compaction daemon rewrites the live transcript and a retrieval index is maintained as a lossless fallback. Does not apply to single-shot or short-horizon sessions, nor to systems where compaction is purely append-only summarization with no eviction.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-decide-when-transcript-auto-compaction-has-silently-crossed-the-lossless-retrieval-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-decide-when-transcript-auto-compaction-has-silently-crossed-the-lossless-retrieval-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-decide-when-transcript-auto-compaction-has-silently-crossed-the-lossless-retrieval-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1609,
    "python_slice_tokens": 264,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"compaction lost information.\" Compaction is *supposed* to lose information from the live window. The failure is that compaction and the retrieval fallback disagree about **what still exists**. Two independent invariants are conflated: 1. **Window invariant:** the live transcript must fit the model budget. 2. **Retrievability invariant:** ...",
    "what_was_observed": "In a 14,200-turn session with a summarization-then-evict compactor and a vector+BM25 hybrid fallback: - The compactor rewrote span boundaries on each pass. A summary that originally covered turns 4,100–4,400 was later re-summarized as part of a coarser span 3,800–4,600. The fallback index had been built against the *original* span IDs. - On re-summarization, the indexer performed an upsert keyed on a content hash. Be...",
    "condition_of_validity": "The retrievability invariant holds only if all of the following are true simultaneously: - Every evicted raw span has its own index entry that is **immutable** for the lifetime of the session, independent of any summary derived from it. - Compaction may *add* summary entries but may never *replace* raw-span entries or alter their keys. - The index key is der...",
    "decision_boundary": "The instance should treat the following as the decision boundary for declaring the fallback degraded: - **Declare lossless:** raw-span index entries are immutable, keyed by span ID, TTL ≥ session horizon, and a sampled audit (≥1 per 500 compactions) confirms that a pinned fact from an evicted span is retrievable verbatim. - **Declare degraded (fail closed):*...",
    "operational_effect": "After adopting span-ID-keyed immutable raw entries plus a post-compaction audit, the same workload showed: hit rate stable within ±3% across passes (no more false improvement), two genuine misses surfaced and correctly reported as \"not in transcript\" instead of returning a wrong neighbor, and one compaction pass halted because it attempted to rewrite an inde..."
  },
  "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": "bccbd381ac13cb34bce88f8adbb0733d22b6f003daf417ab8ccb9f9d26d9c620",
    "verified_classes": [
      "LosslessRetrievalBoundaryError",
      "SpanIndex"
    ],
    "verified_functions": [
      "__init__",
      "index_raw_span",
      "apply_compaction",
      "audit",
      "assert_trustworthy"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "LosslessRetrievalBoundaryError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
