fix(execution-core): Make failed runs close as Failed in Temporal - #77
Merged
Conversation
dawidaksamski
requested review from
librowski,
lukasz-jazwa,
piotrblaszczyk and
szymon-t-sc
as code owners
August 17, 2026 07:59
librowski
approved these changes
Aug 18, 2026
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.
Problem
WB-428: when a node failed under the
failerror policy,runGraphwrote the failure toour DB and then returned instead of raising. Temporal therefore closed the workflow as
Completed — so the product said failed while the engine said completed about the same
execution, and anyone reading history in Temporal saw a success.
Fix
runGraphnow returns aRunGraphOutcome({ status: 'completed' } | { status: 'failed', error })instead of
void, and the Temporal adapter raisesApplicationFailure.nonRetryablewhen theoutcome is failed.
The raise sits in the adapter rather than the runner for two reasons:
execution-coreisdeliberately engine-agnostic, and only a
TemporalFailureactually fails a Workflow Execution —a plain
Errorfails the workflow task and retries it forever. Raising from the runner wouldhave meant importing
@temporalio/*into core.Non-retryable: a graph failure is deterministic, so replaying it would re-run node activities (LLM spend) and re-emit events. This is the first such declaration in the repo. It does not affect manual reset/rewind, which is independent
of retry policy.