Repository navigation
fix(engine): diagnose a failed Chrome launch with the env it had - #7634
Merged
Merged
Conversation
The startup diagnosis rebuilt its env from process.env, so a launch that dropped WAYLAND_DISPLAY or the SwiftShader Vulkan pins was diagnosed with them restored. The engine and CLI now pass the failed attempt's env through explainChromeLaunchFailure; process.env stays the fallback when no env is given. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Edit accuracy: accurate 267 (base branch 267), smooth 94 of thoseThe gate passes. Quarantined, measured but not gated (8)
Unstable (2)
|
Contributor
There was a problem hiding this comment.
Verdict: APPROVE · 0 blocker · 0 important · 0 nits · cb374285
This closes the #7629 diagnosis-env nit. Both callers of explainChromeLaunchFailure now pass the attempt's env: the engine passes launchEnv and the CLI passes options.env. Running that env through buildChromeLaunchEnv again is safe because the base already has the passthrough fix. An env of undefined still falls back to process.env. The switch from a positional signal to an options object leaves no stale callers, and CI is green.
— Genesis
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.
When Chrome fails to start, the startup diagnosis now relaunches it with the env the failed attempt had, not one rebuilt from
process.env. Before this, a launch that droppedWAYLAND_DISPLAYor the SwiftShader Vulkan pins was diagnosed with them restored, so the diagnosis could describe a different failure.Claude Opus 5.5
Change
explainChromeLaunchFailuretakes{ signal, env }as its 4th argument (it was a baresignal).diagnoseChromeStartupspawns withbuildChromeLaunchEnv(options.env). When no env is given it still falls back toprocess.env, and the allowlist still applies either way.launchBrowserpasses thelaunchEnv(fingerprint)result that the attempt launched with. That env has the Wayland display removed on WSL hardware mode and the Vulkan pins removed for SwiftShader.withStartupDiagnosispasses the attempt'soptions.env, the same inputlaunchOwnedBrowserfilters.Tests
browserManager-sandboxRetryDiagnosis.test.ts):VK_DRIVER_FILESis set and a SwiftShader launch fails. The test asserts the diagnosis gets exactly the env the attempt launched with, and that env has no pin.launch.sandboxRetryDiagnosis.test.ts): a real end-to-end probe.WAYLAND_DISPLAYis set inprocess.env, the launch env omits it, and a fake browser prints itsWAYLAND_DISPLAY. The diagnosis must not see theprocess.envvalue.env, diagnosis spawn back onbuildChromeLaunchEnv(), CLI call withoutenv), and passes with the fix. The engine services suite passes (2215 tests), and so do the CLI launch tests.Refs #7623
🤖 Generated with Claude Code
— Rames Jusso