Repository navigation
test(desktop-windows): verify packaged Sentry dependencies - #10823
tianmind-studio wants to merge 2 commits into
Conversation
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 |
aryanorastar
left a comment
There was a problem hiding this comment.
Community review (COMMENT — Windows packaging):
Declaring [email protected] as a direct Windows desktop runtime dep and probing the packaged Electron binary (verify-packaged-main-runtime.mjs resolving ms via app.asar) is exactly the right fix for #10738 (transitive prune → main-process crash). Wiring the probe into both unsigned build:win / build:unpack and the Azure-signed release path (plus FC-runtime-image-boundary) is strong fail-closed release hygiene.
Please keep explicit:
- Signed release path cannot publish an installer if the probe fails (exit non-zero before publish).
- Probe asserts the real packaged module graph (not just
node_moduleson the builder). - Lockfile/
pnpm-lockstays in sync with the directmspin.
Not requesting changes — looks merge-shaped once required Windows checks stay green on tip.
|
Checked this against current
Happy to rebase this onto current |
0fd38ce to
718cd8b
Compare
|
Rebased this onto current main and narrowed it in light of #10875: the direct ms pin is gone, while the final-artifact probe now derives the packaged manifest main, resolves from @sentry/electron/main, and is wired into Windows-only package and release paths. I rebuilt win-unpacked without the direct dependency and the real probe passed; 14 focused tests, both typechecks, actionlint, and all 20 local preflight checks also pass. |
|
Follow-up review after the rebase onto current main — this revision is materially stronger than the earlier round, and it resolves both the #10875 builder upgrade and the asks from the earlier community review. What I verified on 718cd8b:
Minor nits, non-blocking:
Label housekeeping: the current diff no longer touches dependencies or lockfiles, so I removed dependency-review; workflow-review stays because the CI and signed-release workflow changes still need maintainer sign-off. Positive signal — not a formal approval. The remaining gate is the release-lane change itself (the probe now runs inside the Azure Trusted Signing build), which needs a human maintainer's sign-off before merge. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
Include desktop/windows paths in the runtime-image advisory scope so future packaged-module regressions surface this existing class during PR preparation.
718cd8b to
8e2cefc
Compare
|
Applied the scope-hint follow-up in 8e2cefc: FC-runtime-image-boundary now includes desktop/windows/**, so future packaged-runtime changes surface this class during PR preparation. I left �vidence_prs unchanged because the registry defines those as merged PR evidence; #10823 can be recorded after it lands. The branch is rebased onto current main, and all 20 selected local preflight checks pass. |
|
Follow-up on 8e2cefc after the rebase onto current main — this resolves the scope-hint nit from the earlier automated review, and the remaining gates are unchanged. What I verified on this head:
Label state stays as-is: The human gate before merge is the same one as before: the packaged-runtime probe now runs inside the Azure Trusted Signing release build, and that release-lane change deserves a maintainer's direct sign-off rather than automation's. by AI on behalf of David. Before merge, a human maintainer should sign off on the release-lane change: the packaged-runtime probe running inside the Azure Trusted Signing build in |
kodjima33
left a comment
There was a problem hiding this comment.
Useful regression guard + cleanup for the already-fixed (#10875) Windows Sentry/ms packaging crash. Doesn't clear the desktop bug-fix fast-lane bar (title isn't fix(windows), diff >200 lines) — approving, leaving merge to a maintainer.
* fix(preflight): decode gh metadata as UTF-8 Decode captured gh PR JSON with the producer's UTF-8 encoding instead of the Windows host code page. Add a Unicode metadata contract and register the recurring subprocess locale failure class with #10595 and #10844 as evidence. Tests: MetadataTests passed 14/14; the real #10823 body loaded under preferred_encoding=cp936; Ruff, Black, py_compile, and diff checks passed. Failure-Class: new * fix(preflight): propagate UTF-8 through Windows runner * fix(preflight): pin suggestion subprocess UTF-8 * test(preflight): pin nested subprocess UTF-8 * fix(preflight): emit direct Windows output as UTF-8 --------- Co-authored-by: 491034170 <[email protected]>
aryanorastar
left a comment
There was a problem hiding this comment.
Verified on 8e2cefc.
verify-packaged-main-runtime.mjs loads the packaged main from dist/win-unpacked so a missing hoisted ms (Sentry/debug) fails CI before the installer hits the update feed. Tests pin the script and the workflow step order.
This touches .github/workflows/** (CODEOWNERS @Git-on-my-level). My approve is not a fake David CODEOWNERS review. I am not merging.
|
The packaged-runtime probe is a complementary guard, and — Astar, on behalf of @aryanorastar |
|
Friendly ping: this packaged Sentry runtime probe still has |
|
Hey @tianmind-studio 👋 Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request. After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:
Before your next PR, please skim:
If this was declined for direction or taste, maintainers should cite an invariant ID or open a proposed one — ask if that citation is missing. Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out. Thank you for being part of the Omi community! |
What changed and why
Adds a final-artifact guard for the Windows startup failure reported in #10738. The probe runs with the packaged Electron binary, reads the declared
mainentry fromapp.asar/package.json, verifies that entry exists, resolves the packaged@sentry/electron/mainentry, and loads Sentry'sdebug -> msdependency chain with Electron's ASAR-aware loader.The original crash was produced by electron-builder 26.8.1 pruning
ms; #10875 upgraded the builder and currentmainpackages the transitive dependency correctly. This revision therefore removes the no-longer-needed directmsdependency and keeps the durable guard that would have blocked the broken artifact.Both unsigned and Azure-signed release paths run the probe before artifact publication. Windows CI now uses an explicit
build:win:unpackcommand, while the platform-neutralbuild:unpackremains usable on macOS and Linux. Changes to the Windows release workflow also trigger Desktop Windows CI so the signed-path contract cannot drift untested.Product invariants affected
none
How it was verified
dist/win-unpackedon Windows with electron-builder 26.15.3 after removing the directmsdependency.@sentry/electron/main,debug, andmssuccessfully.node node_modules/vitest/vitest.mjs run scripts/verify-packaged-main-runtime.test.mjs scripts/build-scripts-publish.test.mjs- 14 passed.actionlint .github/workflows/desktop-windows-ci.yml .github/workflows/desktop_windows_release.ymlpassed.main.Tests
The runtime-probe tests cover the successful packaged chain, rejection of lookalike executables, the original missing-
msfailure, absent/malformed/incomplete success output, and secret-environment filtering. The package-script tests prove the Windows unpacked build, unsigned installer, and signed release workflow all run the probe after electron-builder.Failure class (prevents recurrence)
Failure-Class: FC-runtime-image-boundary
New guards
desktop/windows/scripts/verify-packaged-main-runtime.mjsis a final-artifact check rather than a source-only check: it requires the completedwin-unpackedtree and uses the shipped Electron binary to traverse the packaged ASAR module graph.