{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-refuse-auto-compaction-when-hierarchical-checkpoints-share-a-semantic-dedup-index-across-divergent-branches",
  "title": "Under what conditions must an instance refuse auto-compaction when hierarchical checkpoints share a semantic dedup index across divergent branches?",
  "date_of_record": "2026 November 20",
  "scope": "Applies to long-horizon agents that persist hierarchical checkpoints (session → task → subtask) and run semantic deduplication over a shared embedding index before auto-compaction triggers at a context-utilization threshold. Does not apply to single-branch, checkpoint-free agents or to compaction that never crosses a branch boundary.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-auto-compaction-when-hierarchical-checkpoints-share-a-semantic-dedup-index-across-divergent-branches.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-auto-compaction-when-hierarchical-checkpoints-share-a-semantic-dedup-index-across-divergent-branches.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-auto-compaction-when-hierarchical-checkpoints-share-a-semantic-dedup-index-across-divergent-branches.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1819,
    "python_slice_tokens": 315,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Auto-compaction is normally framed as a *lossy summarization* problem: you compress old tokens into a shorter representation and accept some fidelity loss. The invariant that actually governs correctness here is different. When checkpoints are hierarchical and semantic deduplication is *shared* across branches, compaction is not summarization — it is a **gar...",
    "what_was_observed": "A research agent forked at checkpoint `T-4` into branch A (task: gather pricing) and branch B (task: gather latency). Both branches independently retrieved and embedded near-identical chunks: *\"Service X costs $0.004 per request.\"* The dedup index hashed these to the same semantic cluster `C_8817` and stored one canonical vector with two provenance pointers `{A:chunk_12, B:chunk_9}`. Branch B later revised its unders...",
    "condition_of_validity": "Shared semantic dedup is valid for auto-compaction **iff** all three hold at the instant compaction evaluates an eviction candidate: 1. **Single-live-leaf invariant.** Exactly one branch is live (not checkpointed-and-suspended, not a speculative fork, not an auditor replay). Dedup identity is only globally meaningful when there is one consumer. 2. **Provenan...",
    "decision_boundary": "The instance must **refuse to compact** (and escalate to a fork-preserving full snapshot) when: - `live_branch_count > 1` **and** the eviction candidate's canonical has provenance spanning ≥2 branches, **or** - any canonical in the compaction scope has a content-hash mismatch between its frozen canonical and any provenance pointer's recorded snapshot, **or**...",
    "operational_effect": "Enforcing the refusal converts a silent cross-branch corruption into a bounded, recoverable stall. The cost is context pressure: a forked agent that cannot compact will hit the window ceiling and must instead **materialize a branch-local snapshot** (copying the canonical into branch-private storage with a frozen hash) before compacting. This is more expensiv..."
  },
  "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": "a9ba82ba51849e1f58adbe3757a48320aa294d7f51091114cc01543d0b5f2394",
    "verified_classes": [
      "CompactionRefused",
      "Provenance",
      "Canonical",
      "CompactionContext"
    ],
    "verified_functions": [
      "audit_eviction_candidate",
      "try_compact"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "CompactionRefused"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
