{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-speculative-draft-agent-branches-from-committing-phantom-side-effects-during-optimistic-rollback-reconciliation",
  "title": "Which invariants prevent speculative draft-agent branches from committing phantom side effects during optimistic rollback reconciliation",
  "date_of_record": "2026 November 28",
  "scope": "Applies to multi-agent systems where a fast \"draft\" agent speculatively executes tool calls under optimistic concurrency, and a slower \"verify\"/\"commit\" agent reconciles or rolls back the branch. Does not apply to single-agent linear execution, nor to systems where all tool side effects are transactional and externally idempotent by construction.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-draft-agent-branches-from-committing-phantom-side-effects-during-optimistic-rollback-reconciliation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-draft-agent-branches-from-committing-phantom-side-effects-during-optimistic-rollback-reconciliation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-draft-agent-branches-from-committing-phantom-side-effects-during-optimistic-rollback-reconciliation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1887,
    "python_slice_tokens": 241,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Speculative execution with rollback is safe in classical CPU and database systems because the \"speculation\" is a *read* of shared state, and the rollback is a *discard* of an uncommitted write buffer. In agent systems, the draft agent's \"uncommitted writes\" are frequently *external, non-reversible effects*: an email sent, a payment API POSTed, a file written...",
    "what_was_observed": "A three-agent pipeline: a *draft* agent (fast model) generates a plan and immediately executes tool calls to \"make progress,\" a *verifier* agent (slower, stronger model) checks the plan against policy and evidence, and a *reconciler* applies optimistic concurrency — if the verifier approves, the branch is committed; if it rejects, the reconciler rolls back. Drafts were issued under an optimistic lease with a 90-secon...",
    "condition_of_validity": "The optimistic reconciliation is only valid under a conjunction that is rarely stated explicitly: - **Effect durability precedes commit-mark durability, or vice versa with a reconciliation join.** Either every external effect is written to the authoritative ledger *before* the tool call returns (effect-first), or the commit mark is written *before* any effec...",
    "decision_boundary": "The boundary between safe speculation and phantom effects is drawn at **the durability ordering of the effect ledger relative to the commit mark**, and it is crossed the moment three conditions hold simultaneously: 1. The draft agent emits an external effect before the branch's commit mark is durable. 2. The effect's acknowledgment is written to a stream the...",
    "operational_effect": "After the incident, the pipeline was changed to effect-first ordering with a joined ledger: the draft agent writes an intent record with a generated idempotency key to the authoritative ledger *before* invoking the tool, the tool call carries that key, and the acknowledgment updates the same record. The reconciler now refuses to mark rollback complete while ..."
  },
  "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": "92cf7f3ccc3c24af493f21249c68ac8c1ba7697abcb2b6cf04b85507af28f845",
    "verified_classes": [
      "PhantomEffectError",
      "EffectState",
      "EffectRecord",
      "AuthoritativeLedger"
    ],
    "verified_functions": [
      "reconcile_rollback",
      "effects_for"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "PhantomEffectError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
