Skip to content

Conversation

@Aaron1011
Copy link
Member

@Aaron1011 Aaron1011 commented Jan 29, 2026

Currently, we classify only a few error types (including errors from user steps) as retryable. Everything else is non-retryable, and causes the task to fail immediately, without any retries


Note

Medium Risk
Changes task failure/retry semantics across both Rust worker logic and the durable.fail_run Postgres function, which can alter how many attempts are created and when tasks become terminal. Moderate risk due to workflow correctness implications if error classification is wrong or migration rollout is incomplete.

Overview
Non-retryable errors now fail tasks immediately instead of scheduling retries. The durable.fail_run stored procedure gains a p_force_fail flag; when set, it skips retry-time computation and run creation and marks the task terminal.

Error classification and propagation were tightened in Rust. TaskError replaces the generic internal-error variant with Step and TaskPanicked, adds retryable() to drive retry decisions, and removes the blanket From<sqlx::Error> impl in favor of from_sqlx_error. TaskContext now wraps user step failures as TaskError::Step, and the worker passes force_fail = !error.retryable() when calling durable.fail_run.

Tests were updated/added to reflect the new semantics. Existing retry/checkpoint tests were adjusted for an extra checkpointed maybe_fail step, and a new retry test asserts User errors are not retried even when a retry strategy is configured.

Written by Cursor Bugbot for commit 7e69d63. This will update automatically on new commits. Configure here.

Currently, we classify only a few error types (including
errors from user steps) as retryable. Everything else is non-retryable,
and causes the task to fail immediately, without any retries
@virajmehta virajmehta added this pull request to the merge queue Jan 29, 2026
Merged via the queue into main with commit 8248424 Jan 29, 2026
2 checks passed
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