Files
flowgraph/tasks/reactive-node-status.md

2.1 KiB

id, name, status, depends_on, scope, risk, impact, level
id name status depends_on scope risk impact level
reactive/node-status Implement node status signal management and computed preconditions + blockedByFailure completed
reactive/workflow-root
schema/enums
moderate high component implementation

Description

Implement the reactive node status management layer: signal<NodeStatus> per-node lifecycle tracking, computed<boolean> precondition resolution, computed<boolean> 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