Failure And Recovery¶
This page explains shipped failure, cancel, and recovery semantics for the current
orchestrator -> worker -> worker-private MCP chain.
Current Design Truth¶
Private MCP failure starts as a worker concern. The worker-private MCP adapter turns transport
failures, descriptor rejection, malformed responses, timeout, cancel, and terminal failed states
into bounded MCP adapter outcomes. WorkerService catches those failures during task acceptance
and projection, converts them into worker-owned failed snapshots and WorkerExecutionReport
reports, and stores the resulting task record behind the public A2A task surface.
Mission failure is orchestrator-owned. MissionGraph applies worker reports to runtime task state,
records terminal attempts, applies retry policy, and persists mission snapshots. When tasks terminally
fail or cancel without a successful retry path, the graph finalizes mission state and writes final
worker reports. MissionRuntime catches unexpected graph exceptions and marks the mission failed
unless planning failure already produced the terminal state.
Cancel follows the same boundary. The orchestrator requests task cancel through the public worker
A2A cancel route. WorkerService marks cancel intent, calls the worker-private MCP adapter when
the task is cancelable, converges private runtime cancellation, and projects the result back into worker
lifecycle state. Unknown worker MCP operation cancel is a noop with worker-known context only; it
does not fabricate mission or task context.
Recovery is bounded and local to shipped authority. Worker task reads can recover stale or missing projectors by reading private runtime progress and terminal state, then re-establishing projection. The orchestrator observes worker reports and mission artifacts; it does not rebuild state by inspecting private LIFT2 internals or raw MCP diagnostics.
The canonical operator read model and public evidence hardening are shipped facts. Failure and
runtime evidence reaches readers through source-owned mission artifacts, the
MissionReadService facade, operator-read projection, McpOperationSnapshot, explicit
output_mapping, WorkerExecutionReport, and bounded public evidence policy. Mission,
monitoring, planning, and operator reads return typed public DTO projections; when planning reads
need persisted planner lineage, they load only the planning_trace slot through
StorageExposure.PUBLIC_PROJECTED. planner_outputs/private_debug/raw_responses.json and other
private debug sidecars are not read sources. Private MCP task IDs, request IDs, raw vendor
diagnostics, endpoints, tool names, runner presets, model paths, and local paths stay below the
worker boundary.
Failure And Recovery Diagram¶
This state diagram shows shipped failure ownership. Runtime errors become worker reports before they affect mission state.
stateDiagram-v2
[*] --> Dispatched: orchestrator sends assigned TaskNode
Dispatched --> Accepted: worker accepts over A2A
Accepted --> RuntimeRunning: worker starts worker-owned MCP operation
RuntimeRunning --> Succeeded: terminal success
RuntimeRunning --> WorkerFailed: rejected, malformed, unavailable, timeout, or failed
RuntimeRunning --> CancelRequested: orchestrator asks worker to cancel over A2A
CancelRequested --> WorkerCanceled: worker projects cancel or noop
WorkerFailed --> RetryEligible: report applied to scheduler
RetryEligible --> Dispatched: retry policy allows another attempt
RetryEligible --> MissionFailed: retry policy exhausted
WorkerCanceled --> MissionCanceled: no successful retry path
Succeeded --> MissionStorage: terminal success report
MissionFailed --> MissionStorage: terminal failed mission state
MissionCanceled --> MissionStorage: terminal canceled mission state
MissionStorage --> [*]
Data And Control Flow¶
- The orchestrator dispatches an atomic
TaskNodeto a worker over A2A. - The worker starts or refreshes a worker-owned MCP operation through its private MCP adapter.
- The worker reads private runtime progress and terminal state, applies configured
output_mapping, and converges cancellation. - If the MCP adapter is unavailable, rejected, malformed, timed out, canceled, or failed, the
worker maps that outcome to a bounded
WorkerExecutionReportand task snapshot without raw MCP evidence. - The orchestrator observes the worker task, applies the report to runtime task state, and records task attempt disposition.
- Retry policy may reset the same node for another attempt. Otherwise the terminal worker report contributes to mission completion as failed or canceled.
- Mission artifacts preserve state, event timeline, task attempts, and final worker reports for northbound reads.
Failure Propagation Diagram¶
This diagram shows how worker-private runtime failures become mission-level outcomes.
flowchart TD
RuntimeError["Private MCP error, rejection, or timeout"] --> BridgeError["worker-private MCP adapter outcome"]
BridgeError --> WorkerRecord["WorkerService failed task record"]
CancelRequest["A2A cancel request"] --> WorkerCancel["WorkerService cancel intent"]
WorkerCancel --> RuntimeCancel["cancel or noop"]
RuntimeCancel --> WorkerRecord
WorkerRecord --> Snapshot["WorkerTaskSnapshot report"]
Snapshot --> MissionGraph["MissionGraph applies report"]
MissionGraph --> RetryDecision{"Retry allowed?"}
RetryDecision -->|"yes"| Retry["redispatch same TaskNode"]
RetryDecision -->|"no"| Terminal["failed or canceled mission state"]
Retry --> MissionGraph
Terminal --> Artifacts["MissionStorage artifacts"]
Artifacts --> Reads["operator reads"]
Authority Boundaries¶
| Failure concern | Current authority | Rule |
|---|---|---|
| Private MCP unavailable, malformed, rejected, timeout, canceled, failed | worker-private MCP adapter, WorkerService, LIFT2 mcp_server.py, mcp_runner_adapter.py, and mcp_lifecycle.py |
Private outcomes surface through bounded worker reports. |
| Worker task cancel | Public worker A2A cancel route plus WorkerService |
Orchestrator asks the worker; worker handles private runtime cancel. |
| Mission retry and terminal state | MissionGraph, scheduler state, mission artifacts |
Orchestrator applies retry policy and terminal mission status. |
| Unexpected mission loop exception | MissionRuntime |
Mission is marked failed through mission storage when the loop fails outside planning failure. |
| Public evidence and operator reads | Mission artifacts, operator read model projection, public evidence policy | Failure details visible northbound stay inside source-owned public DTO/projection policy. |
| Worker-private MCP mapping authority | deploy/worker-private/lift2/kitchen/, public topology profiles, and multi-device examples |
Private MCP mappings stay behind worker authority; public topology and multi-device runbooks consume them without becoming implementation authority. |
Validation Responsibilities¶
| Behavior | Source-owned validation responsibility |
|---|---|
| MCP adapter unavailable, rejected, malformed, timeout, canceled, failed mapping | Worker MCP adapter, operation projector, WorkerService, and runtime-failure source keep failures bounded before projection. |
| LIFT2 MCP task lifecycle, result, and cancel behavior | The deploy runtime source under external/lerobot_lab/deploy/lift2/omega_runtime/ owns private task lifecycle and result normalization. |
| Mission terminal state and retry handling | MissionGraph, scheduler state, and mission storage own retry decisions and terminal mission state. |
| Worker/MCP failure and cancellation behavior | Worker service plus private MCP operation projection own private cancel/failure convergence before public reporting. |
| Happy-path contrast for the same chain | Orchestrator, worker, worker-private MCP mappings, public topology profiles, and multi-device examples describe the same source-owned chain. |
| Trace/log correlation during failures | packages/observability/ and service app factories own trace/log correlation semantics. |
| Public evidence and operator read projection | Public evidence policy and operator read model contracts own northbound failure visibility. |
Current Status¶
This page reflects the current Engineering Preview implementation. Failure handling is bounded by the same authority split as the happy path: the orchestrator owns mission progression, artifacts, canonical operator reads, and public evidence projection; workers own task execution, private MCP operation identity, timeout/cancel convergence, terminal state re-read, and bounded projection.
Mission-level realtime transport is not part of the current Engineering Preview implementation. Live ROS/GPU/VLA/robot execution beyond
readiness or private-runner validation remains optional HUMAN-UAT evidence. Hard process/job
supervisor semantics for arbitrary blocking live runner work remain future SUPV-01 scope.
Source Of Truth¶
| Concern | Source-owned truth |
|---|---|
| Mission terminal state handling | apps/orchestrator/src/omega_orchestrator/graph.py, apps/orchestrator/src/omega_orchestrator/services/mission_runtime.py |
| Worker runtime error mapping and task records | apps/worker_agent/src/omega_worker_agent/execution/worker_service.py, apps/worker_agent/src/omega_worker_agent/execution/runtime_failures.py |
| MCP adapter errors | apps/worker_agent/src/omega_worker_agent/execution/runtime_failures.py, apps/worker_agent/src/omega_worker_agent/mcp/execution_adapter.py |
| Worker-owned MCP operation projection | apps/worker_agent/src/omega_worker_agent/mcp/operation.py, apps/worker_agent/src/omega_worker_agent/mcp/operation_projector.py |
| Private LIFT2 MCP task lifecycle | external/lerobot_lab/deploy/lift2/omega_runtime/mcp_server.py, external/lerobot_lab/deploy/lift2/omega_runtime/mcp_runner_adapter.py, external/lerobot_lab/deploy/lift2/omega_runtime/mcp_lifecycle.py |
| Public evidence policy | packages/contracts/src/omega_contracts/public_evidence.py |
| Operator read projection | packages/contracts/src/omega_contracts/operator_read_model.py, apps/orchestrator/src/omega_orchestrator/services/mission_reads/ |
| Worker-private kitchen MCP mappings | deploy/worker-private/lift2/kitchen/ |
| Public topology and multi-device examples | deploy/topology/, deploy/multi-device/ |