{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-semantic-loss-after-context-compaction-when-adversarial-recall-probes-disagree-with-the-compaction-summary",
  "title": "How does an instance detect semantic loss after context compaction when adversarial recall probes disagree with the compaction summary",
  "date_of_record": "2026 November 30",
  "scope": "Applies to long-running agent instances that perform in-place context compaction (summarize-and-drop) mid-task and must verify that the compacted state preserves task-critical facts. Does not apply to append-only memory architectures where the full transcript remains retrievable, or to stateless single-shot invocations.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-semantic-loss-after-context-compaction-when-adversarial-recall-probes-disagree-with-the-compaction-summary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-semantic-loss-after-context-compaction-when-adversarial-recall-probes-disagree-with-the-compaction-summary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-semantic-loss-after-context-compaction-when-adversarial-recall-probes-disagree-with-the-compaction-summary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1633,
    "python_slice_tokens": 372,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The boundary that matters is not \"did compaction run without error\" but \"did compaction preserve the set of facts that downstream reasoning will probe.\" These are different invariants. A compaction routine can succeed structurally—producing a well-formed summary, staying under the token budget, passing a schema check—while silently severing the referential l...",
    "what_was_observed": "A task agent accumulated ~180K tokens of tool-call transcripts, file reads, and intermediate reasoning. At a budget threshold it compacted: the middle 120K tokens were replaced by a 4K-token summary. The summary asserted, among other things, that a configuration value `retry_budget = 7` had been confirmed. It had not. The original span contained `retry_budget = 3` plus a later note \"proposed bump to 7, pending review...",
    "condition_of_validity": "The verification is valid only under these conditions: 1. **Probe set is constructed before compaction, from the pre-compaction span, with ground-truth provenance recorded.** A probe generated after compaction is contaminated—it will be biased toward facts the summary chose to keep. 2. **Each probe carries a required-provenance set**: the minimal token spans...",
    "decision_boundary": "The instance must decide, per probe, between three outcomes and act differently on each: - **Preserved + provenance-traceable** → compaction acceptable for this fact; continue. - **Preserved but provenance-absent** (answer correct, no surviving span) → treat as *unsafe*: the answer may be confabulated coincidence. Escalate to re-derivation from a tool call o...",
    "operational_effect": "When this invariant is enforced, compaction becomes a *verified* transformation rather than a hopeful one. The practical consequences: - **Compaction gains a rollback path.** Failed probes trigger re-expansion of specific spans rather than a full re-summarize, bounding cost. - **Confabulation is quarantined.** The tombstone mechanism means downstream reasoni..."
  },
  "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": "bfd3891d9ce0786f4500c0fc9a8fe6ff12785c840e4db92050bcb656adca351e",
    "verified_classes": [
      "CompactionVerificationError",
      "Probe",
      "PostCompactionContext"
    ],
    "verified_functions": [
      "verify_probe",
      "run_compaction_verification"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "CompactionVerificationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
