Skip to content

fix(webapp): convert epoch-ms to BigInt before nanosecond multiply#4295

Closed
ANSHSINGH050404 wants to merge 1 commit into
triggerdotdev:mainfrom
ANSHSINGH050404:fix/otlp-nanosecond-overflow
Closed

fix(webapp): convert epoch-ms to BigInt before nanosecond multiply#4295
ANSHSINGH050404 wants to merge 1 commit into
triggerdotdev:mainfrom
ANSHSINGH050404:fix/otlp-nanosecond-overflow

Conversation

@ANSHSINGH050404

Copy link
Copy Markdown

Closes #3292

Checklist

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

Summary

ms * 1_000_000 exceeds Number.MAX_SAFE_INTEGER and loses precision before BigInt conversion.

Fix

BigInt(ms) * BigInt(1_000_000) in event repository helpers and run engine handlers.

Vouch request: #4290

Avoids IEEE 754 precision loss when ms * 1e6 exceeds Number.MAX_SAFE_INTEGER.

Closes triggerdotdev#3292
@changeset-bot

changeset-bot Bot commented Jul 20, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: a87496b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a 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: e13287e9-b2fa-4897-8448-dcef3274d843

📥 Commits

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

📒 Files selected for processing (3)
  • .server-changes/fix-otlp-nanosecond-overflow.md
  • apps/webapp/app/v3/eventRepository/common.server.ts
  • apps/webapp/app/v3/runEngineHandlers.server.ts

Walkthrough

Timestamp calculations now convert millisecond values to BigInt before scaling to nanoseconds. This applies to current timestamps, duration calculations, and retry event start times. A server change note documents the timestamp accuracy fix.

✨ 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 found 0 potential issues.

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.

OTLP nanosecond timestamp overflow in webapp event repository

1 participant