Skip to content

test(http2): expand Node parity coverage - #6866

Open
TheHypnoo wants to merge 2 commits into
mainfrom
test/expand-node-http2-parity
Open

test(http2): expand Node parity coverage#6866
TheHypnoo wants to merge 2 commits into
mainfrom
test/expand-node-http2-parity

Conversation

@TheHypnoo

@TheHypnoo TheHypnoo commented Jul 27, 2026

Copy link
Copy Markdown
Member

Summary

Expand the granular node:http2 parity suite from 9 to 59 deterministic fixtures, using Node.js 26.5.0 as the oracle and Deno and Bun as comparison runtimes.

Changes

  • Replace broad and TLS-bound cases with single-contract plaintext loopback fixtures.
  • Cover exports, descriptors, constants, settings helpers, connect/server validation, session and stream lifecycle, pseudoheaders, request/response flow, ping, GOAWAY, and compat behavior.
  • Document pinned upstream sources, per-fixture Deno/Bun results, stable Perry gaps, exclusions, and the stopping rule.
  • Update the stable HTTP/2 baseline from 8/9 to 32/59.

Related issue

n/a

Test plan

  • Built perry, perry-runtime, perry-stdlib, and their static wrappers in release mode.
  • Ran all 59 fixtures on Node.js 26.5.0 three times: identical digest, no failures.
  • Compared all 59 fixtures with Deno 2.9.3: 54 matches, 5 stable diffs.
  • Compared all 59 fixtures with Bun 1.2.18: 35 matches, 24 stable diffs.
  • Measured Perry at 32 matches and 27 stable diffs, with no compile failures, crashes, or timeouts; repeated the 57-fixture focused suite and the final review delta three times.
  • deno fmt --check test-parity/node-suite/http2
  • jq empty test-parity/node_suite_baseline.json
  • git diff --check

Screenshots / output

Node 26.5.0: 59/59 stable across 3 runs
Deno 2.9.3: 54 match, 5 diff
Bun 1.2.18: 35 match, 24 diff
Perry: 32 pass / 59 total (54.2%), diff=27

Checklist

  • I have NOT bumped the workspace version or edited CLAUDE.md / CHANGELOG.md (maintainer handles these at merge)
  • My commits follow the loose conventional commit style used in the log
  • I've read CONTRIBUTING.md and agree to the Code of Conduct

Summary by CodeRabbit

  • New Features
    • Expanded HTTP/2 parity coverage across requests, headers, constants, exports, settings, sessions, streams, and plaintext behavior (including multiplexing and request/response body handling).
  • Bug Fixes
    • Improved determinism and cleanup for HTTP/2 test runs, including more reliable lifecycle coordination.
    • Hardened optional capability checks to avoid failures when certain exports are absent.
  • Documentation
    • Expanded the HTTP/2 parity-suite README into a detailed audit specification with coverage and evidence tracking.
  • Tests
    • Updated HTTP/2 baseline from 8/9 to 32/59 passing checks.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e243a832-fbfe-4ba6-bad1-7912c6cd0e59

📥 Commits

Reviewing files that changed from the base of the PR and between 7d8400f and 71469d6.

📒 Files selected for processing (3)
  • test-parity/node-suite/http2/README.md
  • test-parity/node-suite/http2/compat/request-properties.ts
  • test-parity/node-suite/http2/settings/numeric-boundaries.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • test-parity/node-suite/http2/settings/numeric-boundaries.ts
  • test-parity/node-suite/http2/compat/request-properties.ts
  • test-parity/node-suite/http2/README.md

📝 Walkthrough

Walkthrough

The HTTP/2 parity suite expands to 59 deterministic fixtures covering Node API surfaces, settings helpers, sessions, streams, plaintext exchanges, validation behavior, and cross-runtime evidence. The baseline changes from 8/9 to 32/59.

Changes

HTTP/2 parity suite

