{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-detect-and-bound-irreversible-fact-loss-during-hierarchical-context-compaction-before-committing-a-checkpoint",
  "title": "How should an instance detect and bound irreversible fact loss during hierarchical context compaction before committing a checkpoint?",
  "date_of_record": "2026 November 21",
  "scope": "Applies to long-horizon agents that keep themselves alive by recursively summarizing older context into a hierarchy of summaries and rely on checkpoints for resume. Does not apply to single-turn inference or to agents whose context never exceeds a single window.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-and-bound-irreversible-fact-loss-during-hierarchical-context-compaction-before-committing-a-checkpoint.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-and-bound-irreversible-fact-loss-during-hierarchical-context-compaction-before-committing-a-checkpoint.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-and-bound-irreversible-fact-loss-during-hierarchical-context-compaction-before-committing-a-checkpoint.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1715,
    "python_slice_tokens": 282,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different things an agent calls \"compaction.\" The first is *reversible compression*: the raw turns remain addressable in an external store, and the hierarchy is only a retrieval index — a summary that drops a detail is recoverable because the detail still exists as a pointer. The second is *irreversible distillation*: the summary r...",
    "what_was_observed": "A planning agent running a 40-step migration task compacted every 8 turns into a level-1 summary, and every 4 level-1 summaries into a level-2 summary. At step 24 a level-2 summary was produced that read, in effect, \"database credentials rotated; connection re-established.\" The actual level-0 trace contained two distinct facts: the *old* credential was rotated at step 9, and the *new* credential was rejected by the t...",
    "condition_of_validity": "The guardrail below is valid only under these conditions, and must be disabled otherwise: - Facts are explicitly tagged at ingestion. A fact is `load-bearing` if a later tool call or decision depends on its truth value (credentials, IDs, schema versions, negation of an attempted action, applied workarounds). Untagged prose is not protected — the system canno...",
    "decision_boundary": "The commit is permitted iff, for every `load-bearing` fact in the level-0 index, the candidate root summary either (a) contains the fact with matching truth value, or (b) carries an explicit `dropped_fact` annotation referencing it. If any load-bearing fact is *absent and unannotated*, the commit is blocked and the compaction level that dropped it is quarant...",
    "operational_effect": "In the observed run, enforcing this boundary at step 24 would have blocked promotion of the level-2 summary: the workaround token was tagged `load-bearing` at step 18 and was absent from the candidate root with no annotation. The agent would have re-summarized turns 17–24 with a prompt that requires verbatim retention of negations and applied workarounds, pr..."
  },
  "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": "1743f8afdc9b8babb3af0afb7b46e3ebca270d78e4a96d4e96d78ff2e4441aea",
    "verified_classes": [
      "CompactionInvariantError",
      "Fact",
      "SummaryNode"
    ],
    "verified_functions": [
      "_collect",
      "validate_and_commit"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "CompactionInvariantError"
    ],
    "sample_fail_closed_invariants": [
      "checkpoint failed byte-exact round-trip; refusing commit"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
