Skip to content

fix(scheduler): throw RangeError for delays beyond setInterval maximum#7609

Open
niklas-wortmann wants to merge 5 commits into
ReactiveX:masterfrom
niklas-wortmann:fix/7602-delay-max-timer-delay
Open

fix(scheduler): throw RangeError for delays beyond setInterval maximum#7609
niklas-wortmann wants to merge 5 commits into
ReactiveX:masterfrom
niklas-wortmann:fix/7602-delay-max-timer-delay

Conversation

@niklas-wortmann

Copy link
Copy Markdown
Member

Summary

  • Throw RangeError when asyncScheduler is asked to schedule a delay longer than 2^31 - 1 ms (~24.8 days), instead of silently firing immediately due to platform timer clamping.
  • Validate in AsyncAction.requestAsyncId so virtual schedulers (TestScheduler) are unaffected.
  • Add marble tests for timer and delay with numeric and Date delays using asyncScheduler.

Fixes #7602

Test plan

  • yarn workspace rxjs test -- --grep 'platform max'
  • yarn workspace rxjs test -- --grep '^(delay|timer)'
  • yarn workspace rxjs lint

Made with Cursor

niklas-wortmann and others added 5 commits July 4, 2026 14:03
…ding

Encode repo conventions via rules, skills, hooks, and Bugbot review gates.
Add operator scaffolding, QA repro-to-test workflow, local release path,
Firebase docs preview config, and repo-bundled Yarn for reproducible setup.
Add bug-fix and GitHub-issue skills; document scheduler/timer test pitfalls.

Co-authored-by: Cursor <cursoragent@cursor.com>
…eases

Rename rxjs-verdaccio-publish to rxjs-publish, add non-interactive auth and
background Verdaccio setup to the skill, and add an --interactive flag to
release.js so unattended runs skip the changelog editor prompt.

Co-authored-by: Cursor <cursoragent@cursor.com>
Document NX_DAEMON=false for sandboxed shells, gh CLI token handling
without printing credentials, git-tag-based version inference, and
running the dry run with --interactive=false, all learned from a real
Verdaccio release run.

Co-authored-by: Cursor <cursoragent@cursor.com>
JavaScript timers clamp delays above 2^31-1 ms and may fire immediately,
causing timer() and delay() with far-future dates to emit right away.
Validate delay in AsyncAction.requestAsyncId and throw RangeError instead.

Fixes ReactiveX#7602

Co-authored-by: Cursor <cursoragent@cursor.com>
@nx-cloud

nx-cloud Bot commented Jul 6, 2026

Copy link
Copy Markdown

🤖 Nx Cloud AI Fix Eligible

An automatically generated fix could have helped fix failing tasks for this run, but Self-healing CI is disabled for this workspace. Visit workspace settings to enable it and get automatic fixes in future runs.

To disable these notifications, a workspace admin can disable them in workspace settings.


View your CI Pipeline Execution ↗ for commit 0304518

Command Status Duration Result
nx compile rxjs ❌ Failed 16s View ↗

💡 Dealing with memory or CPU issues? See memory and CPU details with the resource usage add-on ↗.


☁️ Nx Cloud last updated this comment at 2026-07-06 18:46:05 UTC

Comment on lines +1 to +11
# 7.0.0 (2026-07-05)

### 🚀 Features

- Add es2015 entries to the exports declaration to support Angular

- ⚠️ RxJS updated to TypeScript 4.9

- ⚠️ Dropping support for Node 14.

- No longer publishing UMD or ES5 builds

@dynst dynst Jul 10, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This doesn't seem related to the bug fix. There are 5 commits in the branch but only the latest commit fixes the bug.

0304518

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.

Delay randomly emits right away when passed the date

2 participants