Skip to content

fix(buffer): preserve stream consumer byte iteration#2254

Open
andrewtdiz wants to merge 2 commits into
PerryTS:mainfrom
andrewtdiz:codex/stream-consumers-buffer-iteration
Open

fix(buffer): preserve stream consumer byte iteration#2254
andrewtdiz wants to merge 2 commits into
PerryTS:mainfrom
andrewtdiz:codex/stream-consumers-buffer-iteration

Conversation

@andrewtdiz
Copy link
Copy Markdown
Contributor

Summary

  • Preserve exact byte iteration for Buffers returned by node:stream/consumers.buffer().
  • Route Buffer Symbol.iterator lookups to values() while still respecting own symbol properties.
  • Materialize small-slab Buffers as bytes in Array.from(buffer) before probing GC metadata.
  • Add parity coverage and remove the now-passing buffer-byte-exact known failure.

Tests

  • cargo fmt --all -- --check
  • jq empty test-parity/known_failures.json
  • git diff --check origin/main...HEAD
  • ./scripts/check_file_size.sh
  • ./run_parity_tests.sh --suite node-suite --module stream/consumers (33 pass, 0 fail)
  • RUST_TEST_THREADS=1 cargo test -p perry-runtime (738 pass)
  • CARGO_BUILD_JOBS=1 cargo test --workspace --exclude perry-runtime --exclude perry-ui-macos --exclude perry-ui-ios --exclude perry-ui-visionos --exclude perry-ui-tvos --exclude perry-ui-watchos --exclude perry-ui-gtk4 --exclude perry-ui-android --exclude perry-ui-windows

Non-goals

  • Does not change stream pumping or the remaining stream pipeline/compose/web gaps.

@andrewtdiz andrewtdiz force-pushed the codex/stream-consumers-buffer-iteration branch 3 times, most recently from 50cea6e to 9cb8bd7 Compare May 28, 2026 17:17
@andrewtdiz andrewtdiz force-pushed the codex/stream-consumers-buffer-iteration branch from 9cb8bd7 to 234f305 Compare May 28, 2026 17:35
# Conflicts:
#	crates/perry-runtime/src/array/flat_clone.rs
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