Vouch Request: BigInt overflow fix (PR #3381)
What I want to work on
I've submitted PR #3381 which fixes IEEE 754 precision loss in nanosecond timestamp calculations across three files:
apps/webapp/app/v3/eventRepository/common.server.tsapps/webapp/app/v3/eventRepository/index.server.tsapps/webapp/app/v3/runEngineHandlers.server.ts
The bug: BigInt(milliseconds * 1_000_000) overflows before BigInt conversion because Date.now() * 1_000_000 exceeds Number.MAX_SAFE_INTEGER. The fix converts to BigInt first: BigInt(milliseconds) * BigInt(1_000_000).
This is a resubmission of #3378 which was closed because it missed one instance. PR #3381 fixes ALL instances.
Background
I'm an open source contributor with PRs in multiple repos including Flowise, Haystack, Reth, supabase-js, and graph-node. I have experience with TypeScript/Node.js and am familiar with the trigger.dev codebase through investigating this bug.
Links
- Issue: #3292
- PR: #3381 (auto-closed, pending vouch)
- Previous PR: #3378 (closed, missed one instance)
We have a new Vouch policy, please see the discussion here: https://github.com/triggerdotdev/trigger.dev/discussions/5010