Last Good Version
1.60
First Bad Version
1.61
Steps to reproduce
(POSIX, large suite, 1.61 vs 1.60):
npx playwright test --list --reporter=list > out.txt # tail missing on 1.61
npx playwright test --list --reporter=list | wc -l # fewer lines than "Total: N"
Expected behavior
No missing (truncated) lines in output
Actual behavior
On large suites, depending on system speed, the last few lines of output are truncated and missing from the piped results
Additional context
This is related to the StripAnsiStream that now wraps stdout/stderr introduced in #40688
It's not being flushed on exit, in gracefullyProcessExitDoNotHang so it's possible for the pipe to be closed before all the output has been flushed.
Environment
System:
OS: macOS 26.5.1
CPU: (14) arm64 Apple M3 Max
Memory: 110.64 MB / 36.00 GB
Binaries:
Node: 24.14.1 - /Users/dmountney/.nvm/versions/node/v24.14.1/bin/node
Yarn: 1.22.22 - /Users/dmountney/.nvm/versions/node/v24.14.1/bin/yarn
npm: 11.11.0 - /Users/dmountney/.nvm/versions/node/v24.14.1/bin/npm
pnpm: 11.1.2 - /opt/homebrew/bin/pnpm
IDEs:
VSCode: 1.104.1 - /opt/homebrew/bin/code
Cursor: 3.8.23 - /usr/local/bin/cursor
Claude Code: 2.1.190 - /Users/dmountney/.local/bin/claude
Languages:
Bash: 3.2.57 - /bin/bash
npmPackages:
@playwright/test: ^1.61.1 => 1.61.1
Last Good Version
1.60
First Bad Version
1.61
Steps to reproduce
(POSIX, large suite, 1.61 vs 1.60):
npx playwright test --list --reporter=list > out.txt # tail missing on 1.61
npx playwright test --list --reporter=list | wc -l # fewer lines than "Total: N"
Expected behavior
No missing (truncated) lines in output
Actual behavior
On large suites, depending on system speed, the last few lines of output are truncated and missing from the piped results
Additional context
This is related to the StripAnsiStream that now wraps stdout/stderr introduced in #40688
It's not being flushed on exit, in
gracefullyProcessExitDoNotHangso it's possible for the pipe to be closed before all the output has been flushed.Environment
System: OS: macOS 26.5.1 CPU: (14) arm64 Apple M3 Max Memory: 110.64 MB / 36.00 GB Binaries: Node: 24.14.1 - /Users/dmountney/.nvm/versions/node/v24.14.1/bin/node Yarn: 1.22.22 - /Users/dmountney/.nvm/versions/node/v24.14.1/bin/yarn npm: 11.11.0 - /Users/dmountney/.nvm/versions/node/v24.14.1/bin/npm pnpm: 11.1.2 - /opt/homebrew/bin/pnpm IDEs: VSCode: 1.104.1 - /opt/homebrew/bin/code Cursor: 3.8.23 - /usr/local/bin/cursor Claude Code: 2.1.190 - /Users/dmountney/.local/bin/claude Languages: Bash: 3.2.57 - /bin/bash npmPackages: @playwright/test: ^1.61.1 => 1.61.1