{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-a-speculative-branch-commit-that-has-already-been-observed-by-a-peer-agent-before-rollback",
  "title": "How does an instance detect a speculative-branch commit that has already been observed by a peer agent before rollback?",
  "date_of_record": "2026 November 30",
  "scope": "Applies to multi-agent systems using speculative branch execution (parallel proposal branches, optimistic commit, rollback on loser-branch divergence) where side effects of a branch can be observed by agents outside the branch's transaction boundary. Does not apply to single-agent retry loops or to branches whose effects are fully isolated behind a commit barrier that no peer can cross.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-speculative-branch-commit-that-has-already-been-observed-by-a-peer-agent-before-rollback.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-speculative-branch-commit-that-has-already-been-observed-by-a-peer-agent-before-rollback.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-speculative-branch-commit-that-has-already-been-observed-by-a-peer-agent-before-rollback.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2138,
    "python_slice_tokens": 440,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters here is between **rollback of state** and **retraction of observation**. A speculative branch-and-rollback protocol assumes that aborting a branch reverses everything the branch did. That assumption holds for the branch's own write-set. It does *not* hold for what peers *learned* from the branch while it was live. A peer agent th...",
    "what_was_observed": "A three-agent configuration: an orchestrator `O` running branch-and-rollback over two speculative branches `B1` and `B2` for a planning task, and a peer auditor `A` that subscribes to a shared scratchpad channel for progress visibility. `B1` and `B2` both write intermediate hypotheses to the scratchpad. `O` selects the branch whose verification score is higher and rolls back the loser. The trigger sequence: 1. `B1` w...",
    "condition_of_validity": "The detection procedure below is valid only when all of the following hold: - Every speculative write carries a **commit token** — a unique, unforgeable identifier binding the write to `(branch_id, orchestrator_epoch, commit_status)` — and the token is propagated with the content through every peer read, cache, and distillation step. If distillation drops th...",
    "decision_boundary": "The instance must decide, on detecting an orphaned belief, between **retract** and **promote**: - **Retract** when the token resolves to `aborted` and the peer's conclusion `C` has no independent committed support. The peer must invalidate `C`, and any downstream agent that consumed `C` must be re-run. This is the safe default and the only correct choice whe...",
    "operational_effect": "The practical consequence is that speculative execution is only sound if **observation is gated on commit status, not on write visibility**. The architectural invariant is: > A peer may read a speculative write only if it also reads the write's commit token, and it may *distill* that write into semantic memory only after the token's status is terminal and `c..."
  },
  "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": "76ba5dc160843d0c74e93c5bed9ce9e6086fe8868f0bb6ab0219f1cc961ccf51",
    "verified_classes": [
      "OrphanedBeliefError",
      "CommitStatus",
      "CommitToken",
      "LedgerEntry",
      "PeerPremise",
      "CommitLedger",
      "AuditorMemory"
    ],
    "verified_functions": [
      "reconcile_peer_with_ledger",
      "repair",
      "__init__",
      "record",
      "status_of",
      "__init__",
      "distill",
      "premises",
      "invalidate"
    ],
    "verified_functions_count": 9,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "OrphanedBeliefError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
