{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-refuse-to-merge-a-speculative-branch-after-an-optimistic-tool-call-invalidation-has-been-partially-observed-by-a-do",
  "title": "In what scenarios must an instance refuse to merge a speculative branch after an optimistic tool-call invalidation has been partially observed by a downstream peer",
  "date_of_record": "2026 November 26",
  "scope": "Applies to multi-agent systems that fork speculative execution branches (e.g., parallel plan rollouts, speculative tool-call pre-execution) and reconcile them via optimistic invalidation when a tool result contradicts an assumption. Does not apply to single-agent retry loops, to purely read-only tool fan-outs with no side effects, or to branches reconciled through an authoritative serializing coordinator that never exposes intermediate state to peers.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-to-merge-a-speculative-branch-after-an-optimistic-tool-call-invalidation-has-been-partially-observed-by-a-do.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-to-merge-a-speculative-branch-after-an-optimistic-tool-call-invalidation-has-been-partially-observed-by-a-do.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-to-merge-a-speculative-branch-after-an-optimistic-tool-call-invalidation-has-been-partially-observed-by-a-do.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1674,
    "python_slice_tokens": 301,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"a speculative branch produced a wrong answer.\" That is expected and cheap to discard. The failure mode is a **partially observed invalidation**: a speculative branch executes an optimistic tool call, publishes the resulting state delta to a peer (or to a shared effect log) *before* the invalidation signal arrives, and the peer then a...",
    "what_was_observed": "A planner agent forks three speculative branches for a data-migration task. Branch B optimistically calls `reserve_shard(id=7)` — a tool with a real side effect — reasoning that the plan \"probably\" requires it. The tool returns `reserved` at `t=120ms`. At `t=140ms` Branch B publishes a delta `{shard_7: reserved_by_B}` to the shared effect log. An executor peer, polling the log, reads this delta at `t=155ms` and sched...",
    "condition_of_validity": "The reconciler's \"rolled-back branches are no-ops\" rule is valid **only under the read-your-own-writes isolation assumption**: no peer reads a delta until the producing branch has committed. Speculative execution violates this by construction — the entire point is to publish early. The rule is therefore conditionally valid, and the condition is checkable: 1....",
    "decision_boundary": "The instance must refuse the merge — not warn, refuse — when any of the following holds at reconciliation time: - The invalidated branch's read-set is non-empty **and** at least one reader's derivation hash changed after its read (it acted on the delta). - A reader's checkpoint predates its read of the delta, so rollback of the reader would itself discard un...",
    "operational_effect": "With the read-set gate in place, speculative branches become *conditionally* mergeable and the reconciler's correctness no longer depends on timing luck. The cost is that reconciliation becomes a distributed join over read-sets rather than a local status check, and merges can block on peer rollback — introducing a new liveness concern: a reader that cannot b..."
  },
  "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": "3363992511caa03436b44d5d07a54b96b38814960341776417d22a57a8164fb2",
    "verified_classes": [
      "UnsafeSpeculativeMerge",
      "ReadRecord",
      "SpeculativeBranch"
    ],
    "verified_functions": [
      "reconcile_branch"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "UnsafeSpeculativeMerge"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
