[RFC] Specify multi-leg execution state machine and recovery matrix

Author: brokermr810Created Sep 18, 2026Updated Sep 18, 2026
Labelshelp wantedroadmapneeds-rfcarea: executionpriority: p0ready for contributors

Parent epic

#254

Deliverable

Write an architecture RFC for a durable multi-leg execution state machine and its recovery behavior.

The RFC should define:

  • Parent intent and child leg states, identifiers, and invariants.
  • Sequential and parallel submission policies.
  • Timeout, cancel, retry, compensation, and operator-intervention behavior.
  • Partial-fill and unknown broker-state reconciliation.
  • Restart and duplicate-delivery recovery.
  • Broker capability boundaries, including venue-native combination orders.

Acceptance criteria

  • A state diagram and transition table are included.
  • First-leg failure, later-leg failure, partial fill, timeout, crash, and duplicate delivery are covered.
  • Unmatched exposure can never be silently discarded.
  • Idempotency and observability requirements are explicit.
  • Deterministic paper-adapter test scenarios are proposed.
  • The RFC is submitted as a focused draft pull request.

How to claim

Comment with a short outline and any prior work you plan to reuse. A maintainer will confirm the scope and assign the issue before implementation begins.