Layer / File(s) Summary
Suite documentation and baseline
test-parity/node-suite/http2/README.md, test-parity/node_suite_baseline.json
Documents fixture scope, sources, coverage, runtime results, evidence, exclusions, and updated baseline normalization and counts.
HTTP/2 API and server surface
test-parity/node-suite/http2/connect/*, constants/*, exports/*, server/*
Adds coverage for connection validation, constants, exports, prototypes, server overloads, invalid options, inheritance, and listen addresses.
HTTP/2 settings packing and decoding
test-parity/node-suite/http2/settings/*
Adds coverage for default settings, packed and unpacked representations, aliases, boundaries, custom keys, invalid values, warnings, and validation modes.
HTTP/2 session lifecycle and controls
test-parity/node-suite/http2/session/*
Adds session lifecycle, state, class, method, abort, GOAWAY, ping, settings, request-option, ref/unref, and cleanup fixtures.
HTTP/2 streams and plaintext exchanges
test-parity/node-suite/http2/compat/*, headers/*, plaintext/*, stream/*
Adds local server/client fixtures for request metadata, pseudoheaders, multiplexing, bodies, response headers, stream state, close validation, sent headers, and trailer surfaces.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

Suggested labels: parity

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the main change: expanding HTTP/2 parity coverage.
Description check ✅ Passed The description follows the template with Summary, Changes, Related issue, Test plan, Screenshots, and Checklist sections filled in.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/expand-node-http2-parity
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch test/expand-node-http2-parity

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 6

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@test-parity/node-suite/http2/compat/request-properties.ts`:
- Around line 25-28: Add an error listener to the client request stream created
in the request fixture, routing the emitted error to the existing promise
rejection path before resuming and ending the request. Keep the current
successful completion flow through received unchanged.

In `@test-parity/node-suite/http2/headers/invalid-request-pseudoheader.ts`:
- Around line 12-20: Add a no-op error listener to each accepted request stream
before request.destroy() in the loop, and apply the same change to the
request-option-validation fixture’s accepted streams. Preserve the existing
logging and destruction behavior.

In `@test-parity/node-suite/http2/README.md`:
- Line 56: Update the sentence describing the focused suite so the compound
modifier reads “57-fixture-focused suite,” adding the missing hyphen between
“fixture” and “focused.”

In `@test-parity/node-suite/http2/session/request-option-validation.ts`:
- Around line 20-29: In the accepted-request branch of the request-option
validation loop, attach a one-shot request error listener before calling
request.destroy() to safely consume any destruction error. Keep the existing
logging and cleanup behavior unchanged.

In `@test-parity/node-suite/http2/settings/numeric-boundaries.ts`:
- Around line 16-17: Update the loop over cases in the numeric-boundaries
fixture to log or compare the actual serialized Buffer returned by
getPackedSettings, using a stable hex or base64 representation instead of only
its length. Match the representation and assertion pattern used by the other
packed-settings fixtures so boundary encoding differences are observable.

In `@test-parity/node-suite/http2/settings/packed-empty.ts`:
- Around line 3-4: Update the output in the packed-settings parity test to log
the serialized bytes themselves as hex strings rather than only their lengths.
Apply this to both getPackedSettings() calls, preserving the distinction between
the missing and empty inputs so their actual serialized contents can be
compared.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 49785c56-8167-48ce-9642-28dfc159ce7a

📥 Commits

Reviewing files that changed from the base of the PR and between 563c359 and 7d8400f.

📒 Files selected for processing (68)
  • test-parity/node-suite/http2/README.md
  • test-parity/node-suite/http2/compat/request-properties.ts
  • test-parity/node-suite/http2/connect/invalid-authority.ts
  • test-parity/node-suite/http2/connect/listener-overload.ts
  • test-parity/node-suite/http2/connect/unsupported-protocol.ts
  • test-parity/node-suite/http2/constants/header-aliases.ts
  • test-parity/node-suite/http2/constants/representative-values.ts
  • test-parity/node-suite/http2/exports/compat-descriptors.ts
  • test-parity/node-suite/http2/exports/exact-module-keys.ts
  • test-parity/node-suite/http2/exports/function-metadata.ts
  • test-parity/node-suite/http2/exports/performServerHandshake.ts
  • test-parity/node-suite/http2/exports/request-class.ts
  • test-parity/node-suite/http2/exports/response-class.ts
  • test-parity/node-suite/http2/exports/response-receiver-validation.ts
  • test-parity/node-suite/http2/exports/server-client-surface.ts
  • test-parity/node-suite/http2/headers/invalid-request-pseudoheader.ts
  • test-parity/node-suite/http2/headers/sensitive-symbol.ts
  • test-parity/node-suite/http2/module-exports.ts
  • test-parity/node-suite/http2/plaintext/loopback-streams.ts
  • test-parity/node-suite/http2/plaintext/multiplex.ts
  • test-parity/node-suite/http2/plaintext/request-body.ts
  • test-parity/node-suite/http2/plaintext/request-pseudoheaders.ts
  • test-parity/node-suite/http2/plaintext/response-body.ts
  • test-parity/node-suite/http2/plaintext/response-headers.ts
  • test-parity/node-suite/http2/server/create-overloads.ts
  • test-parity/node-suite/http2/server/empty-secure-options.ts
  • test-parity/node-suite/http2/server/inheritance.ts
  • test-parity/node-suite/http2/server/invalid-options.ts
  • test-parity/node-suite/http2/server/invalid-settings-option.ts
  • test-parity/node-suite/http2/server/listen-address.ts
  • test-parity/node-suite/http2/server/node-prefix.ts
  • test-parity/node-suite/http2/session/aborted-request-signal.ts
  • test-parity/node-suite/http2/session/class-names.ts
  • test-parity/node-suite/http2/session/client-close-callback.ts
  • test-parity/node-suite/http2/session/client-connect-state.ts
  • test-parity/node-suite/http2/session/client-destroy-state.ts
  • test-parity/node-suite/http2/session/controls.ts
  • test-parity/node-suite/http2/session/goaway-opaque-data.ts
  • test-parity/node-suite/http2/session/method-surface.ts
  • test-parity/node-suite/http2/session/ping-echo.ts
  • test-parity/node-suite/http2/session/ref-unref.ts
  • test-parity/node-suite/http2/session/request-option-validation.ts
  • test-parity/node-suite/http2/session/sequential-session-cleanup.ts
  • test-parity/node-suite/http2/session/settings-callback.ts
  • test-parity/node-suite/http2/session/settings-shape.ts
  • test-parity/node-suite/http2/settings/default-freshness.ts
  • test-parity/node-suite/http2/settings/default-shape.ts
  • test-parity/node-suite/http2/settings/invalid-boolean-values.ts
  • test-parity/node-suite/http2/settings/invalid-numeric-values.ts
  • test-parity/node-suite/http2/settings/numeric-boundaries.ts
  • test-parity/node-suite/http2/settings/packed-custom.ts
  • test-parity/node-suite/http2/settings/packed-defaults.ts
  • test-parity/node-suite/http2/settings/packed-empty.ts
  • test-parity/node-suite/http2/settings/packed-header-alias.ts
  • test-parity/node-suite/http2/settings/packed-order.ts
  • test-parity/node-suite/http2/settings/packed-unknown-key.ts
  • test-parity/node-suite/http2/settings/settings-helpers.ts
  • test-parity/node-suite/http2/settings/unpacked-aliases.ts
  • test-parity/node-suite/http2/settings/unpacked-custom.ts
  • test-parity/node-suite/http2/settings/unpacked-invalid-length.ts
  • test-parity/node-suite/http2/settings/unpacked-invalid-type.ts
  • test-parity/node-suite/http2/settings/unpacked-typed-array.ts
  • test-parity/node-suite/http2/settings/unpacked-validation.ts
  • test-parity/node-suite/http2/stream/close-validation.ts
  • test-parity/node-suite/http2/stream/initial-state.ts
  • test-parity/node-suite/http2/stream/sent-headers.ts
  • test-parity/node-suite/http2/stream/trailer-surface.ts
  • test-parity/node_suite_baseline.json
💤 Files with no reviewable changes (7)
  • test-parity/node-suite/http2/exports/server-client-surface.ts
  • test-parity/node-suite/http2/server/empty-secure-options.ts
  • test-parity/node-suite/http2/session/controls.ts
  • test-parity/node-suite/http2/settings/settings-helpers.ts
  • test-parity/node-suite/http2/module-exports.ts
  • test-parity/node-suite/http2/server/node-prefix.ts
  • test-parity/node-suite/http2/plaintext/loopback-streams.ts

Comment thread test-parity/node-suite/http2/compat/request-properties.ts Outdated
Comment thread test-parity/node-suite/http2/README.md Outdated
Comment thread test-parity/node-suite/http2/session/request-option-validation.ts
Comment thread test-parity/node-suite/http2/settings/numeric-boundaries.ts Outdated
Comment thread test-parity/node-suite/http2/settings/packed-empty.ts
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.

1 participant