feat(execution-core): add execution_incomplete terminal state - #99
Open
dawidaksamski wants to merge 1 commit into
Open
Conversation
dawidaksamski
requested review from
librowski,
lukasz-jazwa,
piotrblaszczyk and
szymon-t-sc
as code owners
August 24, 2026 13:33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A graph could route itself into nothing and report success. When a decision returns a
nextPortno edge carries — deleted edge, renamed branch, never wired — every outgoingedge is pruned and the run closed as
completedwith part of the graph never run.runGraphnow records each dead end as{ nodeId, port }and, if any were found, emits aterminal
execution_incompleteevent in place ofexecution_completedand writes the'incomplete'status. Not a failure — nothing threw, so Temporal still closes the WorkflowExecution as Completed. Failure keeps precedence, and the cycle check stays a failure with
its own "stalled" wording.
Dead ends don't stop the run: they're collected run-scoped and reported once at the end, so
parallel branches still deliver their work.
An
'errorRoute'failure with no'errorRoute'edge now ends the run incomplete — it waspreviously documented as a usable silent DLQ. The general rule covers it (the policy names a
port, nothing was wired to it), and excluding it would mean carving out
RESERVED_ERROR_HANDLE. Deliberate absorption is what'continue'is for; the README nowsays so. The test asserting the old behaviour was rewritten, not deleted.
Worth a look in review
Six separate places enumerate terminal states — worker
database.ts, backenddrain-events.tsandroutes/executions.ts, ai-studio stream adapter, store, and controls.All six change here; missing one hangs an SSE stream, leaves
finished_atnull, or strandsthe UI mid-run.
run-workflow.tsis a comment-only change: its guard is=== 'failed', sothe new state correctly falls through.
Naming (
incompleteoverstalled), why the cycle check stays separate, and theerrorRoutereversal are written up inpackages/execution-core/terminal-states.decision-log.md.