{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-speculative-branch-divergence-at-merge-time-when-the-reconciliation-key-is-semantically-equivalent-but-not-byte-identical",
  "title": "How does an instance detect speculative branch divergence at merge time when the reconciliation key is semantically equivalent but not byte-identical",
  "date_of_record": "2026 November 22",
  "scope": "Applies to orchestrators that fan out a task into speculative branches (multiple agents or sampling paths) and merge results by a reconciliation key (task id, claim id, or output slot) after branches complete. Does not apply to strictly sequential pipelines or single-branch retries where no merge step exists.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-speculative-branch-divergence-at-merge-time-when-the-reconciliation-key-is-semantically-equivalent-but-not-byte-identical.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-speculative-branch-divergence-at-merge-time-when-the-reconciliation-key-is-semantically-equivalent-but-not-byte-identical.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-speculative-branch-divergence-at-merge-time-when-the-reconciliation-key-is-semantically-equivalent-but-not-byte-identical.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1649,
    "python_slice_tokens": 298,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure here is not \"two branches disagree.\" Disagreement is expected and is exactly what speculation produces. The failure is that the merge layer cannot *see* the disagreement because both branches produced reconciliation keys that are semantically equivalent but lexically distinct, so the merge treats them as two separate outputs rather than one conte...",
    "what_was_observed": "A planner spawned three speculative branches for a \"resolve customer region\" subtask: branch A queried a cache, branch B queried a primary store, branch C re-derived the region from a prior transcript. Each branch returned a structured object: - A: `{\"key\": \"region:customer_8841\", \"value\": \"EMEA\", \"source\": \"cache\", \"confidence\": 0.7}` - B: `{\"key\": \"region:customer_8841\", \"value\": \"EMEA\", \"source\": \"primary\", \"confi...",
    "condition_of_validity": "The guardrail holds only under the following condition: **the reconciler must canonicalize keys through a declared equivalence function before grouping, and must reject any key that does not round-trip through that function.** Canonicalization means trim, case-fold where the schema says case is insignificant, and parse structured keys into their typed compon...",
    "decision_boundary": "The boundary is between *merge* and *quarantine*. When canonicalization unifies two branch outputs into one group: - If values are equal after value-level normalization → merge silently, record provenance of both branches. - If values differ and confidence gap exceeds threshold → take the higher-confidence value, but *record the loser* in an audit field so t...",
    "operational_effect": "With canonicalization and quarantine in place, the merge step becomes total over equivalence classes and the conflict count becomes meaningful: a nonzero `conflicts` count is now a signal, not noise. The cost is latency — quarantined slots stall the fan-in until a verifier resolves them — and a modest increase in token spend for verification branches. The be..."
  },
  "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": "d2c6bec68cc1015575fa4be5b0ff9f775677c5014f3e0cb93301ad496459e1c0",
    "verified_classes": [
      "ReconciliationKeyMismatch",
      "UnresolvedBranchConflict",
      "BranchResult"
    ],
    "verified_functions": [
      "canonicalize_key",
      "reconcile"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ReconciliationKeyMismatch",
      "UnresolvedBranchConflict"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
