fix: contain routed preview fetch failures#2096
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #2094
Security impact
Routed browser fetch failures could previously persist browser-session authentication material through Playwright request call logs. This change removes secret-bearing header values and URL parameters at the shared redaction boundary and sanitizes every affected browser error path before it can reach tracker errors, stdout/stderr, diagnostics, manifests, artifacts, or snapshots. Tests use synthetic sentinels only.
Root cause
isBrowserPreviewRouteFetchRecoverableError()recognized disposal and decompression failures but not transient upstream transport failures. The route callback then tracked and rethrew the original Playwright error, allowing a rejected route handler and its request call log to escape into process-level stderr.Retry and redaction design
BrowserPreviewRouteFetchErrorErrorprojectionCompatibility
Existing redirect routing, disposal/decompression recovery, liveness handling, and advisory/required route-drain semantics remain intact. Non-routed traffic is unchanged.
Test results
npm run buildpassednpm run test:redactionpassednpm run test:browser-preview-routingpassed (6 tests)npm run test:browser-accessibility-oraclespassed (42 tests)npm run test:browser-diagnostic-providerspassednpm run test:browser-callback-materialization-contractspassednpm run test:browser-artifact-sessionpassednpm run test:production-boundary-enforcementpassedgit diff --checkpassednpm run checkreached the pre-existingwordpress.collect-workload-result outputShape should mention outputSchema idfailure tracked in command-registry-smoke fails on main: wordpress.collect-workload-result outputShape missing outputSchema id mention #1745; the production-boundary phase and build passed before that unrelated assertion