Skip to content

fix(desktop): wait for the NSIS uninstaller copy in the Windows smoke test - #441

Merged
Brooooooklyn merged 1 commit into
mainfrom
fix/desktop-nsis-silent-uninstall
Nov 29, 2026
Merged

Brooooooklyn merged 1 commit into
mainfrom
fix/desktop-nsis-silent-uninstall

Conversation

@Brooooooklyn

@Brooooooklyn Brooooooklyn commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The desktop dry run from main (46233085390) failed in "Smoke-test silent NSIS install and uninstall" with Uninstall.exe was not self-removed after silent uninstall. The installer came with #432, and no CI run reached this step before.

The uninstaller works. The smoke test stopped waiting too early:

Uninstall.exe /S  (launcher)
  ├─ copies itself to %TEMP%\~nsuN.tmp\Un.exe
  ├─ starts "Un.exe /S _?=<dir>"
  └─ exits 0 at once            <- the old test watched only this, for 60 s
Un.exe                          <- does the real uninstall (~8,400 manifest entries)
  └─ removes files, ARP key, shortcuts, Uninstall.exe   (~75-80 s at CI speed)
  • Smoke test: it waits for the launcher, then finds its _?= child by ParentProcessId. It waits up to 10 minutes for the child and fails on a non-zero exit code, with a list of the files left. All the old file and registry checks still run after that.
  • Uninstaller: it exits 1 when Uninstall.exe is still there after the final Delete. Before, a locked Uninstall.exe left the copy exiting 0, so the failure was silent.

Verification

I ran the exact step script on a real Windows 11 ARM64 machine, over SSH (non-interactive, like the runner). The payload was the v0.0.24 app (7,618 files, 1.86 GB, signatures stripped). A CPU cap made the install as slow as on CI (~140 s against ~135 s).

Generator + smoke Condition Result
main + main CI-speed cap FAIL with the CI error (step 212 s, CI 196 s); Un.exe still running, finished ~78 s after start
main + fixed CI-speed cap PASS, uninstall 74 s
fixed + fixed CI-speed cap PASS, uninstall 78 s
fixed + fixed real speed PASS, uninstall 22 s
main + fixed Uninstall.exe held open the copy exits 0 and the file stays (silent success)
fixed + fixed Uninstall.exe held open FAIL, Silent NSIS uninstall failed with exit code 1, files listed
  • I ruled out a MessageBox in silent mode: every box sits under ${IfNot} ${Silent}.
  • vp test packages/desktop/__test__/windows-nsis.test.ts: 14 passed. The new tests fail when their part of the fix is reverted.
  • yarn typecheck, lint and vp fmt --check pass on the touched files.
  • CI cannot run the Windows job from this branch, because the desktop-release environment allows only main and v* tags. A dry run from main after the merge is the real check.

Review decisions (no change)

  • The test can miss an Un.exe that exits before the first process query. It cannot in practice. Un.exe deletes about 8,400 manifest entries, which took 13-22 s at full speed and 75-80 s at CI speed on the test machine. The process query runs less than 1 s after the launcher exits. A Win32_ProcessStopTrace subscription needs admin rights and makes the test more complex, for a window that does not occur.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: cae22476-b1b2-49a2-825a-943b9a5194c2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-29T08:34:19.753018Z 929c677 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

… test

The smoke test ran `Uninstall.exe /S` and gave the uninstall a fixed 60 s.
That launcher only copies itself to %TEMP%, starts the copy with
`_?=<dir>` and exits 0 at once; the copy does the real work. On a runner
as slow as windows-11-arm (install about 135 s), the copy needs about
75-80 s, so the test failed with "Uninstall.exe was not self-removed"
while the uninstall was still running and later finished cleanly.

- Smoke test: wait for the launcher, find its ` _?=` child by
  ParentProcessId, wait up to 10 min for it, and fail on its exit code
  (listing leftover files) before the existing file/registry checks.
- Uninstaller: exit 1 when Uninstall.exe is still there after the final
  Delete. Before, a locked Uninstall.exe left the copy exiting 0.
- Tests pin the exit-1 block, the silent-mode MessageBox guards, the
  child wait in the workflow.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Brooooooklyn
Brooooooklyn force-pushed the fix/desktop-nsis-silent-uninstall branch from 929c677 to 2094707 Compare November 29, 2026 08:44
@Brooooooklyn
Brooooooklyn merged commit 07995ed into main Nov 29, 2026
21 checks passed
@Brooooooklyn
Brooooooklyn deleted the fix/desktop-nsis-silent-uninstall branch November 29, 2026 09:16
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.

1 participant