Commit Graph
46917 Commits
Author SHA1 Message Date
Filip Skokan 12052dbe14 test: cover webcrypto prototype pollution systematically
Drive the regression test from the WebCrypto algorithm registry so all
supported algorithms and operations must add explicit coverage
regardless of whether they are native-job backed or js-based.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63520
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-05-27 11:35:49 +02:00
Filip Skokan eeb77d217c doc,lib: align WebCrypto names with spec
Rename WebCrypto operation parameters and local variables to match the
spec terminology.

Use operation, algorithm, and key names consistently between the docs
and implementation.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63518
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-05-27 11:35:48 +02:00
Node.js GitHub Bot 8c479f274a test: update test426-fixtures to 9b9e225b5a63139e9a95cdd1bf874a8f0b9d131
PR-URL: https://github.com/nodejs/node/pull/63373
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-05-27 11:35:48 +02:00
Daijiro Wachi c85ee22df6 doc: fix double spaces in ERR_TLS_INVALID_PROTOCOL_METHOD
Signed-off-by: Daijiro Wachi <daijiro.wachi@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63511
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-05-27 11:35:48 +02:00
Node.js GitHub Bot 2ca32a5ee8 test: update WPT for url to e4a4672e9e
PR-URL: https://github.com/nodejs/node/pull/63372
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-05-27 11:35:48 +02:00
Trivikram Kamat dc12b730d8 stream: wait for push writer end fallback to drain
When endSync() returns -1 after buffered writes, a follow-up end()
should stay pending until the readable side drains the queued data.

Do not make duplex channel close() wait for that drain, since close()
only needs to signal EOF to the peer. Waiting there can deadlock when
the peer starts reading only after close() resolves.

Fixes: https://github.com/nodejs/node/issues/63502

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
PR-URL: https://github.com/nodejs/node/pull/63503
Fixes: https://github.com/nodejs/node/issues/63502
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-05-27 11:35:48 +02:00
James M Snell 5989f4a6e1 quic: support hostname verification
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63483
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-05-27 11:35:48 +02:00
James M Snell b4d30e7a78 quic: add stream idle timeout
Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode:Opus 4.6
PR-URL: https://github.com/nodejs/node/pull/63483
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-05-27 11:35:48 +02:00
James M Snell 55f65f9fb6 src: improve token return value check
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63483
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-05-27 11:35:48 +02:00
James M Snell 8a1017f774 quic: add block list support for endpoints
Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode/Opus 4.6
PR-URL: https://github.com/nodejs/node/pull/63483
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-05-27 11:35:47 +02:00
James M Snell 5a3ab93c49 quic: improve peer cert verification
On the client, add verifyPeer: 'auto', 'strict', and
'manual' modes. The 'strict' mode will reject invalid
certs at the handshake layer, while the 'manual' mode
allows the application to inspect the peer cert and decide
whether to trust it or not. The 'auto' mode is the default
and will reject invalid certs at a middle layer after the
onhandshake event.

Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode/Opus 4.6
PR-URL: https://github.com/nodejs/node/pull/63483
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-05-27 11:35:47 +02:00
James M Snell 9701a82a78 quic: handle h3 max header size option
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63483
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-05-27 11:35:47 +02:00
James M Snell 71788a2048 quic: add rate limiting docs
Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode/Opus 4.6
PR-URL: https://github.com/nodejs/node/pull/63483
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-05-27 11:35:47 +02:00
James M Snell 309bd49906 quic: cache timestamp for address lru cache
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63483
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-05-27 11:35:47 +02:00
James M Snell 2ce5588d51 quic: add session creation rate limiting
Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode/Opus 4.6
PR-URL: https://github.com/nodejs/node/pull/63483
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-05-27 11:35:47 +02:00
James M Snell 98808baed1 quic: refine rate limiting
Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode:Opus 4.6
PR-URL: https://github.com/nodejs/node/pull/63483
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-05-27 11:35:47 +02:00
James M Snell 75a4176b32 quic: flip preferred address policy default to 'ignore'
Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode:Opus 4.6
PR-URL: https://github.com/nodejs/node/pull/63483
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-05-27 11:35:47 +02:00
James M Snell 8b6b03d60c quic: add doc note about certificate size limitations
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63483
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-05-27 11:35:47 +02:00
Trivikram Kamat 1bf875bd21 test: deflake async-hooks statwatcher test
Wait for the initial missing-file poll before writing watched files.
Otherwise uv_fs_poll can observe the created file as its baseline and
never emit the expected change event.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
PR-URL: https://github.com/nodejs/node/pull/63396
Refs: https://github.com/nodejs/reliability/blob/main/reports/2026-05-15.md#jstest-failure
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-05-27 11:35:46 +02:00
Trivikram Kamat 97dbfa09f7 test: avoid test_runner watch restart in spec snapshot
Pass explicit test files to the watch-mode spec reporter fixture.
This prevents setup writes from triggering a watch restart.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
PR-URL: https://github.com/nodejs/node/pull/63392
Refs: https://github.com/nodejs/node/actions/runs/25983032903/job/76375266688
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-05-27 11:35:46 +02:00
Trivikram Kamat 8b038d7b33 test: reduce watch mode restart flakiness
Start waiting for each watch restart before writing the file, then wait
for a platform-scaled settling period before mutating it again.

This gives watch mode time to process filesystem events and dependency
reporting from the child process on slower CI machines.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
PR-URL: https://github.com/nodejs/node/pull/63390
Refs: https://github.com/nodejs/reliability/blob/main/reports/2026-05-16.md#jstest-failure
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-05-27 11:35:46 +02:00
Marco 215cd543dd tools: skip commit-lint on backport pull requests
Signed-off-by: marcopiraccini <marco.piraccini@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63378
Fixes: https://github.com/nodejs/node/issues/63192
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-05-27 11:35:46 +02:00
Moshe Atlow 003b9ccbe9 test_runner: dont buffer unordered events in process isolation mode
Signed-off-by: Moshe Atlow <moshe@atlow.co.il>
PR-URL: https://github.com/nodejs/node/pull/63432
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2026-05-27 11:35:46 +02:00
Aviv Keller 62947192f6 doc: move hyperlinks outside of text blocks
Signed-off-by: avivkeller <me@aviv.sh>
PR-URL: https://github.com/nodejs/node/pull/63493
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
2026-05-27 11:35:46 +02:00
Antoine du Hamel 0479f28e95 tools: fix skip of test-internet on forks
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63492
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2026-05-27 11:35:46 +02:00
Antoine du Hamel f504c01d66 test: get rid of unnecessary AbortController instanciations
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63489
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-05-27 11:35:46 +02:00
Antoine du Hamel 9849690a1d doc: edit Rust toolchain general install instructions
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63488
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2026-05-27 11:35:46 +02:00
René 972cd227cb ffi: remove function signature property aliases
Signed-off-by: Renegade334 <contact.9a5d6388@renegade334.me.uk>
PR-URL: https://github.com/nodejs/node/pull/63482
Refs: https://github.com/nodejs/node/pull/62072/changes#r3067834658
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2026-05-27 11:35:45 +02:00
atlowChemi fdc4b5aed4 test_runner: fix --test-rerun-failures swallowing failures on retry
Three independent bugs interacted to let a real failure-on-retry be
reported as a pass:

1. The runner's disambiguator stored the counter against the suffixed
   identifier (after mutation) instead of the base key, so the counter
   never advanced past 1 and every 3rd+ same-loc registration collided
   on :(1).
2. The reporter had the same off-by-one when writing the state file.
3. The reporter only bumped its counter on `test:pass`, so any failing
   test at a shared source location desynchronised the writer and
   runner counters - on retry, the surviving failing sibling would
   inherit a slot that in the previous attempt belonged to a different
   (passing) sibling. Node matched by that slot, replaced `this.fn`
   with a synthetic noop replay, and reported the failure as a pass.

Track the base identifier separately in the runner, bump the counter
against the base key in both the runner and the reporter, and bump the
reporter's counter on `test:fail` in addition to `test:pass`.

Fixes: https://github.com/nodejs/node/issues/63424
Signed-off-by: atlowChemi <chemi@atlow.co.il>
PR-URL: https://github.com/nodejs/node/pull/63431
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2026-05-27 11:35:45 +02:00
Trivikram Kamat 4f40a85a1a stream: flush each fused stateless transform
Ensure consecutive stateless stream/iter transforms each receive a
final null flush after upstream flush output has been processed.

Fixes: https://github.com/nodejs/node/issues/63467

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
PR-URL: https://github.com/nodejs/node/pull/63468
Fixes: https://github.com/nodejs/node/issues/63467
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-05-27 11:35:45 +02:00
Daijiro Wachi 885d2462e9 doc: fix double space in modules.md
Signed-off-by: Daijiro Wachi <daijiro.wachi@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63512
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-05-27 11:35:45 +02:00
sangwook 97b7ab19bd inspector: expose precise coverage start to JS runtime
Add a `startCoverage` method on the `profiler` internal binding so
that V8 precise coverage can be enabled after bootstrap. The method
is idempotent against the existing bootstrap path (which creates a
V8CoverageConnection when NODE_V8_COVERAGE or
--experimental-test-coverage is set) and a no-op when the inspector
is unavailable, e.g. in the parent process of
`--test --test-isolation=process` where workers handle coverage and
Environment::should_create_inspector() returns false.

Refs: https://github.com/nodejs/node/issues/60023
Signed-off-by: sangwook <rewq5991@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63079
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-05-27 11:35:45 +02:00
Filip Skokan e3ddb326c9 crypto: harden WebCrypto against prototype pollution
Avoid re-wrapping native WebCrypto promises with PromiseResolve(),
since resolving a promise can read its user-mutated constructor.

Add a helper for chaining internal WebCrypto job promises without
consulting Promise species state, and use it for intermediate job
results.

Also align JWK wrapping and unwrapping with the spec's fresh-global
JSON handling by detaching internal JWK values from user prototypes.
Use the internal UTF-8 encoder/decoder bindings instead of shared
TextEncoder/TextDecoder prototype methods.

Expand the WebCrypto prototype pollution regression test to cover
SubtleCrypto methods, export formats, zero-length KDF results, JWK
toJSON/kty pollution, and encoder/decoder prototype poisoning.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63363
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
2026-05-27 11:35:45 +02:00
Filip Skokan e04cd17dc0 crypto: pass CryptoKey handles to KDF jobs
Pass CryptoKey handles directly into KDF jobs instead of exporting
secret bytes in lib.

Normalize HKDF, PBKDF2, and Argon2 around the same job construction
pattern so WebCrypto derivation paths avoid extra key material copies
and keep operation failures in native job handling.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63363
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
2026-05-27 11:35:45 +02:00
Filip Skokan 64ba74d847 crypto: remove async from WebCrypto methods
Remove async function wrappers from SubtleCrypto methods while keeping
their public promise-returning behaviour.

Route method entry points through a shared helper that converts
synchronous validation errors into rejected promises. Let the internal
implementations return native job promises directly.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63363
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
2026-05-27 11:35:45 +02:00
Filip Skokan bd230418b4 crypto: add WebCrypto CryptoJob mode
Add a WebCrypto-specific CryptoJob mode that returns a promise from
run() and resolves it when native work is finished.

Encode job output directly as Web Crypto values, including CryptoKey
instances and CryptoKeyPair dictionaries. Convert operation-specific
setup failures from AdditionalConfig into OperationError rejections.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63363
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
2026-05-27 11:35:45 +02:00
Trivikram Kamat 526e0fc427 stream: avoid duplicate writes in toWritable
PushWriter can return false after accepting a chunk when block
backpressure is active. Teach the classic Writable adapter to treat
that case as accepted backpressure instead of retrying through the
async write path.

Fixes: https://github.com/nodejs/node/issues/63359

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
PR-URL: https://github.com/nodejs/node/pull/63360
Fixes: https://github.com/nodejs/node/issues/63359
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-05-27 11:35:44 +02:00
Trivikram Kamat 0008d01f9c stream: propagate abort reason in share and broadcast
Pass signal.reason to the multi-consumer cancel paths so signal abort
is reported as AbortError instead of clean iterator completion.

Also make detached share consumers rethrow a stored source error when
they resume after cancellation, preserving the abort reason for pending
pulls.

Fixes: https://github.com/nodejs/node/issues/63357

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
PR-URL: https://github.com/nodejs/node/pull/63358
Fixes: https://github.com/nodejs/node/issues/63357
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-05-27 11:35:43 +02:00
npm CLI robot e286fa170d deps: upgrade npm to 11.15.0
PR-URL: https://github.com/nodejs/node/pull/63463
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
2026-05-23 00:05:43 +02:00
Antoine du Hamel 69dfadf785 tools: mock some Python utils in v8.nix to reuse builds
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63454
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2026-05-23 00:05:43 +02:00
René 5d7805e433 ffi: move DynamicLibrary disposer to native layer
Signed-off-by: Renegade334 <contact.9a5d6388@renegade334.me.uk>
PR-URL: https://github.com/nodejs/node/pull/63459
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2026-05-23 00:05:43 +02:00
Daijiro Wachi 42fbb48bc6 doc: fix "options" to "option" in tls.createServer
Signed-off-by: Daijiro Wachi <daijiro.wachi@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63453
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-05-23 00:05:43 +02:00
Mike McCready 05a7b0a301 doc: add Rust toolchain general install instructions
Signed-off-by: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/63426
Refs: https://github.com/nodejs/node/issues/63225
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2026-05-23 00:05:43 +02:00
Joyee Cheung 1a4090a83d debugger: surface inspector failures in probe mode
This addresses a few TODOs left from the initial implementation
around the error handling when the inspector session fails
mid-probe - for example because a probe expression terminates
the target, severs the inspector connection, or hangs the
evaluation. Before this patch, these failures would cause the
probe report to silently miss hits or hit the session timeout.
A consumer of these reports could not tell whether the
recorded hits were reliable or a partial trace cut short
by an inspector-side failure.

This patch surfaces those cases as a new `probe_failure` terminal
`error` event on the report, with best-effort attribution to the
implicated probe via `error.probe` and additional context on
`error.details`. Together with `probe_timeout`, it marks the
report as best-effort, and the probing process exits 1 in both
cases. `probe_target_exit` and clean `completed`/`miss` reports
continue to exit 0 because the recorded hits in those cases remain
ground truth, so tooling can use the exit code as a quick
trustworthiness signal. `error.message` now also contains
actionable recovery hints whereever possible.

The per-hit `error` is reshaped to `{ message, details? }`
so that the per-hit and terminal errors share a top-level shape.
Both fields are informative-only, only their top-level type is stable.

Signed-off-by: Joyee Cheung <joyeec9h3@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63437
Refs: https://github.com/nodejs/node/pull/62713
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Jan Martin <jan.krems@gmail.com>
2026-05-23 00:05:42 +02:00
Chemi Atlow 170585ff90 test: isolate rerun-failures state file under tmpdir
The rerun-failures state file lived at a fixed path under fixtures/,
so concurrent invocations of test-runner-test-rerun-failures (e.g.
`python tools/test.py --repeat 100 -j 16 ...`) raced on a single file
and failed intermittently. Move the path to `tmpdir.resolve(...)` so
each process gets its own scratch state.

Signed-off-by: atlowChemi <chemi@atlow.co.il>
PR-URL: https://github.com/nodejs/node/pull/63449
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-05-23 00:05:42 +02:00
sangwook 217338e18b stream: fix Writable.toWeb() hang on synchronous drain
A race condition in the Writable.toWeb() adapter caused the stream
to hang if the underlying Node.js Writable emitted a 'drain' event
synchronously during a write() call. This often happened when
highWaterMark was set to 0.

By checking writableNeedDrain immediately after a backpressured write,
the adapter now correctly detects if the stream has already drained,
resolving the backpressure promise instead of waiting indefinitely
for an event that has already occurred.

Fixes: https://github.com/nodejs/node/issues/61145
Signed-off-by: sangwook <rewq5991@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/61197
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-05-23 00:05:42 +02:00
James M Snell 30eff873e0 quic: add applicationOptions to session
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63267
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-05-23 00:05:42 +02:00
James M Snell 4303daa43c quic: add getters for local and remote transport parameters
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63267
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-05-23 00:05:42 +02:00
James M Snell e1b1bb5465 quic: improve recv coalescing test sizes
Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode:Opus 4.6
PR-URL: https://github.com/nodejs/node/pull/63267
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-05-23 00:05:42 +02:00
James M Snell 25a416f457 quic: add initial RTT option to session options
Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: OpenCode:Opus 4.6
PR-URL: https://github.com/nodejs/node/pull/63267
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-05-23 00:05:42 +02:00