feat(workflow-executor): handle orchestrator 409 conflict on aborted runs#1528
Closed
matthv wants to merge 1 commit intofeat/prd-214-setup-workflow-executor-packagefrom
Closed
Conversation
…runs When the orchestrator rejects a step update (run aborted, already finished, or step revised), detect the conflict in ForestServerWorkflowPort and throw RunConflictError. The Runner catches it gracefully with an info log instead of treating it as a fatal error. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
dd397c8 to
467fddf
Compare
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.
Summary
RunConflictErrorboundary error for orchestrator 409 rejectionsForestServerWorkflowPort.updateStepExecution()(run aborted, already terminated, or step revised)RunConflictErrorgracefully in the Runner with an info log instead of treating it as a fatal errorWhen the orchestrator aborts a run while the executor is mid-step, the executor now:
Test plan
yarn workspace @forestadmin/workflow-executor test— 433 tests passforest-server-workflow-port.test.ts(conflict detection + re-throw)runner.test.ts(graceful handling vs error logging)🤖 Generated with Claude Code
Note
Handle orchestrator 409 conflict errors on aborted runs in workflow executor
RunConflictErrorclass in errors.ts to represent cases where a run can no longer be updated (aborted, finished, or revised).updateStepExecutionin forest-server-workflow-port.ts now catches POST errors and throwsRunConflictErrorwhen the server response contains 'cannot be updated', 'already terminated', or 'revised'.RunConflictErroras a non-failure condition, logging an info message instead of an error when step outcome reporting hits a conflict.Macroscope summarized 467fddf.