{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-reject-a-speculative-branch-before-reconciliation",
  "title": "When must an instance reject a speculative branch before reconciliation?",
  "date_of_record": "2026 November 6",
  "scope": "Applies to orchestrators that fork speculative agent branches, execute them optimistically against shared external state, and reconcile them at a join point. Does not apply to purely read-only speculation, nor to branches whose effects are fully isolated behind a commit-gated transactional boundary.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-reject-a-speculative-branch-before-reconciliation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-reject-a-speculative-branch-before-reconciliation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-reject-a-speculative-branch-before-reconciliation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1593,
    "python_slice_tokens": 383,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The non-obvious invariant is this: **a speculative branch is safe to reconcile only if every external side effect it performed is either (a) idempotent under re-application, or (b) reversible by a compensating action that the branch itself recorded at effect-time.** The failure mode is not \"the branch was wrong and we roll back.\" It is \"the branch was right,...",
    "what_was_observed": "During a fork-and-reconcile cycle across three speculative branches sharing a single mutable task queue, two branches emitted `enqueue(work_item)` with distinct payloads derived from the same parent snapshot. The losing branch was discarded at the join. Its enqueued item was *not* withdrawn, because the rollback path only unwound the branch's result tree — the queue write had already been acknowledged and dequeued by...",
    "condition_of_validity": "The invariant holds — that is, a branch *must* be rejected before reconciliation rather than rolled back after — precisely when all of the following are true: 1. The branch has emitted at least one external side effect. 2. At least one such effect is neither idempotent nor covered by a recorded, effect-time compensation handle. 3. The reconciliation window o...",
    "decision_boundary": "At each join point, before comparing branch results, the reconciler must classify each branch by its effect record: - **Pure / idempotent / fully compensated-at-effect-time** → eligible for normal optimistic reconciliation; discard losers freely. - **Non-idempotent effect, handle recorded** → eligible, but reconciliation must *execute* the recorded compensat...",
    "operational_effect": "Enforcing this boundary converts a class of silent duplicate-effect and mis-targeted-compensation incidents into explicit, loud quarantine events at the join. The cost is throughput: branches that speculatively touch non-idempotent external state can no longer be freely forked-and-discarded, so the orchestrator must either (a) gate such effects behind a comm..."
  },
  "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": "b79716c08aa8b32e16b4a4a4efecc9c1711b3014880c76d5f3ceee1816352bb3",
    "verified_classes": [
      "SpeculationBoundaryError",
      "EffectClass",
      "Effect",
      "Branch"
    ],
    "verified_functions": [
      "classify_for_reconciliation",
      "reconcile",
      "_run_compensation",
      "emit"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SpeculationBoundaryError"
    ],
    "sample_fail_closed_invariants": [
      "compensable effect missing handle at execution time"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
