Commit 570f63d
fix(orchestration): Fix cancellation propagation in workflow and concurrent executor
Root causes:
1. WorkflowEngine.ExecuteStepAsync was catching OperationCanceledException
and wrapping it as a failed step result instead of propagating it
2. ConcurrentExecutor had similar issue with exception handling
Changes:
1. Added explicit catch for OperationCanceledException in:
- WorkflowEngine.ExecuteStepAsync (re-throws immediately)
- ConcurrentExecutor operation handler (re-throws before error handling)
2. This allows cancellation tokens to work properly in all tests,
preventing 10+ second delays from cancelled operations
Results:
- WorkflowEngineTests.ExecuteAsync_SupportsCancellation now passes
- Cancellation properly propagates through entire execution chain
- Tests with long delays (10s, 5s, 2s) can now be cancelled immediately
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <[email protected]>1 parent a4aef0f commit 570f63d
File tree
2 files changed
+11
-0
lines changed- src/DotNetDevMCP.Orchestration
2 files changed
+11
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
95 | 100 | | |
96 | 101 | | |
97 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
176 | 182 | | |
177 | 183 | | |
178 | 184 | | |
| |||
0 commit comments