Skip to content

feat: implemented bigint audit in decode.ts: ensure IDs are never converted to number#161

Merged
codeZe-us merged 3 commits intoBoxkit-Labs:mainfrom
Ugasutun:main
Mar 28, 2026
Merged

feat: implemented bigint audit in decode.ts: ensure IDs are never converted to number#161
codeZe-us merged 3 commits intoBoxkit-Labs:mainfrom
Ugasutun:main

Conversation

@Ugasutun
Copy link
Copy Markdown
Contributor

Closes #123
fix(core-ts): ensure IDs are never converted to number in decode

  • Changed decodeMuxed() to return bigint instead of string for id field
  • Updated parse.ts to use decoded.id directly without BigInt() conversion
  • Updated routing/extract.ts to convert bigint to string only at API boundary
  • Updated test expectations to use BigInt() for proper comparison

This ensures large ID values (>2^53) are never implicitly cast to JS number,
preventing precision loss in the decode pipeline.

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 26, 2026

@Ugasutun Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@codeZe-us codeZe-us self-requested a review March 26, 2026 21:09
Copy link
Copy Markdown
Contributor

@codeZe-us codeZe-us left a comment

Choose a reason for hiding this comment

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

@Ugasutun This is okay

@codeZe-us
Copy link
Copy Markdown
Contributor

@Ugasutun resolve conflicts

@codeZe-us codeZe-us merged commit a01e9f8 into Boxkit-Labs:main Mar 28, 2026
1 check failed
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.

Implement bigint audit in decode.ts: ensure IDs are never converted to number

2 participants