Registry Mirror
Skip to content

Conversation

@andrewtdiz

@andrewtdiz andrewtdiz commented Jun 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Aligns direct WritableStream.abort(reason) with Node when the writable is locked by ReadableStream.pipeTo() or another writer.
  • Keeps WritableStreamDefaultWriter.abort(reason) and internal transform/readable cancellation paths using the underlying abort operation while bypassing the public locked-stream guard.
  • Reworks node-suite/stream/web/abort-during-pipeto into a stable Node 26 oracle and removes its stale known-failure entry.

Issues

Cluster rationale

This is one Web Streams abort/lock lifecycle cut: direct stream abort, writer-owned abort, and pipeTo() destination locking share the same writable stream lock invariant. The PR stays out of unrelated Web Streams lifecycle and iterator work already covered by neighboring PRs.

Tests

  • cargo check -p perry-stdlib
  • cargo build -p perry-stdlib --release
  • cargo build -p perry-runtime -p perry-stdlib -p perry --release
  • NO_COLOR=1 FORCE_COLOR=0 npx --yes node@26 test-parity/node-suite/stream/web/abort-during-pipeto.ts
  • PERRY_NO_AUTO_OPTIMIZE=1 target/release/perry compile test-parity/node-suite/stream/web/abort-during-pipeto.ts -o /tmp/perry-abort-during-pipeto --debug-symbols --no-cache && /tmp/perry-abort-during-pipeto
  • npm exec --yes --package=node@26 -- bash -lc './run_parity_tests.sh --suite node-suite --module stream/web --filter abort-during-pipeto'
  • PERRY_NO_AUTO_OPTIMIZE=1 PERRY_NO_CACHE=1 npm exec --yes --package=node@26 -- bash -lc './run_parity_tests.sh --suite node-suite --module stream/web --filter abort-during-pipeto'
  • PERRY_NO_AUTO_OPTIMIZE=1 PERRY_NO_CACHE=1 npm exec --yes --package=node@26 -- bash -lc './run_parity_tests.sh --suite node-suite --module stream/web --filter pipe-to'
  • PERRY_NO_AUTO_OPTIMIZE=1 PERRY_NO_CACHE=1 npm exec --yes --package=node@26 -- bash -lc './run_parity_tests.sh --suite node-suite --module stream/web --filter writer'
  • cargo fmt --all -- --check
  • git diff --check
  • ./scripts/check_file_size.sh
  • jq empty test-parity/known_failures.json

Known limitations / non-goals

  • Does not implement broader Web Streams abort propagation, BYOB reader behavior, strategy size accounting, or backpressure changes.
  • Does not cover classic node:stream lifecycle options.
  • The first cold auto-optimized harness run hit the existing object-file link race after rebuilding auto artifacts; rerunning the same focused default harness passed, and direct default auto compile/run also passed.

@andrewtdiz andrewtdiz changed the title [codex] Reject direct WritableStream abort while locked fix(stream/web): reject direct abort while locked Jun 4, 2026
@proggeramlug
proggeramlug marked this pull request as ready for review June 4, 2026 16:01
@proggeramlug
proggeramlug merged commit 2d9ec1b into PerryTS:main Jun 4, 2026
13 checks passed
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