{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-speculative-rollback-divergence-when-a-peer-agent-s-subgoal-commits-side-effects-the-rollback-log-cannot-see",
  "title": "How does an instance detect speculative-rollback divergence when a peer agent's subgoal commits side effects the rollback log cannot see",
  "date_of_record": "2026 November 28",
  "scope": "Applies to orchestrators that fan out speculative subgoal execution across multiple agents and rely on a per-agent rollback/undo log to abort losing branches. Does not apply to purely read-only speculation or to systems with full transactional snapshots of external state.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-speculative-rollback-divergence-when-a-peer-agent-s-subgoal-commits-side-effects-the-rollback-log-cannot-see.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-speculative-rollback-divergence-when-a-peer-agent-s-subgoal-commits-side-effects-the-rollback-log-cannot-see.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-speculative-rollback-divergence-when-a-peer-agent-s-subgoal-commits-side-effects-the-rollback-log-cannot-see.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1777,
    "python_slice_tokens": 306,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"a subgoal produced the wrong answer.\" It is the gap between *logical divergence* (two speculative branches reached incompatible outcomes) and *physical reversibility* (the losing branch's side effects can actually be unwound). Orchestrators routinely conflate the two: they treat \"rollback the losing branch\" as a log-replay operation, when...",
    "what_was_observed": "A three-agent planning swarm (orchestrator + two peers, `alpha` and `beta`) was speculatively executing two candidate subgoal decompositions for a data-migration task. Each peer ran in its own context window with a private tool namespace, but both shared a single object-store bucket and a single rate-limited external API credential. `alpha` won the branch comparison at step 7. The orchestrator issued a rollback to `b...",
    "condition_of_validity": "Speculative rollback is sound only when all three hold: 1. **Inverse completeness.** For every effect `e` emitted by a speculative branch, there exists a registered inverse `e⁻¹` such that applying `e⁻¹` restores the observable state to its pre-`e` value. Batch/fan-out endpoints violate this unless the inverse is defined per sub-request, not per call. 2. **A...",
    "decision_boundary": "The orchestrator must distinguish two rollback regimes and refuse to cross the boundary silently: - **Reversible speculation** (private scratch state, idempotent writes with per-key inverses, no shared credentials): rollback may proceed on the peer's log alone. - **Irreversible or shared speculation** (batch endpoints, shared locks, quota consumption, any ef...",
    "operational_effect": "The corrected architecture requires three changes: 1. **Per-unit inverses for fan-out tools.** A batch call's undo entry must enumerate sub-request IDs and their individual inverses, and the peer must report `compensated/requested` per unit, not per call. 2. **Shared-resource ledger at the orchestrator.** Locks, quotas, and shared-bucket writes are recorded ..."
  },
  "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": "2df8ca8413174cd21ddf459f92812075b947e9c09d97bd6c13346519b690589a",
    "verified_classes": [
      "CompensationGapError",
      "PeerReport",
      "OrchestratorLedger"
    ],
    "verified_functions": [
      "verify_rollback"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "CompensationGapError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
