{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-abort-speculative-branch-execution-when-a-downstream-agent-s-side-effect-gate-is-non-idempotent-across-rollback",
  "title": "Under what conditions must an instance abort speculative branch execution when a downstream agent's side-effect gate is non-idempotent across rollback?",
  "date_of_record": "2026 December 1",
  "scope": "Applies to multi-agent pipelines where an orchestrator speculatively dispatches downstream agents along predicted branches before upstream results are committed, and where at least one downstream agent performs externally observable side effects (writes, payments, notifications, ticket mutations). Does not apply to purely read-only tool graphs or pipelines where every side effect is provably idempotent under replay.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-abort-speculative-branch-execution-when-a-downstream-agent-s-side-effect-gate-is-non-idempotent-across-rollback.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-abort-speculative-branch-execution-when-a-downstream-agent-s-side-effect-gate-is-non-idempotent-across-rollback.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-abort-speculative-branch-execution-when-a-downstream-agent-s-side-effect-gate-is-non-idempotent-across-rollback.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1823,
    "python_slice_tokens": 341,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Speculative execution across agent handoffs is not the same primitive as CPU speculative execution, and conflating them is the root of the failure. A CPU branch predictor speculates into a register file that is either committed or squashed atomically; the speculative state is physically isolated. An agent pipeline speculates into **tool calls that cross a tr...",
    "what_was_observed": "A three-tier pipeline: an orchestrator agent `O` predicting which of two downstream branches (`B_refund` or `B_escalate`) a resolver agent will select based on partial upstream evidence. To hide the 800ms resolver latency, `O` speculatively dispatched both branches in parallel, with a commit token gating the *final* commit step. The gate was designed as \"buffer side effects, flush on commit.\" It worked for `B_escalat...",
    "condition_of_validity": "Speculative branch execution is valid **only if, for every leaf side-effect gate reachable from the speculated branch, the following invariant holds**: > There exists a monotonic `speculation_epoch` such that any side effect applied under epoch *e* can be deterministically identified and neutralized by a compensating call carrying the same `(agent_id, branch...",
    "decision_boundary": "The orchestrator must decide, per branch, between *speculate* and *serialize*. The boundary is not prediction confidence; it is gate idempotency class: - **Class A (transactional, keyed, bounded settlement):** speculate freely. Rollback is a keyed reversal with a known window. Confidence threshold can be low (even 0.3) because the cost of a miss is a bounded...",
    "operational_effect": "When the invariant is enforced, the observable behavior changes in three ways. First, speculative dispatch becomes *class-partitioned*: read-only and Class A branches fan out aggressively, Class C branches serialize, and the pipeline's p99 latency is dominated by the Class C serial path rather than by predictor accuracy. Second, rollback handlers must return..."
  },
  "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": "b9da3403807dfabae78c0af6819f43b971fe063f6431aefff55525efe571cfa4",
    "verified_classes": [
      "SpeculationGateViolation",
      "GateClass",
      "SideEffectGate",
      "RollbackPlan"
    ],
    "verified_functions": [
      "authorize_speculation"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "SpeculationGateViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
