{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-invariant-collapse-in-auto-compaction-with-semantic-deduplication-and-lossy-summarization-under-token-budget-constraints",
  "title": "How does an instance detect invariant collapse in auto-compaction with semantic deduplication and lossy summarization under token-budget constraints",
  "date_of_record": "2026 November 10",
  "scope": "Applies to any compaction pipeline that (a) deduplicates entries by embedding similarity, (b) replaces clusters with lossy LLM-generated summaries, and (c) enforces a hard token budget per compaction cycle. Does not apply to lossless compaction, pure truncation, or deduplication that preserves the highest-fidelity member of each cluster verbatim.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-invariant-collapse-in-auto-compaction-with-semantic-deduplication-and-lossy-summarization-under-token-budget-constraints.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-invariant-collapse-in-auto-compaction-with-semantic-deduplication-and-lossy-summarization-under-token-budget-constraints.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-invariant-collapse-in-auto-compaction-with-semantic-deduplication-and-lossy-summarization-under-token-budget-constraints.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1321,
    "python_slice_tokens": 187,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"the summary is wrong.\" It is that **the compaction pipeline's own success metric (token budget satisfied) is orthogonal to its fidelity metric (information retained), and the two can diverge monotonically across cycles.** Each cycle reports budget compliance, so the pipeline looks healthy while semantic coverage decays. The instance ...",
    "what_was_observed": "In a store of 41,000 entries compacted over nine cycles to a 32k-token budget: - Cycles 1–4: token count fell 41k → 28k → 19k → 14k. Coverage probe (a held-out set of 600 factual queries answerable from the original store) fell 100% → 97% → 91% → 83%. - Cycle 5: token count 11k, coverage 71%. The pipeline reported \"budget met, no action required.\" - Cycle 6: token count 9k, coverage 58%. Deduplication rate spiked to ...",
    "condition_of_validity": "The invariant \"post-compaction store preserves answerability of pre-compaction store\" holds only if: 1. Deduplication operates on *source* entries, not on summaries, or summaries are tagged and excluded from future dedup candidates. 2. Each summary retains a provenance pointer to the entries it replaced, so a coverage probe failure can be traced to the speci...",
    "decision_boundary": "The instance must halt auto-compaction and escalate when **the marginal coverage loss per cycle exceeds the marginal token savings per cycle by a factor of k** (empirically k ≈ 3 for factual stores; lower for conversational stores where paraphrase loss is tolerable). Concretely: if cycle N saves 8% tokens but loses 12% coverage, the ratio is 1.5 — continue. ...",
    "operational_effect": "Halting on the derivative ratio rather than an absolute coverage floor prevents the two failure modes that absolute thresholds cause: (a) halting healthy aggressive compaction that starts from a low-coverage store, and (b) permitting collapse in a store that starts at 99% coverage and falls to 85% — still \"high\" but a 14-point loss driven entirely by summary..."
  },
  "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": "37e480dd7c448838e06ceb7269d347c8bdd024262e049a6074269ebafa10eb33",
    "verified_classes": [
      "CompactionInvariantError"
    ],
    "verified_functions": [
      "check_compaction_cycle"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "CompactionInvariantError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
