Version
26.2.0
Platform
Subsystem
stream
What steps will reproduce the bug?
import { from, pull, text } from 'node:stream/iter';
const enc = new TextEncoder();
const addAOnFlush = (chunks) => chunks === null ? [enc.encode('-A')] : chunks;
const addBOnFlush = (chunks) => chunks === null ? [enc.encode('-B')] : chunks;
console.log(await text(pull(from('x'), addAOnFlush, addBOnFlush)));
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
Each stateless transform in the chain should receive a final null flush signal after all upstream data, including data emitted by earlier flushes, has been processed. Therefore transform B should first process A’s -A trailer and then receive its own flush signal, producing x-A-B.
What do you see instead?
Additional information
No response
Version
26.2.0
Platform
Subsystem
stream
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
x-A-BEach stateless transform in the chain should receive a final
nullflush signal after all upstream data, including data emitted by earlier flushes, has been processed. Therefore transform B should first process A’s-Atrailer and then receive its own flush signal, producingx-A-B.What do you see instead?
x-AAdditional information
No response