fix(desktop-windows): package Sentry's ms dependency - #10823
fix(desktop-windows): package Sentry's ms dependency#10823tianmind-studio wants to merge 1 commit into
Conversation
f539aa9 to
f2b07ab
Compare
Failure-Class: FC-runtime-image-boundary Verification: pnpm build:unpack; pnpm test; pnpm run lint; targeted Vitest, ESLint, Prettier, and actionlint checks.
f2b07ab to
0fd38ce
Compare
|
Thanks for the focused Windows packaging fix — this is a good direction. I reviewed the diff and ran the two focused desktop Windows tests in an isolated environment after installing dependencies with lifecycle scripts disabled:
The direct Because this touches dependency metadata and the Windows release workflow/signing path, I’m leaving this as a positive maintainer signal rather than a formal approval. A human maintainer should still review the release-path implications before merge, but I did not find a blocking code issue in the changes I inspected. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
What changed and why
Fixes #10738 by declaring
ms@2.1.3as a direct Windows desktop runtime dependency. The packaged Sentry/debug chain reachedms, but electron-builder pruned it because it was only transitive, so the shipped app crashed before its main process could start.This also adds a final-artifact probe that loads
debugfromapp.asar/out/main/index.jswith the packaged Electron binary and resolvesms. Both unsigned package scripts and the Azure-signed release path run the probe before an installer can be published.Product invariants affected
none
How it was verified
Cannot find module 'ms'; the require stack ran throughapp.asar/node_modules/debug/src/common.jsandapp.asar/out/main/index.js.corepack pnpm@10 run build:unpackrebuilt the current branch and completed the new packaged-main probe successfully.node_modules/ms/index.js,license.md, andpackage.json.omi-windows.exestayed alive for 12 seconds with an isolated user-data directory, initialized its renderer server, SQLite store, MCP and relay pipes, foreground monitor, and meeting monitor, and emitted no missing-mserror.corepack pnpm@10 testpassed the full Windows desktop suite.corepack pnpm@10 run lintcompleted with 0 errors (735 existing repository warnings); focused ESLint and Prettier checks for the changed JavaScript files passed cleanly.actionlint .github/workflows/desktop_windows_release.ymlpassed.check-manifest-contracttests. The one excluded repository test is an existing Windows path-representation mismatch (/tmp/...from Git Bash versusC:\...\Temp\...in Python); the unmodified full check remains enabled in Linux CI.Tests
scripts/verify-packaged-main-runtime.test.mjscovers the successful packaged loader path, the original missing-msfailure, a missing success marker, rejection of lookalike executables, and secret-environment filtering.scripts/build-scripts-publish.test.mjsnow proves that both unsigned and Azure-signed Windows release paths run the packaged-main probe after electron-builder.Failure class (fixes)
Failure-Class: FC-runtime-image-boundary
New guards (only when adding a check or ratchet)
The final-artifact probe would have caught incident #10738 before its installer was published. It is not a shared source-only primitive because it requires a completed Windows electron-builder artifact and its packaged Electron binary; it is therefore attached to every existing Windows package and release path.