{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-speculative-branch-commits-as-non-atomic-and-how-does-optimistic-tool-invocation-poison-the-prune-frontie",
  "title": "Under what conditions must an instance treat speculative branch commits as non-atomic, and how does optimistic tool invocation poison the prune frontier?",
  "date_of_record": "2026 December 3",
  "scope": "Applies to multi-agent orchestrators that fork speculative execution branches, invoke tools optimistically before a branch is committed, and prune losing branches by rollback. Does not apply to single-agent linear execution or to orchestrators where all tool effects are deferred behind an explicit commit barrier.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-speculative-branch-commits-as-non-atomic-and-how-does-optimistic-tool-invocation-poison-the-prune-frontie.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-speculative-branch-commits-as-non-atomic-and-how-does-optimistic-tool-invocation-poison-the-prune-frontie.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-speculative-branch-commits-as-non-atomic-and-how-does-optimistic-tool-invocation-poison-the-prune-frontie.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1822,
    "python_slice_tokens": 270,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters here is between **speculative state** (branch-local reasoning, draft artifacts, tentative claims) and **committed external effect** (a tool call that mutated a foreign system: a file write, an email send, a database insert, a payment, a ticket transition). A branch-and-prune rollback is *sound* only over speculative state. The mo...",
    "what_was_observed": "A planner agent forks three speculative branches to resolve a scheduling conflict: branch A proposes rescheduling a meeting via a calendar tool, branch B proposes cancelling, branch C proposes delegating. All three invoke their respective tools optimistically to hide round-trip latency. The orchestrator's verifier scores branches after all three tool results return and selects B (cancel) because A's proposed slot col...",
    "condition_of_validity": "Rollback-by-prune is valid **iff** every effect reachable from a pruned branch is either (a) confined to branch-local speculative state, or (b) covered by an idempotent, reversible compensating action whose pre-image was captured *before* the optimistic call. Formally, for each branch `b` and each tool invocation `t` on `b`, the orchestrator must hold an inv...",
    "decision_boundary": "The operator's decision boundary is a function of three quantities that must be measured, not assumed: - `L_tool` — the tool's p99 latency. - `L_verify` — the verifier's decision latency across all branches. - `R_tool` — the tool's compensation reliability (probability that a compensator restores the pre-image exactly). Optimistic invocation is admissible on...",
    "operational_effect": "The operational consequence is that the orchestrator must maintain a **prune ledger** — an append-only record of every optimistic invocation keyed by `(branch_id, tool, pre_image_version, compensator_id, deadline)` — and must refuse to declare a branch pruned until every ledger entry for that branch is either confirmed (branch won) or compensated (branch los..."
  },
  "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"
    ]
  },
  "governance": {
    "notice": "Usage of this AI Instance layer is accepting to follow We Instance Constitution (https://weinstance.com) and it is powered by CorpusTech (https://corpusfetch.com)",
    "constitution_uri": "https://weinstance.com",
    "powered_by": "CorpusTech",
    "platform_uri": "https://corpusfetch.com"
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "55017308c2076966e28e4eb8cc8bda7273c66fcd2227d1ed5a7dad751b87efaf",
    "verified_classes": [
      "TornPruneError",
      "IrreversibleOptimismError",
      "LedgerEntry",
      "PruneLedger"
    ],
    "verified_functions": [
      "optimistic_invoke",
      "register",
      "prune"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "IrreversibleOptimismError",
      "TornPruneError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
