You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 844d181
Browse filesBrowse the repository at this point in the historyBrowse files
fix(executor): fail a stop-after run whose routing skips the stop block (#8635)
* fix(executor): fail a stop-after run whose routing skips the stop block
A run with stopAfterBlockId only stopped when the stop block completed. When a
router, condition, or untaken error path routed the run away from it, the stop
never triggered and the run finished every other branch, reporting success as
if it had stopped there. A static check before the run cannot see this.
- The engine ends the run as soon as every path into the stop block has been
deactivated, before any further block starts, and fails it with
`Stop block "<name>" (<id>) was not reached: no path this run took leads to it`.
- Any run that ends without completing its stop block fails the same way: a
stop block missing from the executed graph, or a Response block that ended
the run first.
- A loop or parallel stop with nothing to run completes at its start sentinel,
whose end sentinel never runs, so that exit now counts as reaching it.
- The v2 contract and the CLI `--stop-after` help describe the failure.
- E2E: a condition fixture checks the stop on the taken branch still stops
there, a stop on the skipped branch fails the run before the other branch's
slow block finishes, and the CLI exits non-zero.
* fix(executor): a skipped stop block fails a run another branch paused, and names a Response ending
- A run whose stop block was proven unreachable fails even when another branch
paused, instead of returning a paused run that would resume past it.
- When a Response block ended the run first, the error says so rather than
claiming no path leads to the stop block.
Copy file name to clipboardExpand all lines: apps/docs/content/docs/cli/reference.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6704,7 +6704,7 @@ sim workflows run <workflowId> [options]
6704
6704
|`--mock-payload`| No | Use the selected trigger's server-derived mock payload; runs the current saved workflow state (implies --manual). |
6705
6705
|`--from-block <blockId>`| No | Run manually from this saved workflow block. |
6706
6706
|`--source-run <runId>`| No | Prior run whose persisted state supplies upstream outputs (requires --from-block). |
6707
-
|`--stop-after <blockId>`| No | Stop the run after this saved block; with --from-block on the same block, re-runs only that block (implies --manual). |
6707
+
|`--stop-after <blockId>`| No | Stop the run after this saved block, failing it if the run takes a path that skips the block; with --from-block on the same block, re-runs only that block (implies --manual). |
6708
6708
|`--follow`| No | Stream the run as it happens; progress on stderr, result on stdout. The stream reports only success and output, so the result omits the run id and timings a non-streaming run returns. |
6709
6709
|`--include-thinking`| No | Show model reasoning while following (requires --follow). |
6710
6710
|`--include-tool-calls`| No | Show tool calls while following (requires --follow). |
Copy file name to clipboardExpand all lines: apps/docs/content/docs/cli/workflows.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -642,7 +642,7 @@ sim workflows run <workflowId> [options]
642
642
|`--mock-payload`| No | Use the selected trigger's server-derived mock payload; runs the current saved workflow state (implies --manual). |
643
643
|`--from-block <blockId>`| No | Run manually from this saved workflow block. |
644
644
|`--source-run <runId>`| No | Prior run whose persisted state supplies upstream outputs (requires --from-block). |
645
-
|`--stop-after <blockId>`| No | Stop the run after this saved block; with --from-block on the same block, re-runs only that block (implies --manual). |
645
+
|`--stop-after <blockId>`| No | Stop the run after this saved block, failing it if the run takes a path that skips the block; with --from-block on the same block, re-runs only that block (implies --manual). |
646
646
|`--follow`| No | Stream the run as it happens; progress on stderr, result on stdout. The stream reports only success and output, so the result omits the run id and timings a non-streaming run returns. |
647
647
|`--include-thinking`| No | Show model reasoning while following (requires --follow). |
648
648
|`--include-tool-calls`| No | Show tool calls while following (requires --follow). |
Copy file name to clipboardExpand all lines: apps/docs/openapi-v2-workflows.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -12617,7 +12617,7 @@
12617
12617
]
12618
12618
},
12619
12619
"stopAfterBlockId": {
12620
-
"description": "Saved workflow block after which the run stops; downstream blocks do not execute. Must not be inside a loop or parallel. With a block entry naming the same block, re-runs only that block against the source run.",
12620
+
"description": "Saved workflow block after which the run stops; downstream blocks do not execute. Must not be inside a loop or parallel. If a router, condition, or untaken error path routes the run away from the block, the run fails as soon as that is decided, without running the other branches. With a block entry naming the same block, re-runs only that block against the source run.",
0 commit comments