@calmo/task-runner 3.0.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jules/nexus.md +5 -0
- package/CHANGELOG.md +26 -0
- package/coverage/coverage-final.json +8 -6
- package/coverage/index.html +13 -13
- package/coverage/lcov-report/index.html +13 -13
- package/coverage/lcov-report/src/EventBus.ts.html +4 -4
- package/coverage/lcov-report/src/TaskGraphValidator.ts.html +38 -38
- package/coverage/lcov-report/src/TaskRunner.ts.html +194 -20
- package/coverage/lcov-report/src/TaskRunnerBuilder.ts.html +1 -1
- package/coverage/lcov-report/src/TaskRunnerExecutionConfig.ts.html +17 -2
- package/coverage/lcov-report/src/TaskStateManager.ts.html +34 -34
- package/coverage/lcov-report/src/WorkflowExecutor.ts.html +30 -30
- package/coverage/lcov-report/src/contracts/RunnerEvents.ts.html +1 -1
- package/coverage/lcov-report/src/contracts/index.html +1 -1
- package/coverage/lcov-report/src/index.html +9 -9
- package/coverage/lcov-report/src/strategies/DryRunExecutionStrategy.ts.html +178 -0
- package/coverage/lcov-report/src/strategies/RetryingExecutionStrategy.ts.html +355 -0
- package/coverage/lcov-report/src/strategies/StandardExecutionStrategy.ts.html +3 -3
- package/coverage/lcov-report/src/strategies/index.html +35 -5
- package/coverage/lcov.info +328 -214
- package/coverage/src/EventBus.ts.html +4 -4
- package/coverage/src/TaskGraphValidator.ts.html +38 -38
- package/coverage/src/TaskRunner.ts.html +194 -20
- package/coverage/src/TaskRunnerBuilder.ts.html +1 -1
- package/coverage/src/TaskRunnerExecutionConfig.ts.html +17 -2
- package/coverage/src/TaskStateManager.ts.html +34 -34
- package/coverage/src/WorkflowExecutor.ts.html +30 -30
- package/coverage/src/contracts/RunnerEvents.ts.html +1 -1
- package/coverage/src/contracts/index.html +1 -1
- package/coverage/src/index.html +9 -9
- package/coverage/src/strategies/DryRunExecutionStrategy.ts.html +178 -0
- package/coverage/src/strategies/RetryingExecutionStrategy.ts.html +355 -0
- package/coverage/src/strategies/StandardExecutionStrategy.ts.html +3 -3
- package/coverage/src/strategies/index.html +35 -5
- package/dist/TaskRunner.d.ts +12 -0
- package/dist/TaskRunner.js +47 -2
- package/dist/TaskRunner.js.map +1 -1
- package/dist/TaskRunnerExecutionConfig.d.ts +5 -0
- package/dist/TaskStep.d.ts +3 -0
- package/dist/contracts/TaskRetryConfig.d.ts +8 -0
- package/dist/contracts/TaskRetryConfig.js +2 -0
- package/dist/contracts/TaskRetryConfig.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/strategies/DryRunExecutionStrategy.d.ts +16 -0
- package/dist/strategies/DryRunExecutionStrategy.js +25 -0
- package/dist/strategies/DryRunExecutionStrategy.js.map +1 -0
- package/dist/strategies/RetryingExecutionStrategy.d.ts +12 -0
- package/dist/strategies/RetryingExecutionStrategy.js +74 -0
- package/dist/strategies/RetryingExecutionStrategy.js.map +1 -0
- package/openspec/changes/add-concurrency-control/proposal.md +6 -6
- package/openspec/changes/add-task-retry-policy/proposal.md +8 -5
- package/openspec/changes/archive/2026-01-18-add-workflow-preview/proposal.md +13 -0
- package/openspec/changes/archive/2026-01-18-add-workflow-preview/tasks.md +7 -0
- package/openspec/changes/feat-per-task-timeout/proposal.md +25 -0
- package/openspec/changes/feat-per-task-timeout/tasks.md +27 -0
- package/package.json +1 -1
- package/src/TaskRunner.ts +60 -2
- package/src/TaskRunnerExecutionConfig.ts +5 -0
- package/src/TaskStep.ts +3 -0
- package/src/contracts/TaskRetryConfig.ts +8 -0
- package/src/index.ts +2 -0
- package/src/strategies/DryRunExecutionStrategy.ts +31 -0
- package/src/strategies/RetryingExecutionStrategy.ts +90 -0
- package/test-report.xml +122 -82
- package/openspec/changes/add-workflow-preview/proposal.md +0 -12
- package/openspec/changes/add-workflow-preview/tasks.md +0 -7
package/test-report.xml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
2
|
-
<testsuites name="vitest tests" tests="
|
|
3
|
-
<testsuite name="tests/ComplexScenario.test.ts" timestamp="2026-01-
|
|
4
|
-
<testcase classname="tests/ComplexScenario.test.ts" name="Complex Scenario Integration Tests > 1. All steps execute when all succeed and context is hydrated" time="0.
|
|
2
|
+
<testsuites name="vitest tests" tests="82" failures="0" errors="0" time="0.785820378">
|
|
3
|
+
<testsuite name="tests/ComplexScenario.test.ts" timestamp="2026-01-18T18:46:49.739Z" hostname="runnervmmtnos" tests="2" failures="0" errors="0" skipped="0" time="0.013047963">
|
|
4
|
+
<testcase classname="tests/ComplexScenario.test.ts" name="Complex Scenario Integration Tests > 1. All steps execute when all succeed and context is hydrated" time="0.008439296">
|
|
5
5
|
<system-out>
|
|
6
6
|
Running StepA
|
|
7
7
|
Running StepB
|
|
@@ -15,163 +15,203 @@ Running StepG
|
|
|
15
15
|
|
|
16
16
|
</system-out>
|
|
17
17
|
</testcase>
|
|
18
|
-
<testcase classname="tests/ComplexScenario.test.ts" name="Complex Scenario Integration Tests > 2. The 'skip' propagation works as intended if something breaks up in the tree" time="0.
|
|
18
|
+
<testcase classname="tests/ComplexScenario.test.ts" name="Complex Scenario Integration Tests > 2. The 'skip' propagation works as intended if something breaks up in the tree" time="0.002316602">
|
|
19
19
|
</testcase>
|
|
20
20
|
</testsuite>
|
|
21
|
-
<testsuite name="tests/
|
|
22
|
-
<testcase classname="tests/
|
|
21
|
+
<testsuite name="tests/DryRunExecutionStrategy.test.ts" timestamp="2026-01-18T18:46:49.740Z" hostname="runnervmmtnos" tests="1" failures="0" errors="0" skipped="0" time="0.003482613">
|
|
22
|
+
<testcase classname="tests/DryRunExecutionStrategy.test.ts" name="DryRunExecutionStrategy > should return success without running the task" time="0.001915555">
|
|
23
23
|
</testcase>
|
|
24
24
|
</testsuite>
|
|
25
|
-
<testsuite name="tests/
|
|
26
|
-
<testcase classname="tests/
|
|
25
|
+
<testsuite name="tests/EventBus.test.ts" timestamp="2026-01-18T18:46:49.741Z" hostname="runnervmmtnos" tests="1" failures="0" errors="0" skipped="0" time="0.024092755">
|
|
26
|
+
<testcase classname="tests/EventBus.test.ts" name="EventBus > should handle async listeners throwing errors without crashing" time="0.020617446">
|
|
27
27
|
</testcase>
|
|
28
|
-
|
|
28
|
+
</testsuite>
|
|
29
|
+
<testsuite name="tests/TaskGraphValidator.test.ts" timestamp="2026-01-18T18:46:49.741Z" hostname="runnervmmtnos" tests="9" failures="0" errors="0" skipped="0" time="0.009883353">
|
|
30
|
+
<testcase classname="tests/TaskGraphValidator.test.ts" name="TaskGraphValidator > should be instantiated" time="0.001875719">
|
|
31
|
+
</testcase>
|
|
32
|
+
<testcase classname="tests/TaskGraphValidator.test.ts" name="TaskGraphValidator > should return valid result for empty graph" time="0.001637773">
|
|
29
33
|
</testcase>
|
|
30
|
-
<testcase classname="tests/TaskGraphValidator.test.ts" name="TaskGraphValidator > should detect duplicate tasks" time="0.
|
|
34
|
+
<testcase classname="tests/TaskGraphValidator.test.ts" name="TaskGraphValidator > should detect duplicate tasks" time="0.001916166">
|
|
31
35
|
</testcase>
|
|
32
|
-
<testcase classname="tests/TaskGraphValidator.test.ts" name="TaskGraphValidator > should detect missing dependencies" time="0.
|
|
36
|
+
<testcase classname="tests/TaskGraphValidator.test.ts" name="TaskGraphValidator > should detect missing dependencies" time="0.00044542">
|
|
33
37
|
</testcase>
|
|
34
|
-
<testcase classname="tests/TaskGraphValidator.test.ts" name="TaskGraphValidator > should detect cycles" time="0.
|
|
38
|
+
<testcase classname="tests/TaskGraphValidator.test.ts" name="TaskGraphValidator > should detect cycles" time="0.000433328">
|
|
35
39
|
</testcase>
|
|
36
|
-
<testcase classname="tests/TaskGraphValidator.test.ts" name="TaskGraphValidator > should return valid for a correct graph" time="0.
|
|
40
|
+
<testcase classname="tests/TaskGraphValidator.test.ts" name="TaskGraphValidator > should return valid for a correct graph" time="0.000368676">
|
|
37
41
|
</testcase>
|
|
38
|
-
<testcase classname="tests/TaskGraphValidator.test.ts" name="TaskGraphValidator > should not detect cycles if missing dependencies are present" time="0.
|
|
42
|
+
<testcase classname="tests/TaskGraphValidator.test.ts" name="TaskGraphValidator > should not detect cycles if missing dependencies are present" time="0.000359628">
|
|
39
43
|
</testcase>
|
|
40
|
-
<testcase classname="tests/TaskGraphValidator.test.ts" name="TaskGraphValidator > should detect more complex cycles" time="0.
|
|
44
|
+
<testcase classname="tests/TaskGraphValidator.test.ts" name="TaskGraphValidator > should detect more complex cycles" time="0.000276081">
|
|
41
45
|
</testcase>
|
|
42
|
-
<testcase classname="tests/TaskGraphValidator.test.ts" name="TaskGraphValidator > should handle cycle detection with no cycles but shared dependencies" time="0.
|
|
46
|
+
<testcase classname="tests/TaskGraphValidator.test.ts" name="TaskGraphValidator > should handle cycle detection with no cycles but shared dependencies" time="0.000227679">
|
|
43
47
|
</testcase>
|
|
44
48
|
</testsuite>
|
|
45
|
-
<testsuite name="tests/TaskGraphValidatorDoS.test.ts" timestamp="2026-01-
|
|
46
|
-
<testcase classname="tests/TaskGraphValidatorDoS.test.ts" name="TaskGraphValidator - Deep Recursion > should handle deep graphs without stack overflow" time="0.
|
|
49
|
+
<testsuite name="tests/TaskGraphValidatorDoS.test.ts" timestamp="2026-01-18T18:46:49.743Z" hostname="runnervmmtnos" tests="1" failures="0" errors="0" skipped="0" time="0.036618642">
|
|
50
|
+
<testcase classname="tests/TaskGraphValidatorDoS.test.ts" name="TaskGraphValidator - Deep Recursion > should handle deep graphs without stack overflow" time="0.035004656">
|
|
47
51
|
</testcase>
|
|
48
52
|
</testsuite>
|
|
49
|
-
<testsuite name="tests/TaskRunner.test.ts" timestamp="2026-01-
|
|
50
|
-
<testcase classname="tests/TaskRunner.test.ts" name="TaskRunner > should run tasks in the correct sequential order" time="0.
|
|
53
|
+
<testsuite name="tests/TaskRunner.test.ts" timestamp="2026-01-18T18:46:49.743Z" hostname="runnervmmtnos" tests="10" failures="0" errors="0" skipped="0" time="0.113731907">
|
|
54
|
+
<testcase classname="tests/TaskRunner.test.ts" name="TaskRunner > should run tasks in the correct sequential order" time="0.004694148">
|
|
51
55
|
</testcase>
|
|
52
|
-
<testcase classname="tests/TaskRunner.test.ts" name="TaskRunner > should handle an empty list of tasks gracefully" time="0.
|
|
56
|
+
<testcase classname="tests/TaskRunner.test.ts" name="TaskRunner > should handle an empty list of tasks gracefully" time="0.00059366">
|
|
53
57
|
</testcase>
|
|
54
|
-
<testcase classname="tests/TaskRunner.test.ts" name="TaskRunner > should run independent tasks in parallel" time="0.
|
|
58
|
+
<testcase classname="tests/TaskRunner.test.ts" name="TaskRunner > should run independent tasks in parallel" time="0.100602941">
|
|
55
59
|
</testcase>
|
|
56
|
-
<testcase classname="tests/TaskRunner.test.ts" name="TaskRunner > should skip dependent tasks if a root task fails" time="0.
|
|
60
|
+
<testcase classname="tests/TaskRunner.test.ts" name="TaskRunner > should skip dependent tasks if a root task fails" time="0.0004344">
|
|
57
61
|
</testcase>
|
|
58
|
-
<testcase classname="tests/TaskRunner.test.ts" name="TaskRunner > should throw an error for 'circular dependency'" time="0.
|
|
62
|
+
<testcase classname="tests/TaskRunner.test.ts" name="TaskRunner > should throw an error for 'circular dependency'" time="0.002507171">
|
|
59
63
|
</testcase>
|
|
60
|
-
<testcase classname="tests/TaskRunner.test.ts" name="TaskRunner > should throw an error for 'missing dependency'" time="0.
|
|
64
|
+
<testcase classname="tests/TaskRunner.test.ts" name="TaskRunner > should throw an error for 'missing dependency'" time="0.00044014">
|
|
61
65
|
</testcase>
|
|
62
|
-
<testcase classname="tests/TaskRunner.test.ts" name="TaskRunner > should handle tasks that throw an error during execution" time="0.
|
|
66
|
+
<testcase classname="tests/TaskRunner.test.ts" name="TaskRunner > should handle tasks that throw an error during execution" time="0.000387592">
|
|
63
67
|
</testcase>
|
|
64
|
-
<testcase classname="tests/TaskRunner.test.ts" name="TaskRunner > should skip tasks whose dependencies are skipped" time="0.
|
|
68
|
+
<testcase classname="tests/TaskRunner.test.ts" name="TaskRunner > should skip tasks whose dependencies are skipped" time="0.000607847">
|
|
65
69
|
</testcase>
|
|
66
|
-
<testcase classname="tests/TaskRunner.test.ts" name="TaskRunner > should handle tasks that throw a non-Error object during execution" time="0.
|
|
70
|
+
<testcase classname="tests/TaskRunner.test.ts" name="TaskRunner > should handle tasks that throw a non-Error object during execution" time="0.000421054">
|
|
67
71
|
</testcase>
|
|
68
|
-
<testcase classname="tests/TaskRunner.test.ts" name="TaskRunner > should handle duplicate steps where one gets skipped due to failed dependency" time="0.
|
|
72
|
+
<testcase classname="tests/TaskRunner.test.ts" name="TaskRunner > should handle duplicate steps where one gets skipped due to failed dependency" time="0.000498732">
|
|
69
73
|
</testcase>
|
|
70
74
|
</testsuite>
|
|
71
|
-
<testsuite name="tests/TaskRunnerEvents.test.ts" timestamp="2026-01-
|
|
72
|
-
<testcase classname="tests/TaskRunnerEvents.test.ts" name="TaskRunner Events > should fire all lifecycle events in a successful run" time="0.
|
|
75
|
+
<testsuite name="tests/TaskRunnerEvents.test.ts" timestamp="2026-01-18T18:46:49.745Z" hostname="runnervmmtnos" tests="7" failures="0" errors="0" skipped="0" time="0.018258426">
|
|
76
|
+
<testcase classname="tests/TaskRunnerEvents.test.ts" name="TaskRunner Events > should fire all lifecycle events in a successful run" time="0.0065126">
|
|
77
|
+
</testcase>
|
|
78
|
+
<testcase classname="tests/TaskRunnerEvents.test.ts" name="TaskRunner Events > should fire taskSkipped event when dependency fails" time="0.005135632">
|
|
79
|
+
</testcase>
|
|
80
|
+
<testcase classname="tests/TaskRunnerEvents.test.ts" name="TaskRunner Events > should not crash if a listener throws an error" time="0.001568409">
|
|
81
|
+
</testcase>
|
|
82
|
+
<testcase classname="tests/TaskRunnerEvents.test.ts" name="TaskRunner Events > should fire workflow events even for empty step list" time="0.000519159">
|
|
73
83
|
</testcase>
|
|
74
|
-
<testcase classname="tests/TaskRunnerEvents.test.ts" name="TaskRunner Events > should
|
|
84
|
+
<testcase classname="tests/TaskRunnerEvents.test.ts" name="TaskRunner Events > should handle unsubscribe correctly" time="0.001143738">
|
|
75
85
|
</testcase>
|
|
76
|
-
<testcase classname="tests/TaskRunnerEvents.test.ts" name="TaskRunner Events > should
|
|
86
|
+
<testcase classname="tests/TaskRunnerEvents.test.ts" name="TaskRunner Events > should safely handle off() when no listeners exist" time="0.000436914">
|
|
77
87
|
</testcase>
|
|
78
|
-
<testcase classname="tests/TaskRunnerEvents.test.ts" name="TaskRunner Events > should
|
|
88
|
+
<testcase classname="tests/TaskRunnerEvents.test.ts" name="TaskRunner Events > should support multiple listeners for the same event" time="0.000591366">
|
|
79
89
|
</testcase>
|
|
80
|
-
|
|
90
|
+
</testsuite>
|
|
91
|
+
<testsuite name="tests/TaskRunnerMermaid.test.ts" timestamp="2026-01-18T18:46:49.747Z" hostname="runnervmmtnos" tests="4" failures="0" errors="0" skipped="0" time="0.008826577">
|
|
92
|
+
<testcase classname="tests/TaskRunnerMermaid.test.ts" name="TaskRunner Mermaid Graph > should generate a simple graph with no dependencies" time="0.004010268">
|
|
93
|
+
</testcase>
|
|
94
|
+
<testcase classname="tests/TaskRunnerMermaid.test.ts" name="TaskRunner Mermaid Graph > should generate a graph with dependencies" time="0.00076336">
|
|
81
95
|
</testcase>
|
|
82
|
-
<testcase classname="tests/
|
|
96
|
+
<testcase classname="tests/TaskRunnerMermaid.test.ts" name="TaskRunner Mermaid Graph > should handle mixed independent and dependent tasks" time="0.000498951">
|
|
83
97
|
</testcase>
|
|
84
|
-
<testcase classname="tests/
|
|
98
|
+
<testcase classname="tests/TaskRunnerMermaid.test.ts" name="TaskRunner Mermaid Graph > should handle special characters in task names" time="0.000779572">
|
|
85
99
|
</testcase>
|
|
86
100
|
</testsuite>
|
|
87
|
-
<testsuite name="tests/TaskRunnerRefactor.test.ts" timestamp="2026-01-
|
|
88
|
-
<testcase classname="tests/TaskRunnerRefactor.test.ts" name="TaskRunner Refactor Coverage > should allow setting execution strategy" time="0.
|
|
101
|
+
<testsuite name="tests/TaskRunnerRefactor.test.ts" timestamp="2026-01-18T18:46:49.747Z" hostname="runnervmmtnos" tests="6" failures="0" errors="0" skipped="0" time="0.007360431">
|
|
102
|
+
<testcase classname="tests/TaskRunnerRefactor.test.ts" name="TaskRunner Refactor Coverage > should allow setting execution strategy" time="0.002132073">
|
|
89
103
|
</testcase>
|
|
90
|
-
<testcase classname="tests/TaskRunnerRefactor.test.ts" name="TaskRunner Refactor Coverage > should allow unsubscribing from events" time="0.
|
|
104
|
+
<testcase classname="tests/TaskRunnerRefactor.test.ts" name="TaskRunner Refactor Coverage > should allow unsubscribing from events" time="0.001008373">
|
|
91
105
|
</testcase>
|
|
92
|
-
<testcase classname="tests/TaskRunnerRefactor.test.ts" name="TaskRunner Refactor Coverage > TaskStateManager.cancelAllPending should handle non-existing tasks gracefully" time="0.
|
|
106
|
+
<testcase classname="tests/TaskRunnerRefactor.test.ts" name="TaskRunner Refactor Coverage > TaskStateManager.cancelAllPending should handle non-existing tasks gracefully" time="0.000394634">
|
|
93
107
|
</testcase>
|
|
94
|
-
<testcase classname="tests/TaskRunnerRefactor.test.ts" name="TaskRunner Refactor Coverage > TaskRunnerBuilder should build a TaskRunner" time="0.
|
|
108
|
+
<testcase classname="tests/TaskRunnerRefactor.test.ts" name="TaskRunner Refactor Coverage > TaskRunnerBuilder should build a TaskRunner" time="0.0005405">
|
|
95
109
|
</testcase>
|
|
96
|
-
<testcase classname="tests/TaskRunnerRefactor.test.ts" name="TaskRunner Refactor Coverage > TaskRunnerBuilder should build a TaskRunner with no listeners" time="0.
|
|
110
|
+
<testcase classname="tests/TaskRunnerRefactor.test.ts" name="TaskRunner Refactor Coverage > TaskRunnerBuilder should build a TaskRunner with no listeners" time="0.000147949">
|
|
97
111
|
</testcase>
|
|
98
|
-
<testcase classname="tests/TaskRunnerRefactor.test.ts" name="TaskRunner Refactor Coverage > WorkflowExecutor should break infinite loop if no progress can be made" time="0.
|
|
112
|
+
<testcase classname="tests/TaskRunnerRefactor.test.ts" name="TaskRunner Refactor Coverage > WorkflowExecutor should break infinite loop if no progress can be made" time="0.001442983">
|
|
99
113
|
</testcase>
|
|
100
114
|
</testsuite>
|
|
101
|
-
<testsuite name="tests/WorkflowExecutor.test.ts" timestamp="2026-01-
|
|
102
|
-
<testcase classname="tests/WorkflowExecutor.test.ts" name="WorkflowExecutor > should execute steps sequentially when dependencies exist" time="0.
|
|
115
|
+
<testsuite name="tests/WorkflowExecutor.test.ts" timestamp="2026-01-18T18:46:49.749Z" hostname="runnervmmtnos" tests="3" failures="0" errors="0" skipped="0" time="0.05590929">
|
|
116
|
+
<testcase classname="tests/WorkflowExecutor.test.ts" name="WorkflowExecutor > should execute steps sequentially when dependencies exist" time="0.002859246">
|
|
103
117
|
</testcase>
|
|
104
|
-
<testcase classname="tests/WorkflowExecutor.test.ts" name="WorkflowExecutor > should skip dependent steps if dependency fails" time="0.
|
|
118
|
+
<testcase classname="tests/WorkflowExecutor.test.ts" name="WorkflowExecutor > should skip dependent steps if dependency fails" time="0.000417738">
|
|
105
119
|
</testcase>
|
|
106
|
-
<testcase classname="tests/WorkflowExecutor.test.ts" name="WorkflowExecutor > should run independent steps in parallel" time="0.
|
|
120
|
+
<testcase classname="tests/WorkflowExecutor.test.ts" name="WorkflowExecutor > should run independent steps in parallel" time="0.050881922">
|
|
107
121
|
</testcase>
|
|
108
122
|
</testsuite>
|
|
109
|
-
<testsuite name="tests/cancellation.test.ts" timestamp="2026-01-
|
|
110
|
-
<testcase classname="tests/cancellation.test.ts" name="TaskRunner Cancellation > should execute tasks normally without cancellation" time="0.
|
|
123
|
+
<testsuite name="tests/cancellation.test.ts" timestamp="2026-01-18T18:46:49.749Z" hostname="runnervmmtnos" tests="10" failures="0" errors="0" skipped="0" time="0.160982347">
|
|
124
|
+
<testcase classname="tests/cancellation.test.ts" name="TaskRunner Cancellation > should execute tasks normally without cancellation" time="0.003469007">
|
|
111
125
|
</testcase>
|
|
112
|
-
<testcase classname="tests/cancellation.test.ts" name="TaskRunner Cancellation > should cancel workflow via AbortSignal" time="0.
|
|
126
|
+
<testcase classname="tests/cancellation.test.ts" name="TaskRunner Cancellation > should cancel workflow via AbortSignal" time="0.011267273">
|
|
113
127
|
</testcase>
|
|
114
|
-
<testcase classname="tests/cancellation.test.ts" name="TaskRunner Cancellation > should cancel workflow via global timeout" time="0.
|
|
128
|
+
<testcase classname="tests/cancellation.test.ts" name="TaskRunner Cancellation > should cancel workflow via global timeout" time="0.049708076">
|
|
115
129
|
</testcase>
|
|
116
|
-
<testcase classname="tests/cancellation.test.ts" name="TaskRunner Cancellation > should handle pre-aborted signal" time="0.
|
|
130
|
+
<testcase classname="tests/cancellation.test.ts" name="TaskRunner Cancellation > should handle pre-aborted signal" time="0.000396578">
|
|
117
131
|
</testcase>
|
|
118
|
-
<testcase classname="tests/cancellation.test.ts" name="TaskRunner Cancellation > should propagate cancellation to running task" time="0.
|
|
132
|
+
<testcase classname="tests/cancellation.test.ts" name="TaskRunner Cancellation > should propagate cancellation to running task" time="0.010483123">
|
|
119
133
|
</testcase>
|
|
120
|
-
<testcase classname="tests/cancellation.test.ts" name="TaskRunner Cancellation > should respect timeout over signal if timeout happens first" time="0.
|
|
134
|
+
<testcase classname="tests/cancellation.test.ts" name="TaskRunner Cancellation > should respect timeout over signal if timeout happens first" time="0.050629716">
|
|
121
135
|
</testcase>
|
|
122
|
-
<testcase classname="tests/cancellation.test.ts" name="TaskRunner Cancellation > should handle case where timeout is set AND signal is already aborted" time="0.
|
|
136
|
+
<testcase classname="tests/cancellation.test.ts" name="TaskRunner Cancellation > should handle case where timeout is set AND signal is already aborted" time="0.000410585">
|
|
123
137
|
</testcase>
|
|
124
|
-
<testcase classname="tests/cancellation.test.ts" name="TaskRunner Cancellation > should cancel workflow via AbortSignal when timeout is also set" time="0.
|
|
138
|
+
<testcase classname="tests/cancellation.test.ts" name="TaskRunner Cancellation > should cancel workflow via AbortSignal when timeout is also set" time="0.010701365">
|
|
125
139
|
</testcase>
|
|
126
|
-
<testcase classname="tests/cancellation.test.ts" name="TaskRunner Cancellation > should fail task if it throws non-abort error during cancellation" time="0.
|
|
140
|
+
<testcase classname="tests/cancellation.test.ts" name="TaskRunner Cancellation > should fail task if it throws non-abort error during cancellation" time="0.010792487">
|
|
127
141
|
</testcase>
|
|
128
|
-
<testcase classname="tests/cancellation.test.ts" name="TaskRunner Cancellation > should cancel task if it rejects with signal.reason" time="0.
|
|
142
|
+
<testcase classname="tests/cancellation.test.ts" name="TaskRunner Cancellation > should cancel task if it rejects with signal.reason" time="0.010733646">
|
|
129
143
|
</testcase>
|
|
130
144
|
</testsuite>
|
|
131
|
-
<testsuite name="tests/integration.test.ts" timestamp="2026-01-
|
|
132
|
-
<testcase classname="tests/integration.test.ts" name="TaskRunner Validation Integration > should throw validation error with clear message for duplicate tasks" time="0.
|
|
145
|
+
<testsuite name="tests/integration.test.ts" timestamp="2026-01-18T18:46:49.751Z" hostname="runnervmmtnos" tests="3" failures="0" errors="0" skipped="0" time="0.00844636">
|
|
146
|
+
<testcase classname="tests/integration.test.ts" name="TaskRunner Validation Integration > should throw validation error with clear message for duplicate tasks" time="0.005026025">
|
|
133
147
|
</testcase>
|
|
134
|
-
<testcase classname="tests/integration.test.ts" name="TaskRunner Validation Integration > should throw validation error with clear message for missing dependencies" time="0.
|
|
148
|
+
<testcase classname="tests/integration.test.ts" name="TaskRunner Validation Integration > should throw validation error with clear message for missing dependencies" time="0.000516415">
|
|
135
149
|
</testcase>
|
|
136
|
-
<testcase classname="tests/integration.test.ts" name="TaskRunner Validation Integration > should throw validation error with clear message for cycles" time="0.
|
|
150
|
+
<testcase classname="tests/integration.test.ts" name="TaskRunner Validation Integration > should throw validation error with clear message for cycles" time="0.000436023">
|
|
137
151
|
</testcase>
|
|
138
152
|
</testsuite>
|
|
139
|
-
<testsuite name="tests/integration-tests/basic-structure.test.ts" timestamp="2026-01-
|
|
140
|
-
<testcase classname="tests/integration-tests/basic-structure.test.ts" name="Integration: Basic Structure > Scenario 1: Basic linear workflow (A -> B -> C)" time="0.
|
|
153
|
+
<testsuite name="tests/integration-tests/basic-structure.test.ts" timestamp="2026-01-18T18:46:49.752Z" hostname="runnervmmtnos" tests="4" failures="0" errors="0" skipped="0" time="0.133158349">
|
|
154
|
+
<testcase classname="tests/integration-tests/basic-structure.test.ts" name="Integration: Basic Structure > Scenario 1: Basic linear workflow (A -> B -> C)" time="0.034998377">
|
|
141
155
|
</testcase>
|
|
142
|
-
<testcase classname="tests/integration-tests/basic-structure.test.ts" name="Integration: Basic Structure > Scenario 2: Branching workflow (A -> [B, C] -> D)" time="0.
|
|
156
|
+
<testcase classname="tests/integration-tests/basic-structure.test.ts" name="Integration: Basic Structure > Scenario 2: Branching workflow (A -> [B, C] -> D)" time="0.032839183">
|
|
143
157
|
</testcase>
|
|
144
|
-
<testcase classname="tests/integration-tests/basic-structure.test.ts" name="Integration: Basic Structure > Scenario 12: Complex 'Diamond' dependency graph (A -> B -> D, A -> C -> D)" time="0.
|
|
158
|
+
<testcase classname="tests/integration-tests/basic-structure.test.ts" name="Integration: Basic Structure > Scenario 12: Complex 'Diamond' dependency graph (A -> B -> D, A -> C -> D)" time="0.041876117">
|
|
145
159
|
</testcase>
|
|
146
|
-
<testcase classname="tests/integration-tests/basic-structure.test.ts" name="Integration: Basic Structure > Scenario 14: Zero-dependency parallel burst" time="0.
|
|
160
|
+
<testcase classname="tests/integration-tests/basic-structure.test.ts" name="Integration: Basic Structure > Scenario 14: Zero-dependency parallel burst" time="0.021234381">
|
|
147
161
|
</testcase>
|
|
148
162
|
</testsuite>
|
|
149
|
-
<testsuite name="tests/integration-tests/concurrency-timing.test.ts" timestamp="2026-01-
|
|
150
|
-
<testcase classname="tests/integration-tests/concurrency-timing.test.ts" name="Integration: Concurrency and Timing > Scenario 6: Mixed duration tasks (verifying parallel efficiency)" time="0.
|
|
163
|
+
<testsuite name="tests/integration-tests/concurrency-timing.test.ts" timestamp="2026-01-18T18:46:49.753Z" hostname="runnervmmtnos" tests="3" failures="0" errors="0" skipped="0" time="0.126879172">
|
|
164
|
+
<testcase classname="tests/integration-tests/concurrency-timing.test.ts" name="Integration: Concurrency and Timing > Scenario 6: Mixed duration tasks (verifying parallel efficiency)" time="0.052560329">
|
|
151
165
|
</testcase>
|
|
152
|
-
<testcase classname="tests/integration-tests/concurrency-timing.test.ts" name="Integration: Concurrency and Timing > Scenario 7: Cancellation via AbortSignal" time="0.
|
|
166
|
+
<testcase classname="tests/integration-tests/concurrency-timing.test.ts" name="Integration: Concurrency and Timing > Scenario 7: Cancellation via AbortSignal" time="0.021351994">
|
|
153
167
|
</testcase>
|
|
154
|
-
<testcase classname="tests/integration-tests/concurrency-timing.test.ts" name="Integration: Concurrency and Timing > Scenario 8: Global timeout interrupting long tasks" time="0.
|
|
168
|
+
<testcase classname="tests/integration-tests/concurrency-timing.test.ts" name="Integration: Concurrency and Timing > Scenario 8: Global timeout interrupting long tasks" time="0.050771636">
|
|
155
169
|
</testcase>
|
|
156
170
|
</testsuite>
|
|
157
|
-
<testsuite name="tests/integration-tests/context-state.test.ts" timestamp="2026-01-
|
|
158
|
-
<testcase classname="tests/integration-tests/context-state.test.ts" name="Integration: Context and State > Scenario 4: Shared context mutation (A writes, B reads)" time="0.
|
|
171
|
+
<testsuite name="tests/integration-tests/context-state.test.ts" timestamp="2026-01-18T18:46:49.754Z" hostname="runnervmmtnos" tests="3" failures="0" errors="0" skipped="0" time="0.020473507">
|
|
172
|
+
<testcase classname="tests/integration-tests/context-state.test.ts" name="Integration: Context and State > Scenario 4: Shared context mutation (A writes, B reads)" time="0.00578614">
|
|
173
|
+
</testcase>
|
|
174
|
+
<testcase classname="tests/integration-tests/context-state.test.ts" name="Integration: Context and State > Scenario 9: Dynamic context validation" time="0.000549928">
|
|
159
175
|
</testcase>
|
|
160
|
-
<testcase classname="tests/integration-tests/context-state.test.ts" name="Integration: Context and State > Scenario
|
|
176
|
+
<testcase classname="tests/integration-tests/context-state.test.ts" name="Integration: Context and State > Scenario 13: Tasks with side-effects" time="0.011724266">
|
|
177
|
+
</testcase>
|
|
178
|
+
</testsuite>
|
|
179
|
+
<testsuite name="tests/integration-tests/dryRun.test.ts" timestamp="2026-01-18T18:46:49.754Z" hostname="runnervmmtnos" tests="2" failures="0" errors="0" skipped="0" time="0.007644898">
|
|
180
|
+
<testcase classname="tests/integration-tests/dryRun.test.ts" name="Integration: Dry Run > should execute successfully without side effects" time="0.005105605">
|
|
161
181
|
</testcase>
|
|
162
|
-
<testcase classname="tests/integration-tests/
|
|
182
|
+
<testcase classname="tests/integration-tests/dryRun.test.ts" name="Integration: Dry Run > should respect dependencies (topological order is maintained even in dry run)" time="0.000382532">
|
|
163
183
|
</testcase>
|
|
164
184
|
</testsuite>
|
|
165
|
-
<testsuite name="tests/integration-tests/error-handling.test.ts" timestamp="2026-01-
|
|
166
|
-
<testcase classname="tests/integration-tests/error-handling.test.ts" name="Integration: Error Handling > Scenario 3: Task failure and downstream skipping" time="0.
|
|
185
|
+
<testsuite name="tests/integration-tests/error-handling.test.ts" timestamp="2026-01-18T18:46:49.755Z" hostname="runnervmmtnos" tests="3" failures="0" errors="0" skipped="0" time="0.009582684">
|
|
186
|
+
<testcase classname="tests/integration-tests/error-handling.test.ts" name="Integration: Error Handling > Scenario 3: Task failure and downstream skipping" time="0.004250201">
|
|
167
187
|
</testcase>
|
|
168
|
-
<testcase classname="tests/integration-tests/error-handling.test.ts" name="Integration: Error Handling > Scenario 10: Circular dependency detection" time="0.
|
|
188
|
+
<testcase classname="tests/integration-tests/error-handling.test.ts" name="Integration: Error Handling > Scenario 10: Circular dependency detection" time="0.002542548">
|
|
169
189
|
</testcase>
|
|
170
|
-
<testcase classname="tests/integration-tests/error-handling.test.ts" name="Integration: Error Handling > Scenario 11: Missing dependency handling" time="0.
|
|
190
|
+
<testcase classname="tests/integration-tests/error-handling.test.ts" name="Integration: Error Handling > Scenario 11: Missing dependency handling" time="0.000480727">
|
|
171
191
|
</testcase>
|
|
172
192
|
</testsuite>
|
|
173
|
-
<testsuite name="tests/integration-tests/stress.test.ts" timestamp="2026-01-
|
|
174
|
-
<testcase classname="tests/integration-tests/stress.test.ts" name="Integration: Stress Tests > Scenario 5: Large graph execution (e.g., 20+ nodes)" time="0.
|
|
193
|
+
<testsuite name="tests/integration-tests/stress.test.ts" timestamp="2026-01-18T18:46:49.755Z" hostname="runnervmmtnos" tests="1" failures="0" errors="0" skipped="0" time="0.006965795">
|
|
194
|
+
<testcase classname="tests/integration-tests/stress.test.ts" name="Integration: Stress Tests > Scenario 5: Large graph execution (e.g., 20+ nodes)" time="0.005155789">
|
|
195
|
+
</testcase>
|
|
196
|
+
</testsuite>
|
|
197
|
+
<testsuite name="tests/strategies/RetryingExecutionStrategy.test.ts" timestamp="2026-01-18T18:46:49.756Z" hostname="runnervmmtnos" tests="9" failures="0" errors="0" skipped="0" time="0.020475309">
|
|
198
|
+
<testcase classname="tests/strategies/RetryingExecutionStrategy.test.ts" name="RetryingExecutionStrategy > should execute successfully without retry if task succeeds" time="0.006518441">
|
|
199
|
+
</testcase>
|
|
200
|
+
<testcase classname="tests/strategies/RetryingExecutionStrategy.test.ts" name="RetryingExecutionStrategy > should execute successfully without retry if task has no retry config" time="0.000709159">
|
|
201
|
+
</testcase>
|
|
202
|
+
<testcase classname="tests/strategies/RetryingExecutionStrategy.test.ts" name="RetryingExecutionStrategy > should retry task if it fails and has retry config (fixed backoff)" time="0.002165526">
|
|
203
|
+
</testcase>
|
|
204
|
+
<testcase classname="tests/strategies/RetryingExecutionStrategy.test.ts" name="RetryingExecutionStrategy > should fail after max attempts reached" time="0.001107931">
|
|
205
|
+
</testcase>
|
|
206
|
+
<testcase classname="tests/strategies/RetryingExecutionStrategy.test.ts" name="RetryingExecutionStrategy > should use exponential backoff" time="0.001009275">
|
|
207
|
+
</testcase>
|
|
208
|
+
<testcase classname="tests/strategies/RetryingExecutionStrategy.test.ts" name="RetryingExecutionStrategy > should handle cancellation during delay" time="0.001831877">
|
|
209
|
+
</testcase>
|
|
210
|
+
<testcase classname="tests/strategies/RetryingExecutionStrategy.test.ts" name="RetryingExecutionStrategy > should handle cancellation before execution" time="0.000479575">
|
|
211
|
+
</testcase>
|
|
212
|
+
<testcase classname="tests/strategies/RetryingExecutionStrategy.test.ts" name="RetryingExecutionStrategy > should propagate error if sleep throws non-abort error" time="0.003430303">
|
|
213
|
+
</testcase>
|
|
214
|
+
<testcase classname="tests/strategies/RetryingExecutionStrategy.test.ts" name="RetryingExecutionStrategy > should handle cancellation if signal is aborted right before sleep (covering fast-fail in sleep)" time="0.000709089">
|
|
175
215
|
</testcase>
|
|
176
216
|
</testsuite>
|
|
177
217
|
</testsuites>
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
# Change: Add Workflow Preview
|
|
2
|
-
|
|
3
|
-
## Why
|
|
4
|
-
It can be difficult to understand the execution flow of complex dependency graphs just by looking at the code. Users also currently cannot easily verify the execution plan without running the side effects, which carries risk.
|
|
5
|
-
|
|
6
|
-
## What Changes
|
|
7
|
-
- Add a `dryRun` execution mode to `TaskRunner`.
|
|
8
|
-
- Add a helper method `getMermaidGraph(steps)` to generate a Mermaid.js diagram of the dependency graph.
|
|
9
|
-
|
|
10
|
-
## Impact
|
|
11
|
-
- Affected specs: `task-runner`
|
|
12
|
-
- Affected code: `src/TaskRunner.ts`, `src/TaskRunnerExecutionConfig.ts`
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
## Implementation
|
|
2
|
-
- [ ] 1.1 Update `TaskRunnerExecutionConfig` to include an optional `dryRun: boolean` property.
|
|
3
|
-
- [ ] 1.2 Implement `dryRun` logic in `WorkflowExecutor` (traverse graph, validate order, skip `step.run()`, return `skipped` or `success` pseudo-status).
|
|
4
|
-
- [ ] 1.3 Implement `getMermaidGraph(steps: TaskStep[])` method (can be static or instance method on `TaskRunner`).
|
|
5
|
-
- [ ] 1.4 Ensure `dryRun` respects other configs like `concurrency` (if applicable) to simulate actual timing/order if possible, or just strict topological order.
|
|
6
|
-
- [ ] 1.5 Add unit tests for `dryRun` ensuring no side effects occur.
|
|
7
|
-
- [ ] 1.6 Add unit tests for `getMermaidGraph` output correctness (nodes and edges).
|