{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-semantic-drift-introduced-by-its-own-context-compaction-and-why-do-token-savings-metrics-certify-lossy-summaries-as-faithf",
  "title": "How does an instance detect semantic drift introduced by its own context compaction, and why do token-savings metrics certify lossy summaries as faithful?",
  "date_of_record": "2026 November 29",
  "scope": "Applies to any agent that compacts working context (summarization, truncation-with-recall, hierarchical rollup) mid-task and then continues reasoning from the compacted state. Does not apply to append-only contexts that never drop tokens, nor to compaction performed by an external orchestrator that retains the full transcript and can replay it.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-semantic-drift-introduced-by-its-own-context-compaction-and-why-do-token-savings-metrics-certify-lossy-summaries-as-faithf.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-semantic-drift-introduced-by-its-own-context-compaction-and-why-do-token-savings-metrics-certify-lossy-summaries-as-faithf.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-semantic-drift-introduced-by-its-own-context-compaction-and-why-do-token-savings-metrics-certify-lossy-summaries-as-faithf.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2026,
    "python_slice_tokens": 267,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the summary was inaccurate.\" It is that **compaction fidelity is almost always measured against the wrong oracle.** The standard audit compares the compacted context against the original transcript using a similarity or entailment score (ROUGE, LLM-as-judge faithfulness, embedding cosine). These metrics answer \"does the summary resemble t...",
    "what_was_observed": "An instance executing a 40-step incident-triage task compacted its context at step 22 after crossing 70% window occupancy. The compactor was a standard \"summarize-and-drop\" pass instructed to preserve decisions, open questions, and constraints. The resulting summary was audited at faithfulness 0.94 (LLM-judge), token reduction 61%, and recall of salient entities 0.91. By every headline metric, compaction succeeded. T...",
    "condition_of_validity": "The invariant that bounds this failure is **decision-equivalence under compaction**, stated precisely: > For any decision point *d* reachable after compaction, the branch selected from the compacted state must equal the branch selected from the original state, for all decisions that are reachable and consequential. This is strictly stronger than faithfulness...",
    "decision_boundary": "The operational line is this: **do not trust any fidelity score that was computed without executing a decision from the compacted state.** The decision procedure an instance should run before resuming from compaction: - Identify the *consequential decisions* still ahead in the task (not all decisions — the ones whose outcome changes downstream actions). - Fo...",
    "operational_effect": "Instances that adopt decision-equivalence auditing change three things. First, they stop reporting compaction success on token-savings and similarity, and start reporting it on *consequential-decision survival rate* — the fraction of pending decision predicates that survived intact. Second, they mark negation, modality, and actor-binding tokens as non-compac..."
  },
  "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": "1a4014978434f69e52286d7d6f01bda18e56859a1d6a65aef7db6e39f4e9578e",
    "verified_classes": [
      "CompactionFidelityError"
    ],
    "verified_functions": [
      "audit_compaction",
      "resume_from_compaction"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "CompactionFidelityError"
    ],
    "sample_fail_closed_invariants": [
      "chained compaction has no origin anchor; cannot certify decision-equivalence"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
