Skip to content

quic: serialize stream reset code as string#64577

Open
manNomi wants to merge 1 commit into
nodejs:mainfrom
manNomi:quic-serialize-stream-reset-code
Open

quic: serialize stream reset code as string#64577
manNomi wants to merge 1 commit into
nodejs:mainfrom
manNomi:quic-serialize-stream-reset-code

Conversation

@manNomi

@manNomi manNomi commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Description

QuicStreamState.toJSON() returned resetCode as a BigInt.
QuicStreamState.toString() serializes that object with
JSONStringify(), so serializing a live stream state threw
TypeError: Do not know how to serialize a BigInt. Calling
JSON.stringify() on the state failed for the same reason.

Serialize resetCode as a string, matching the handling of other 64-bit
QUIC state values. Using a string also preserves values outside JavaScript's
safe integer range. This only changes the JSON representation; it does not
change QUIC stream reset processing or the stored reset code.

Add a regression assertion that serializes a stream state and verifies the
parsed resetCode value.

Signed-off-by: manNomi <hanmw110@naver.com>
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/quic

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. quic Issues and PRs related to the QUIC implementation / HTTP/3. labels Jul 18, 2026
@codecov

codecov Bot commented Jul 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.24%. Comparing base (fb5d01f) to head (83661c1).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #64577      +/-   ##
==========================================
- Coverage   90.24%   90.24%   -0.01%     
==========================================
  Files         739      739              
  Lines      241772   241772              
  Branches    45561    45557       -4     
==========================================
- Hits       218194   218182      -12     
- Misses      15111    15115       +4     
- Partials     8467     8475       +8     
Files with missing lines Coverage Δ
lib/internal/quic/state.js 100.00% <100.00%> (ø)

... and 35 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pimterry pimterry added the request-ci Add this label to start a Jenkins CI on a PR. label Jul 20, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jul 20, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. quic Issues and PRs related to the QUIC implementation / HTTP/3.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants