test(https): expand Node 26.5 parity coverage - #6867
Conversation
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughExpands the ChangesHTTPS parity coverage
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
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (54)
test-parity/node-suite/https/README.mdtest-parity/node-suite/https/agent/create-connection-options.tstest-parity/node-suite/https/agent/create-connection-port-host-options.tstest-parity/node-suite/https/agent/create-connection-port-options.tstest-parity/node-suite/https/agent/default-state.tstest-parity/node-suite/https/agent/detached-get-name.tstest-parity/node-suite/https/agent/get-name-defaults.tstest-parity/node-suite/https/agent/get-name-servername.tstest-parity/node-suite/https/agent/get-name-tls-options.tstest-parity/node-suite/https/agent/global-default-state.tstest-parity/node-suite/https/agent/inherited-methods.tstest-parity/node-suite/https/agent/method-values.tstest-parity/node-suite/https/agent/options-state.tstest-parity/node-suite/https/agent/session-cache-defaults.tstest-parity/node-suite/https/agent/session-cache-disabled.tstest-parity/node-suite/https/agent/session-cache-eviction.tstest-parity/node-suite/https/agent/session-cache-update.tstest-parity/node-suite/https/agent/session-receiver-validation.tstest-parity/node-suite/https/agent/tls12-session-cache-disabled.tstest-parity/node-suite/https/agent/tls12-session-reuse.tstest-parity/node-suite/https/classes/agent-inheritance.tstest-parity/node-suite/https/classes/agent-prototype.tstest-parity/node-suite/https/classes/server-inheritance.tstest-parity/node-suite/https/classes/server-prototype.tstest-parity/node-suite/https/exports/descriptors.tstest-parity/node-suite/https/exports/module-keys.tstest-parity/node-suite/https/exports/module-surface.tstest-parity/node-suite/https/exports/named-aliases.tstest-parity/node-suite/https/request/agent-false.tstest-parity/node-suite/https/request/custom-agent.tstest-parity/node-suite/https/request/get-auto-end.tstest-parity/node-suite/https/request/global-agent.tstest-parity/node-suite/https/request/protocol-validation.tstest-parity/node-suite/https/request/request-return.tstest-parity/node-suite/https/request/string-url-overload.tstest-parity/node-suite/https/request/transport-socket.tstest-parity/node-suite/https/request/url-object-overload.tstest-parity/node-suite/https/request/url-options-merge.tstest-parity/node-suite/https/server/alpn-callback-option.tstest-parity/node-suite/https/server/alpn-default.tstest-parity/node-suite/https/server/construction-overloads.tstest-parity/node-suite/https/server/default-state.tstest-parity/node-suite/https/server/empty-options.tstest-parity/node-suite/https/server/options-validation.tstest-parity/node-suite/https/server/secure-response.tstest-parity/node-suite/https/surface/agent-method-values.tstest-parity/node-suite/https/surface/mirror-surface.tstest-parity/node-suite/https/tls/allow-untrusted-state.tstest-parity/node-suite/https/tls/alpn-http1.tstest-parity/node-suite/https/tls/explicit-ca-authorized.tstest-parity/node-suite/https/tls/hostname-mismatch.tstest-parity/node-suite/https/tls/reject-untrusted.tstest-parity/node-suite/https/tls/sni-servername.tstest-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
There was a problem hiding this comment.
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
📒 Files selected for processing (2)
changelog.d/6867-https-parity-expansion.mdscripts/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")) |
There was a problem hiding this comment.
🩺 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.
| 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.
Summary
node:httpsfixtures with 47 focused contractsChanges
test-parity/node-suite/https/**test-parity/node_suite_baseline.jsonRelated issue
n/a — standalone parity coverage expansion
Test plan
cargo build --release --bin perrycargo fmt --all -- --checkdeno fmt --check test-parity/node-suite/httpsgit diff --check./scripts/check_file_size.shstill reports the pre-existingcrates/perry-runtime/src/object/mod.rsat 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, andhttp2suites. 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
CLAUDE.md, orCHANGELOG.mdchangestest-files/test_parity_*.tsSummary by CodeRabbit
New Features
Bug Fixes
Documentation
Chores