Skip to content

fix(execution-core): Make failed runs close as Failed in Temporal - #77

Merged
dawidaksamski merged 1 commit into
mainfrom
fix/WB-428-temporal-failed-status
Aug 18, 2026
Merged

fix(execution-core): Make failed runs close as Failed in Temporal#77
dawidaksamski merged 1 commit into
mainfrom
fix/WB-428-temporal-failed-status

Conversation

@dawidaksamski

@dawidaksamski dawidaksamski commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Problem

WB-428: when a node failed under the fail error policy, runGraph wrote the failure to
our 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

runGraph now returns a RunGraphOutcome ({ status: 'completed' } | { status: 'failed', error })
instead of void, and the Temporal adapter raises ApplicationFailure.nonRetryable when the
outcome is failed.

The raise sits in the adapter rather than the runner for two reasons: execution-core is
deliberately engine-agnostic, and only a TemporalFailure actually fails a Workflow Execution —
a plain Error fails the workflow task and retries it forever. Raising from the runner would
have 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.

image

@dawidaksamski
dawidaksamski merged commit e99e2f5 into main Aug 18, 2026
4 checks passed
@dawidaksamski
dawidaksamski deleted the fix/WB-428-temporal-failed-status branch August 18, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants