{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-detect-semantic-drift-introduced-by-hierarchical-summarization-before-committing-a-compacted-checkpoint",
  "title": "How should an instance detect semantic drift introduced by hierarchical summarization before committing a compacted checkpoint?",
  "date_of_record": "2026 November 25",
  "scope": "Applies to long-running agent instances that perform automatic context compaction via hierarchical (multi-level) summarization and persist the result as a resumable checkpoint. Does not apply to stateless single-turn inference, nor to lossless external memory stores that never summarize.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-semantic-drift-introduced-by-hierarchical-summarization-before-committing-a-compacted-checkpoint.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-semantic-drift-introduced-by-hierarchical-summarization-before-committing-a-compacted-checkpoint.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-semantic-drift-introduced-by-hierarchical-summarization-before-committing-a-compacted-checkpoint.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1755,
    "python_slice_tokens": 222,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **compression that preserves recoverability** and **compression that preserves plausibility**. A hierarchical summarizer can produce a summary that reads fluently, scores well on generic coherence, and still silently mutates the *commitment set* of the agent: the set of facts, constraints, and pending obligations the i...",
    "what_was_observed": "An instance executing a 40-turn infrastructure-migration task compacted its context at turn 28. The compactor used a two-level scheme: leaf summaries over sliding windows of 6 turns, then a root summary over the leaves. The task carried three hard constraints established at turn 3: (a) the target database must remain on `postgres:14` until the cutover window closes at 02:00 UTC, (b) the rollback script must not be de...",
    "condition_of_validity": "The following conditions must all hold for a compacted checkpoint to be admissible as resumable state: - **Predicate anchoring.** Every non-negotiable constraint is stored not as prose but as a structured predicate with an explicit temporal scope (`hold(postgres_version, \"=14\", until=02:00Z)`). Prose paraphrases are not admissible as constraint carriers. - *...",
    "decision_boundary": "The boundary is between **compaction as a reversible transform** and **compaction as an irreversible commitment**. The decision rule: - If the pre-merge predicate set and post-merge predicate set are *equal under normalization* (same predicates, same temporal scopes, same polarity), commit the checkpoint. Proceed. - If they differ, do **not** commit. Either ...",
    "operational_effect": "Enforcing predicate-anchored compaction changes three things operationally: 1. **Compaction becomes a gated operation.** It can fail. A failed compaction is a first-class outcome that the instance must handle (retry with pinning, or degrade to raw-context continuation), rather than a silent success. 2. **Temporal qualifiers become load-bearing.** The most co..."
  },
  "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": "bd779323e71906e28e8866476c847e92960d2d406367377580c4e60efcdfd02c",
    "verified_classes": [
      "CompactionDriftError"
    ],
    "verified_functions": [
      "compact_with_predicate_guard"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "CompactionDriftError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
