Skip to content

fix(core): enforce maxElapsed against wall-clock in ExponentialBackoff.execute#4298

Closed
ANSHSINGH050404 wants to merge 1 commit into
triggerdotdev:mainfrom
ANSHSINGH050404:fix/backoff-maxelapsed-wallclock
Closed

fix(core): enforce maxElapsed against wall-clock in ExponentialBackoff.execute#4298
ANSHSINGH050404 wants to merge 1 commit into
triggerdotdev:mainfrom
ANSHSINGH050404:fix/backoff-maxelapsed-wallclock

Conversation

@ANSHSINGH050404

Copy link
Copy Markdown

Closes #3726

Checklist

  • Followed CONTRIBUTING.md
  • Single issue PR
  • Changeset / server-changes when required

Summary

execute() tracked callback elapsed time but never enforced maxElapsed against wall-clock (only sleep delays counted in retryAsync).

Fix

Abort the loop when wall-clock since start exceeds maxElapsed seconds.

Vouch request: #4290

@changeset-bot

changeset-bot Bot commented Jul 20, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7daa990

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 26 packages
Name Type
@trigger.dev/core Patch
@trigger.dev/build Patch
trigger.dev Patch
@trigger.dev/python Patch
@trigger.dev/redis-worker Patch
@trigger.dev/schema-to-json Patch
@trigger.dev/sdk Patch
@internal/cache Patch
@internal/clickhouse Patch
@internal/llm-model-catalog Patch
@trigger.dev/rbac Patch
@internal/redis Patch
@internal/replication Patch
@internal/run-engine Patch
@internal/run-store Patch
@internal/schedule-engine Patch
@trigger.dev/sso Patch
@internal/testcontainers Patch
@internal/tracing Patch
@internal/tsql Patch
@internal/dashboard-agent Patch
@internal/sdk-compat-tests Patch
@trigger.dev/react-hooks Patch
@trigger.dev/rsc Patch
@trigger.dev/database Patch
@trigger.dev/otlp-importer Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

Copy link
Copy Markdown
Contributor

Hi @ANSHSINGH050404, thanks for your interest in contributing!

This project requires that pull request authors are vouched, and you are not in the list of vouched users.

This PR will be closed automatically. See https://github.com/triggerdotdev/trigger.dev/blob/main/CONTRIBUTING.md for more details.

@github-actions github-actions Bot closed this Jul 20, 2026
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: a4f836de-e715-41cb-80c2-26b1fe9ae58c

📥 Commits

Reviewing files that changed from the base of the PR and between a7c734c and 7daa990.

📒 Files selected for processing (2)
  • .changeset/backoff-maxelapsed-wallclock.md
  • packages/core/src/v3/apps/backoff.ts

Walkthrough

Updated ExponentialBackoff.execute() to enforce maxElapsed using wall-clock time across callback execution and retry delays. The loop now checks elapsed time before attempts and after retry sleeps. Added a patch changeset documenting the updated behavior for @trigger.dev/core.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

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.

bug(v3): maxElapsed timeout boundary bypassed in ExponentialBackoff.execute

1 participant