Skip to content

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
feat/workflow-executor-abort-handling
Closed

feat(workflow-executor): handle orchestrator 409 conflict on aborted runs#1528
matthv wants to merge 1 commit intofeat/prd-214-setup-workflow-executor-packagefrom
feat/workflow-executor-abort-handling

Conversation

@matthv
Copy link
Copy Markdown
Member

@matthv matthv commented Apr 2, 2026

Summary

  • Add RunConflictError boundary error for orchestrator 409 rejections
  • Detect conflict messages in ForestServerWorkflowPort.updateStepExecution() (run aborted, already terminated, or step revised)
  • Handle RunConflictError gracefully in the Runner with an info log instead of treating it as a fatal error

When the orchestrator aborts a run while the executor is mid-step, the executor now:

  1. Completes the step execution locally (no interruption)
  2. Detects the 409 when reporting the outcome
  3. Logs an info message and moves on (no retry, no error)

Test plan

  • yarn workspace @forestadmin/workflow-executor test — 433 tests pass
  • 4 new tests in forest-server-workflow-port.test.ts (conflict detection + re-throw)
  • 2 new tests in runner.test.ts (graceful handling vs error logging)

🤖 Generated with Claude Code

Note

Handle orchestrator 409 conflict errors on aborted runs in workflow executor

  • Adds a new RunConflictError class in errors.ts to represent cases where a run can no longer be updated (aborted, finished, or revised).
  • updateStepExecution in forest-server-workflow-port.ts now catches POST errors and throws RunConflictError when the server response contains 'cannot be updated', 'already terminated', or 'revised'.
  • The runner treats RunConflictError as a non-failure condition, logging an info message instead of an error when step outcome reporting hits a conflict.

Macroscope summarized 467fddf.

…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>
@matthv matthv force-pushed the feat/workflow-executor-abort-handling branch from dd397c8 to 467fddf Compare April 2, 2026 15:43
@matthv matthv closed this Apr 3, 2026
@matthv matthv deleted the feat/workflow-executor-abort-handling branch April 3, 2026 07:56
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.

1 participant