feat: implement node status signal management with computed preconditions and blockedByFailure

- Add computePreconditions and computeBlockedByFailure functions to node-status.ts
- Add registerStartEffect and registerAbortEffect for automatic state transitions
- Start effect: idle/waiting -> ready when preconditions met
- Abort effect: idle/waiting -> aborted when blockedByFailure true
- Refactor WorkflowReactiveRoot to use node-status.ts functions
- Root nodes auto-transition from idle to ready (no predecessors = preconditions true)
- Add AbortEffectOptions with abortDependents policy support
- Add comprehensive unit tests for all precondition and failure isolation scenarios
This commit is contained in:
2026-05-21 22:16:46 +00:00
parent 18999fb38e
commit e98204161d
5 changed files with 781 additions and 39 deletions

View File

@@ -10,3 +10,12 @@ export {
type EventLogProjection,
type AggregateStatus,
} from "./workflow.js";
export {
computePreconditions,
computeBlockedByFailure,
registerStartEffect,
registerAbortEffect,
type NodeStatusContext,
type AbortEffectOptions,
} from "./node-status.js";