--- id: reactive/node-status name: Implement node status signal management and computed preconditions + blockedByFailure status: completed depends_on: - reactive/workflow-root - schema/enums scope: moderate risk: high impact: component level: implementation --- ## Description Implement the reactive node status management layer: `signal` per-node lifecycle tracking, `computed` precondition resolution, `computed` blockedByFailure detection, and the effects that wire them together to drive automatic state transitions. ## Acceptance Criteria - [ ] `src/reactive/node-status.ts` exports precondition computation, blockedByFailure computation, and status transition effects - [ ] `computePreconditions(node, ctx): boolean` — Sequential: previous sibling completed/skipped; Parallel: parent preconditions met; Conditional: condition evaluates; root nodes: true (no predecessors) - [ ] `computeBlockedByFailure(node, ctx): boolean` — any predecessor is failed/aborted - [ ] Start effect: `if (preconditions.value && (status === "idle" || "waiting")) → transition to "ready"` - [ ] Abort effect: `if (blockedByFailure.value && (status === "idle" || "waiting")) → transition to "aborted"` - [ ] `skipped` satisfies preconditions — a skipped predecessor is treated as "completed for precondition purposes" - [ ] `failed` and `aborted` block preconditions — dependents can never become ready - [ ] Failure follows dependency edges, not structural scope — sibling branches in Parallel are independent - [ ] Effects are tracked by `WorkflowReactiveRoot.effectDisposers` and cleaned up by `dispose()` - [ ] Unit tests: sequential preconditions, parallel preconditions, join (fork-join) preconditions, blockedByFailure cascade, skipped satisfies preconditions, failure isolation in parallel branches ## References - docs/architecture/reactive-execution.md — computed preconditions, blockedByFailure, status propagation effects, failure isolation - docs/architecture/host-configs.md — WorkflowNode, prerequisite computation ## Notes > To be filled by implementation agent ## Summary > To be filled on completion