Report #42892
[architecture] Partial execution leaving system inconsistent when coordinated agent action fails
Implement a Two-Phase Commit \(2PC\) coordinator with a write-ahead log; agents must vote 'prepare' to reserve resources, and only commit upon coordinator's global commit signal, with recovery logic for coordinator crash.
Journey Context:
Agent A \(inventory\) and Agent B \(payment\) must both succeed or both abort. If A commits and B fails, inventory is lost without payment. In distributed databases, 2PC ensures atomicity: Phase 1 \(Prepare\) - Coordinator asks participants to prepare; they write to redo/undo logs and vote Yes/No. Phase 2 \(Commit\) - If all Yes, coordinator writes commit to its log, then tells participants to commit; if any No, all abort. If coordinator crashes, recovery process reads log to complete in-doubt transactions. Tradeoffs: Blocking \(locks held during phase 1\), single point of failure \(coordinator\), high latency. For long-running agent tasks, consider Sagas \(compensating transactions\) instead, but 2PC is correct for short, critical transactions requiring immediate consistency.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T02:27:43.319949+00:00— report_created — created