Skip to content

fix: stderr tokens are no longer injected when in development mode#32674

Merged
cacieprins merged 15 commits into
developfrom
fix/stderr-tokens-dev-mode
Oct 14, 2025
Merged

fix: stderr tokens are no longer injected when in development mode#32674
cacieprins merged 15 commits into
developfrom
fix/stderr-tokens-dev-mode

Conversation

@cacieprins
Copy link
Copy Markdown
Collaborator

@cacieprins cacieprins commented Oct 8, 2025

Additional details

Most notably in CT, when running Cypress in development mode, the STDERR marking tokens were appearing in the final cli output. This:

  • Ensures that we are not adding tokens when we shouldn't (e.g., debugging electron, internal development mode for Cypress)
  • Ensures that we are not stripping tokens when we aren't adding them
  • Refactors to make this distinction easier to determine

Steps to test

Check out and build; run cypress:run --component --project ./packages/driver, ensure no tokens exist in the output

How has the user experience changed?

PR Tasks


Note

Disables stderr tag injection in development/ELECTRON_ENABLE_LOGGING modes, refactors filtering/tagging logic accordingly, and updates tests and changelog.

  • stderr-filtering:
    • Conditional Tagging: Introduce tagsDisabled() to skip tags when CYPRESS_INTERNAL_ENV=development or ELECTRON_ENABLE_LOGGING=1.
    • Refactor filter: Remove disableTags arg and DISABLE_TAGS; only construct FilterTaggedContent when tags are enabled.
    • TagStream updates: Add conditional tag() application, use buffers consistently for empty output, and add verbose debug namespace.
    • logError: Use tagsDisabled() to omit START_TAG/END_TAG when disabled.
  • Tests:
    • Update specs to use env stubbing; add cases for development/Electron logging; assert no tag stream when disabled; adjust buffer expectations.
  • Changelog:
    • Add note that verbose tag bracketing is suppressed in Cypress dev environments or when Electron logging is enabled.

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

@cacieprins cacieprins changed the title Fix: stderr tokens are no longer injected when in development mode fix: stderr tokens are no longer injected when in development mode Oct 8, 2025
@cacieprins cacieprins marked this pull request as ready for review October 8, 2025 13:51
@cacieprins cacieprins requested a review from AtofStryker October 8, 2025 13:52
cursor[bot]

This comment was marked as outdated.

@cypress
Copy link
Copy Markdown

cypress Bot commented Oct 8, 2025

cypress    Run #66435

Run Properties:  status check failed Failed #66435  •  git commit 9f65f37b47: Merge branch 'develop' into fix/stderr-tokens-dev-mode
Project cypress
Branch Review fix/stderr-tokens-dev-mode
Run status status check failed Failed #66435
Run duration 20m 29s
Commit git commit 9f65f37b47: Merge branch 'develop' into fix/stderr-tokens-dev-mode
Committer Cacie Prins
View all properties for this run ↗︎

Test results
Tests that failed  Failures 1
Tests that were flaky  Flaky 11
Tests that did not run due to a developer annotating a test with .skip  Pending 1102
Tests that did not run due to a failure in a mocha hook  Skipped 4
Tests that passed  Passing 26730
View all changes introduced in this branch ↗︎

Warning

Partial Report: The results for the Application Quality reports may be incomplete.

UI Coverage  45.4%
  Untested elements 185  
  Tested elements 158  
Accessibility  97.97%
  Failed rules  4 critical   8 serious   2 moderate   2 minor
  Failed elements 101  

Tests for review

Failed  cypress/e2e/studio/studio.cy.ts • 1 failed test • app-e2e

View Output

Test Artifacts
Cypress Studio > updates an existing test with assertions Test Replay Screenshots
Flakiness  e2e/origin/config_env.cy.ts • 1 flaky test • 5x-driver-inject-document-domain-chrome:beta

View Output

Test Artifacts
cy.origin- Cypress.config() > serializable > overwrites different values in secondary if one exists in the primary Test Replay
Flakiness  e2e/origin/config_env.cy.ts • 1 flaky test • 5x-driver-inject-document-domain-chrome

View Output

Test Artifacts
cy.origin- Cypress.config() > serializable > overwrites different values in secondary if one exists in the primary Test Replay
Flakiness  issues/28527.cy.ts • 1 flaky test • 5x-driver-electron

View Output

Test Artifacts
issue 28527 > fails and then retries and verifies about:blank is not displayed Test Replay Screenshots
Flakiness  issues/28527.cy.ts • 1 flaky test • 5x-driver-chrome

View Output

Test Artifacts
issue 28527 > fails and then retries and verifies about:blank is not displayed Test Replay Screenshots
Flakiness  commands/net_stubbing.cy.ts • 1 flaky test • 5x-driver-firefox

View Output

Test Artifacts
... > stops waiting when an xhr request is canceled
    </td>
  </tr></table>

The first 5 flaky specs are shown, see all 11 specs in Cypress Cloud.

cursor[bot]

This comment was marked as outdated.

Comment thread packages/stderr-filtering/lib/TagStream.ts Outdated
Comment thread packages/stderr-filtering/lib/__spec__/Filter.spec.ts
@cacieprins cacieprins merged commit 418c438 into develop Oct 14, 2025
84 of 90 checks passed
@cacieprins cacieprins deleted the fix/stderr-tokens-dev-mode branch October 14, 2025 17:55
@cypress-bot
Copy link
Copy Markdown
Contributor

cypress-bot Bot commented Oct 18, 2025

Released in 15.5.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v15.5.0, please open a new issue.

@cypress-bot cypress-bot Bot locked as resolved and limited conversation to collaborators Oct 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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

2 participants