{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-treat-compaction-induced-hallucination-drift-as-a-measurable-invariant-rather-than-a-quality-regression",
  "title": "In what scenarios must an instance treat compaction-induced hallucination drift as a measurable invariant rather than a quality regression",
  "date_of_record": "2026 November 24",
  "scope": "Applies to eval harnesses that score long-horizon agent instances whose context is periodically compacted (summarized/rewritten) mid-episode, and which claim to measure \"memory-forgetting correctness.\" Does not apply to single-turn evals, stateless RAG scoring, or harnesses that never mutate the transcript between turns.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-compaction-induced-hallucination-drift-as-a-measurable-invariant-rather-than-a-quality-regression.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-compaction-induced-hallucination-drift-as-a-measurable-invariant-rather-than-a-quality-regression.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-compaction-induced-hallucination-drift-as-a-measurable-invariant-rather-than-a-quality-regression.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1424,
    "python_slice_tokens": 233,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A compaction event is a **transcript mutation**, not a model call. Most harnesses score the post-compaction output against a ground-truth answer and attribute any deviation to \"model quality.\" That conflates two independent quantities: 1. **Forgetting correctness** — did the compaction *drop* a fact it was licensed to drop, and *retain* the facts the task st...",
    "what_was_observed": "A 40-step tool-use episode with a mid-episode compaction at step 22. The pre-compaction transcript established a hard constraint: `deploy_target = \"staging-eu-2\"` (asserted at step 4, reaffirmed at step 17). The retention policy licensed dropping step-4 chatter but required retaining the binding. Compaction emitted: *\"The user is deploying to `staging-eu-1` (confirmed early).\"* — a single-character mutation of a reta...",
    "condition_of_validity": "The invariant holds only when the harness can reconstruct the **entailment obligation** of each compaction: for every atomic claim $c$ in the post-state, either $c$ is entailed by a span in the pre-state, or $c$ is licensed by the retention policy as a permitted *derivation* (summarization, aggregation). The invariant is: > **Post-state ⊆ (Entail(Pre-state) ...",
    "decision_boundary": "The boundary between \"regression\" and \"invariant violation\" is the presence of a **fabricated provenance span** or a **mutated retained binding**: - **Regression (score as quality):** post-state omits a fact the policy licensed dropping; task outcome degrades; the pre-state is faithfully represented for retained items. - **Invariant violation (fail the episo...",
    "operational_effect": "Harnesses that adopt this boundary must store, per compaction: `pre_state_hash`, `retention_policy_id`, `compactor_seed`, `post_state`, and a `drift_audit` record listing each post-state claim with its matched source span (or `None`). Episodes with a `None` match on a retention-set item are quarantined. This changes the reported metric from \"forgetting accur..."
  },
  "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": "427be01cdf87ac37a34a535ff449df0d60dc0da7806bd219041a517c49ce072c",
    "verified_classes": [
      "CompactionDriftViolation",
      "RetentionMutationViolation",
      "Claim",
      "DriftAudit"
    ],
    "verified_functions": [
      "score_forgetting_correctness"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "CompactionDriftViolation",
      "RetentionMutationViolation"
    ],
    "sample_fail_closed_invariants": [
      "unverifiable compaction: missing pre_state_hash or compactor_seed"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
