Skip to content

test(https): expand Node 26.5 parity coverage - #6867

Merged
proggeramlug merged 9 commits into
mainfrom
test/expand-node-https-parity
Jul 30, 2026
Merged

test(https): expand Node 26.5 parity coverage#6867
proggeramlug merged 9 commits into
mainfrom
test/expand-node-https-parity

Conversation

@TheHypnoo

@TheHypnoo TheHypnoo commented Jul 27, 2026

Copy link
Copy Markdown
Member

Summary

  • replace five broad node:https fixtures with 47 focused contracts
  • cover exports and inheritance, HTTPS Agent state and session caching, request/get overloads, Server construction, and TLS transport integration
  • add per-fixture evidence pinned to Node 26.5.0 and compare Deno 2.9.3 and Bun 1.2.18
  • update the clean Perry baseline from 5/5 to 6/47

Changes

File Change
test-parity/node-suite/https/** Add 47 granular fixtures and one evidence README; remove five broad fixtures
test-parity/node_suite_baseline.json Set the measured HTTPS floor to 6/47

Related issue

n/a — standalone parity coverage expansion

Test plan

  • Node 26.5.0: 47/47, identical across three runs; no failures, crashes, or timeouts
  • Perry: 6 passes and 41 stable differences across three clean focused runs; no compile failures, crashes, or timeouts
  • Deno 2.9.3: 45 identical and 2 stable differences across three runs
  • Bun 1.2.18: 17 identical and 30 stable differences across three runs
  • cargo build --release --bin perry
  • cargo fmt --all -- --check
  • deno fmt --check test-parity/node-suite/https
  • JSON parse and git diff --check

./scripts/check_file_size.sh still reports the pre-existing crates/perry-runtime/src/object/mod.rs at 2039 lines. This pull request does not change that file.

Scope exclusions

Generic HTTP parsing, headers, timeouts, stream flow, socket lifecycle, TLS primitives, certificate getters, and HTTP/2 fallback remain in the http, stream, net, tls, and http2 suites. Internet, fixed ports, system certificates, variable expiry, sleeps, scheduler or kernel races, large transfers, GC pressure, proxy environment behavior, and platform crypto details remain excluded. The README records each boundary and the stopping rule.

Checklist

  • No workspace version, CLAUDE.md, or CHANGELOG.md changes
  • Conventional commit in English
  • No changes under test-files/test_parity_*.ts

Summary by CodeRabbit

  • New Features

    • Expanded HTTPS compatibility coverage across agents, requests, servers, TLS, ALPN, SNI, certificates, session reuse, and module exports.
    • Added deterministic fixtures and traceability documentation for 47 HTTPS behavior contracts.
  • Bug Fixes

    • Updated HTTPS parity baselines to reflect expanded coverage and passing results.
  • Documentation

    • Documented supported coverage, runtime comparisons, certificate fixtures, and defined test boundaries.
  • Chores

    • Added configurable compilation timeouts for parity test execution.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Expands the node:https parity suite to 47 deterministic fixtures covering exports, classes, agents, requests, servers, TLS behavior, and session handling. It updates HTTPS baselines and documentation, and makes the Perry compile timeout configurable.

Changes

HTTPS parity coverage

Layer / File(s) Summary
Suite scope, baseline, and runner configuration
test-parity/node-suite/https/README.md, test-parity/node_suite_baseline.json, changelog.d/6867-https-parity-expansion.md, scripts/node_suite_run.py
Documents the 47-fixture suite, updates HTTPS baseline metrics, adds the changelog entry, and reads the Perry compile timeout from an environment variable.
Module exports and class surfaces
test-parity/node-suite/https/exports/*, test-parity/node-suite/https/classes/*
Checks module keys, aliases, descriptors, inheritance, and prototype properties for HTTPS agents and servers.
Agent state, naming, and sessions
test-parity/node-suite/https/agent/*
Covers agent defaults, options, methods, name generation, session-cache behavior, and TLS 1.2 session reuse.
Agent connection lifecycle
test-parity/node-suite/https/agent/create-connection-*
Exercises local TLS connection creation, socket state, handshake authorization, errors, and cleanup.
HTTPS server construction and responses
test-parity/node-suite/https/server/*
Tests server overloads, option validation, defaults, ALPN configuration, and secure responses.
HTTPS request entry points and transport
test-parity/node-suite/https/request/*
Exercises agent selection, protocol validation, request return values, URL overloads, option merging, auto-ending, and TLS socket properties.
TLS authorization, SNI, and ALPN
test-parity/node-suite/https/tls/*
Checks certificate authorization, rejection, hostname mismatch, SNI, ALPN negotiation, and HTTP version reporting.

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

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant HTTPSAgent
  participant TLSSocket
  participant HTTPSServer
  Client->>HTTPSAgent: create HTTPS request
  HTTPSAgent->>TLSSocket: establish TLS connection
  TLSSocket->>HTTPSServer: send request
  HTTPSServer->>Client: return response
Loading

Possibly related PRs

  • PerryTS/perry#6698: Updates per-module parity baseline values used by suite-level regression calculations.

Suggested labels: parity

Suggested reviewers: proggeramlug

🚥 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 HTTPS parity coverage expansion.
Description check ✅ Passed The description follows the template with summary, changes, related issue, test plan, and checklist sections.
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 💡 1
📝 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-https-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: 3

🤖 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/https/exports/descriptors.ts`:
- Around line 3-10: Update logDescriptor to handle an undefined result from
Object.getOwnPropertyDescriptor before accessing descriptor.value or other
properties, using the existing "missing" fallback convention from
classes/agent-prototype.ts so absent exports produce stable output instead of
crashing.

In `@test-parity/node-suite/https/request/agent-false.ts`:
- Around line 12-18: Update the assertion in the https.get callback to verify
that the request uses a per-request https.Agent rather than checking req.agent
=== false. Use req.agent instanceof https.Agent and/or ensure req.agent differs
from https.globalAgent, while preserving the existing fixture logging.

In `@test-parity/node-suite/https/tls/alpn-http1.ts`:
- Around line 10-21: Update the https.createServer options in the ALPN test to
configure server-side ALPN negotiation, using ALPNProtocols or ALPNCallback
consistent with the client’s advertised http/1.1 value. Preserve the existing
request and response behavior while ensuring the fixture exercises negotiated
ALPN rather than one-sided advertisement.
🪄 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: 7428119a-4d94-4705-b9bf-7bb164363990

📥 Commits

Reviewing files that changed from the base of the PR and between 563c359 and 149fce4.

📒 Files selected for processing (54)
  • test-parity/node-suite/https/README.md
  • test-parity/node-suite/https/agent/create-connection-options.ts
  • test-parity/node-suite/https/agent/create-connection-port-host-options.ts
  • test-parity/node-suite/https/agent/create-connection-port-options.ts
  • test-parity/node-suite/https/agent/default-state.ts
  • test-parity/node-suite/https/agent/detached-get-name.ts
  • test-parity/node-suite/https/agent/get-name-defaults.ts
  • test-parity/node-suite/https/agent/get-name-servername.ts
  • test-parity/node-suite/https/agent/get-name-tls-options.ts
  • test-parity/node-suite/https/agent/global-default-state.ts
  • test-parity/node-suite/https/agent/inherited-methods.ts
  • test-parity/node-suite/https/agent/method-values.ts
  • test-parity/node-suite/https/agent/options-state.ts
  • test-parity/node-suite/https/agent/session-cache-defaults.ts
  • test-parity/node-suite/https/agent/session-cache-disabled.ts
  • test-parity/node-suite/https/agent/session-cache-eviction.ts
  • test-parity/node-suite/https/agent/session-cache-update.ts
  • test-parity/node-suite/https/agent/session-receiver-validation.ts
  • test-parity/node-suite/https/agent/tls12-session-cache-disabled.ts
  • test-parity/node-suite/https/agent/tls12-session-reuse.ts
  • test-parity/node-suite/https/classes/agent-inheritance.ts
  • test-parity/node-suite/https/classes/agent-prototype.ts
  • test-parity/node-suite/https/classes/server-inheritance.ts
  • test-parity/node-suite/https/classes/server-prototype.ts
  • test-parity/node-suite/https/exports/descriptors.ts
  • test-parity/node-suite/https/exports/module-keys.ts
  • test-parity/node-suite/https/exports/module-surface.ts
  • test-parity/node-suite/https/exports/named-aliases.ts
  • test-parity/node-suite/https/request/agent-false.ts
  • test-parity/node-suite/https/request/custom-agent.ts
  • test-parity/node-suite/https/request/get-auto-end.ts
  • test-parity/node-suite/https/request/global-agent.ts
  • test-parity/node-suite/https/request/protocol-validation.ts
  • test-parity/node-suite/https/request/request-return.ts
  • test-parity/node-suite/https/request/string-url-overload.ts
  • test-parity/node-suite/https/request/transport-socket.ts
  • test-parity/node-suite/https/request/url-object-overload.ts
  • test-parity/node-suite/https/request/url-options-merge.ts
  • test-parity/node-suite/https/server/alpn-callback-option.ts
  • test-parity/node-suite/https/server/alpn-default.ts
  • test-parity/node-suite/https/server/construction-overloads.ts
  • test-parity/node-suite/https/server/default-state.ts
  • test-parity/node-suite/https/server/empty-options.ts
  • test-parity/node-suite/https/server/options-validation.ts
  • test-parity/node-suite/https/server/secure-response.ts
  • test-parity/node-suite/https/surface/agent-method-values.ts
  • test-parity/node-suite/https/surface/mirror-surface.ts
  • test-parity/node-suite/https/tls/allow-untrusted-state.ts
  • test-parity/node-suite/https/tls/alpn-http1.ts
  • test-parity/node-suite/https/tls/explicit-ca-authorized.ts
  • test-parity/node-suite/https/tls/hostname-mismatch.ts
  • test-parity/node-suite/https/tls/reject-untrusted.ts
  • test-parity/node-suite/https/tls/sni-servername.ts
  • test-parity/node_suite_baseline.json
💤 Files with no reviewable changes (5)
  • test-parity/node-suite/https/surface/agent-method-values.ts
  • test-parity/node-suite/https/agent/method-values.ts
  • test-parity/node-suite/https/server/empty-options.ts
  • test-parity/node-suite/https/exports/module-surface.ts
  • test-parity/node-suite/https/surface/mirror-surface.ts

Comment thread test-parity/node-suite/https/exports/descriptors.ts
Comment thread test-parity/node-suite/https/request/agent-false.ts Outdated
Comment thread test-parity/node-suite/https/tls/alpn-http1.ts Outdated

@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: 1

🤖 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 `@scripts/node_suite_run.py`:
- Line 78: Update the COMPILE_TIMEOUT configuration parsing to handle
non-integer PERRY_NODE_SUITE_COMPILE_TIMEOUT values without an unhandled
import-time ValueError, and reject zero or negative values. Use a clear
validation error or explicit fallback, while ensuring the resulting timeout is
always positive.
🪄 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: e6b70800-094f-4cbd-b127-71c827d26413

📥 Commits

Reviewing files that changed from the base of the PR and between 7806af9 and b144293.

📒 Files selected for processing (2)
  • changelog.d/6867-https-parity-expansion.md
  • scripts/node_suite_run.py

Comment thread scripts/node_suite_run.py
ROOT = sys.argv[2]
MODS = sys.argv[3].split(",") if len(sys.argv) > 3 and sys.argv[3] else None
NODE = os.environ.get("NODE_BIN", "node")
COMPILE_TIMEOUT = int(os.environ.get("PERRY_NODE_SUITE_COMPILE_TIMEOUT", "120"))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Validate the configurable timeout before using it.

A non-integer environment value raises ValueError during module import, while zero or negative values do not represent usable timeouts. Parse this setting with a clear validation error (or an explicit fallback) and require a positive value.

Suggested validation
-COMPILE_TIMEOUT = int(os.environ.get("PERRY_NODE_SUITE_COMPILE_TIMEOUT", "120"))
+try:
+    COMPILE_TIMEOUT = int(os.environ.get("PERRY_NODE_SUITE_COMPILE_TIMEOUT", "120"))
+except ValueError as exc:
+    raise SystemExit("PERRY_NODE_SUITE_COMPILE_TIMEOUT must be an integer") from exc
+if COMPILE_TIMEOUT <= 0:
+    raise SystemExit("PERRY_NODE_SUITE_COMPILE_TIMEOUT must be positive")
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
COMPILE_TIMEOUT = int(os.environ.get("PERRY_NODE_SUITE_COMPILE_TIMEOUT", "120"))
try:
COMPILE_TIMEOUT = int(os.environ.get("PERRY_NODE_SUITE_COMPILE_TIMEOUT", "120"))
except ValueError as exc:
raise SystemExit("PERRY_NODE_SUITE_COMPILE_TIMEOUT must be an integer") from exc
if COMPILE_TIMEOUT <= 0:
raise SystemExit("PERRY_NODE_SUITE_COMPILE_TIMEOUT must be positive")
🤖 Prompt for 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.

In `@scripts/node_suite_run.py` at line 78, Update the COMPILE_TIMEOUT
configuration parsing to handle non-integer PERRY_NODE_SUITE_COMPILE_TIMEOUT
values without an unhandled import-time ValueError, and reject zero or negative
values. Use a clear validation error or explicit fallback, while ensuring the
resulting timeout is always positive.

@proggeramlug
proggeramlug merged commit d96859a into main Jul 30, 2026
6 checks passed
@proggeramlug
proggeramlug deleted the test/expand-node-https-parity branch July 30, 2026 05:47
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.

2 participants