Skip to content

quic: validate stream error codes - #66650

Open
efekrskl wants to merge 1 commit into
nodejs:mainfrom
efekrskl:quic/validate-error-codes
Open

efekrskl wants to merge 1 commit into
nodejs:mainfrom
efekrskl:quic/validate-error-codes

Conversation

@efekrskl

@efekrskl efekrskl commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

QUIC error codes in RESET_STREAM, STOP_SENDING, and CONNECTION_CLOSE frames use the variable length integer (limiting them 0 through through 2^62 - 1) encoding defined by RFC 9000 (see 16, also 19.4, 19.5 and 19.19)

This change introduces a shared error code validation for the error codes. This also simplifies streams.cc because StopSending and ResetStream are exposed to and only used by JS. The native methods therefore no longer need to handle omitted values.

AI assistance was used in code and docs generation

Assisted-by: Codex
Signed-off-by: Efe Karasakal <[email protected]>
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/quic

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. quic Issues and PRs related to the QUIC transport implementation. labels Oct 10, 2026
@codecov

codecov Bot commented Oct 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.46%. Comparing base (38a5f10) to head (259ec64).
⚠️ Report is 21 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff            @@
##             main   #66650    +/-   ##
========================================
  Coverage   90.45%   90.46%            
========================================
  Files         791      791            
  Lines      276816   277092   +276     
  Branches    53197    53278    +81     
========================================
+ Hits       250403   250668   +265     
- Misses      16822    16825     +3     
- Partials     9591     9599     +8     
Files with missing lines Coverage Δ
lib/internal/quic/quic.js 100.00% <100.00%> (ø)

... and 34 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.

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

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. quic Issues and PRs related to the QUIC transport implementation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants