Repository navigation
fix(main): forward desktop smoke mode to the sandboxed renderer - #249
Merged
Merged
Conversation
- The renderer starts the smoke harness only when its preload reports smoke mode, but a packaged sandboxed renderer sees neither the launcher environment nor main's argv, so the release smoke never started and timed out. - Main now passes the smoke flag to the renderer through additionalArguments whenever it is itself in smoke mode; ordinary windows get no extra argument. - Verified with a locally packaged app: the packaged smoke now completes all cases instead of hanging. Changelog: none
- Only desktopSmokeRendererArguments needs to leave the module; knip flagged the extra export. Changelog: none
- Share the smoke flag between main and the preload so the forwarded argument and the preload check cannot drift apart. - Assert that the main window passes the forwarded arguments and that the preload reads the shared flag, so dropping the wiring fails the unit suite instead of the release smoke. Changelog: none
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
The v1.6.0 Release run failed in Build macOS → Packaged desktop smoke: the packaged app launched, but the smoke never wrote even its bootstrap artifact and timed out after 6 minutes.
Root cause: since Oct 1 the renderer starts the smoke harness only when
window.lingua.desktopSmoke.enabledis true. The preload computes that from its ownprocess.env/process.argv, and a packaged sandboxed renderer sees neither the launcher environment nor main's argv. Probed over CDP on a locally packaged build:bridge: true, enabled: falsewhile main had both the env var and the flag. The dev-server smoke was unaffected, and the packaged smoke does not run in PR CI, so this surfaced only at release time.Fix: main, which reliably sees smoke mode, forwards
--lingua-desktop-smoketo the renderer viawebPreferences.additionalArgumentsonly when it is itself in smoke mode. Ordinary windows get no extra argument, so the session-recovery behavior the Oct 1 change protected is unchanged.Validation
pnpm run package:desktop+pnpm run smoke:desktop:packagedlocally: before, timed out with no summary; after,Cases: 3, failures: 0.pnpm run smoke:desktop:offline(dev build): 11 cases, 0 failures.tests/ipc/desktopSmoke.test.ts,tsc --noEmit,lintgreen.Follow-up
Run the packaged smoke in PR CI (at least on macOS) so a renderer-gate regression cannot reach the release job again.
Review follow-up (1782cf1)