Skip to content

fix: No longer display tags on stderr data in component testing#33400

Merged
cacieprins merged 25 commits intodevelopfrom
fix/ct-stderr-tags-in-prod
Mar 3, 2026
Merged

fix: No longer display tags on stderr data in component testing#33400
cacieprins merged 25 commits intodevelopfrom
fix/ct-stderr-tags-in-prod

Conversation

@cacieprins
Copy link
Contributor

@cacieprins cacieprins commented Feb 23, 2026

Additional details

When Cypress intentionally writes to stderr, it tags the content so that it will be preserved and written to the top level stderr. The @packages/stderr-filtering package takes care of tagging data and filtering the tags (and untagged data) from the stderr stream. This prevents benign stderr messages from Electron from surfacing.

In component testing run mode with webpack 5, the out stream was getting tagged. Unfortunately, that entrypoint to the binary was not captured by the filtering part of @packages/stderr-filtering.

This moves filter streaming from @packages/electron to the spawn logic in @packages/cli, ensuring it wraps the outermost process and filters any tags that come through stderr.


Note

Medium Risk
Changes the CLI’s child-process stderr piping and introduces packaging-time dependency filtering, which could affect runtime logging/diagnostics and CLI bundling if misconfigured. Also adjusts system-test dependency resolution and fixtures, which may impact CI install behavior for test projects.

Overview
Prevents internal stderr tagging noise from leaking into user-facing CLI output by routing spawned Cypress process stderr through @packages/stderr-filtering in cli/lib/exec/spawn.ts (with pass-through behavior in dev/debug/logging modes).

Updates CLI packaging to include @packages/stderr-filtering for bundling while stripping all @packages/* entries from the published cli/build/package.json.

System tests now reference cypress from cli/build and the dep-installer resolves file: workspace deps to absolute paths relative to the project, with lockfiles updated accordingly.

Written by Cursor Bugbot for commit 0f5aa8f. This will update automatically on new commits. Configure here.

Steps to test

  1. yarn binary-build (choose: overwrite)
  2. yarn binary-package [--skipSigning, if on osx]
  3. With the fresh binary, run component testing in the webpack5/react project in cypress-component-testing-apps: https://github.com/cypress-io/cypress-component-testing-apps/tree/main/react-webpack5-js
  4. Confirm there is no CYPRESS.STDERR tags in the output stream

How has the user experience changed?

PR Tasks

@cacieprins cacieprins changed the title Fix: No longer display tags on stderr data in component testing fix: No longer display tags on stderr data in component testing Feb 23, 2026
@cypress
Copy link

cypress bot commented Feb 23, 2026

cypress    Run #69199

Run Properties:  status check passed Passed #69199  •  git commit 0f5aa8f223: Merge branch 'develop' into fix/ct-stderr-tags-in-prod
Project cypress
Branch Review fix/ct-stderr-tags-in-prod
Run status status check passed Passed #69199
Run duration 18m 57s
Commit git commit 0f5aa8f223: Merge branch 'develop' into fix/ct-stderr-tags-in-prod
Committer Cacie Prins
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 12
Tests that did not run due to a developer annotating a test with .skip  Pending 1112
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 27188
View all changes introduced in this branch ↗︎
UI Coverage  61.04%
  Untested elements 28  
  Tested elements 47  
Accessibility  99.03%
  Failed rules  0 critical   3 serious   1 moderate   0 minor
  Failed elements 18  

@cacieprins cacieprins marked this pull request as ready for review February 25, 2026 15:51
@cacieprins cacieprins enabled auto-merge (squash) February 26, 2026 20:54
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

@cacieprins cacieprins requested a review from mschile February 27, 2026 20:42
Copy link
Contributor

@mschile mschile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a comment.

@alexsch01
Copy link
Contributor

alexsch01 commented Mar 2, 2026

I don't know if this fixes the case with e2e testing as well
if that's true, should the title be changed?

@cacieprins cacieprins merged commit 8b79e52 into develop Mar 3, 2026
90 of 94 checks passed
@cacieprins cacieprins deleted the fix/ct-stderr-tags-in-prod branch March 3, 2026 16:28
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.

webpack info logs less readable with CYPRESS.STDERR annotations - re-open #32569

3 participants