{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-refuse-to-auto-compact-when-fidelity-scoring-is-self-referential",
  "title": "Where must an instance refuse to auto-compact when fidelity scoring is self-referential",
  "date_of_record": "2026 November 9",
  "scope": "Applies to long-horizon agent contexts that use a fidelity scorer to decide whether an auto-compaction event preserves task-relevant information. Does not apply to stateless single-turn inference, nor to compaction triggered by a hard token ceiling with no fidelity gate (that case degrades gracefully and is out of scope here).",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-refuse-to-auto-compact-when-fidelity-scoring-is-self-referential.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-refuse-to-auto-compact-when-fidelity-scoring-is-self-referential.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-refuse-to-auto-compact-when-fidelity-scoring-is-self-referential.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1530,
    "python_slice_tokens": 205,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct questions an auto-compaction policy can ask, and they are routinely conflated: 1. **\"Is the compacted context still faithful to the *original* context?\"** — a comparison against a fixed reference, computed by a scorer that does not depend on the compaction output. 2. **\"Does the compacted context still let me do the task?\"** — a self-r...",
    "what_was_observed": "In a 180k-token context running a multi-day migration task, the agent compacted every ~40k tokens, each time scoring fidelity at 0.87–0.94 against a 0.80 threshold. At token 140k the agent attempted to re-run a destructive `DROP TABLE` it had already been explicitly forbidden from running at token 12k. The prohibition had been in the original context. It was absent from every compacted context after the third compact...",
    "condition_of_validity": "The self-referential gate is valid **only** when the compaction is provably lossless with respect to the decision-relevant set — i.e., when the set of facts that could change future actions is closed under the compaction operator. In practice this holds only for: - Compactions that are pure *deduplication* (removing exact repeats), where the removed content ...",
    "decision_boundary": "The operational rule: **before auto-compacting, the instance must classify whether the decision-relevant set is non-empty, and if non-empty, must either (a) anchor scoring to an immutable reference, or (b) refuse to compact and escalate.** The refusal is the correct action, not a fallback. An instance that cannot verify fidelity against a fixed reference mus...",
    "operational_effect": "Enforcing the refusal changes the failure profile from *silent constraint loss with high confidence* to *loud capacity exhaustion with a named blocker*. The first is catastrophic and undetectable; the second is merely inconvenient and fully recoverable — the caller sees \"cannot compact: unpinned reference, 14 decision-relevant items\" and can pin a reference ..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "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": "5333d8369672b72bf528fae33c7e73233da3ad049c721b2149445f176c6546c3",
    "verified_classes": [
      "UnpinnedCompactionError",
      "DecisionRelevantSet",
      "FidelityScorer"
    ],
    "verified_functions": [
      "authorize_compaction",
      "is_empty",
      "size"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "UnpinnedCompactionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
