Conversation
…design PR #698 unconditionally passed --config.electronDist pointing at the electron package's dist directory inside the pnpm store. On the macOS arm64 nightly runner, electron-builder copies Electron.app from that path into the release output, but the framework version symlinks (Electron Framework.framework/Versions/Current → A, etc.) do not survive the copy out of the pnpm content-addressable store. The resulting framework bundle has both top-level files and a Versions/ directory, which causes codesign to fail with: Electron Framework: bundle format is ambiguous (could be app or framework) The 04-07 nightly run (24058395128) hit this and codesign hung for ~6 minutes before exiting. The 04-06 run (pre-#698) succeeded. Restore the previous behavior: only forward --config.electronDist to electron-builder when NEXU_DESKTOP_ELECTRON_DIST_PATH is explicitly set (the e2e coverage tooling use case). Otherwise let electron-builder resolve electron via its default pnpm-aware path, which preserves framework symlinks correctly.
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
mrcfps
approved these changes
Apr 7, 2026
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.
What
Stop unconditionally passing
--config.electronDistto electron-builder. Only forward it whenNEXU_DESKTOP_ELECTRON_DIST_PATHis explicitly set.Why
The 04-07 Desktop Nightly run (24058395128) failed during codesign on macOS arm64:
codesignhung for ~6 minutes before exiting. The 04-06 nightly succeeded, and the only desktop-build-related change between the two was #698, which added:where
electronDistPathwas resolved viarequire.resolve("electron/package.json")— i.e. it pointed directly into the pnpm content-addressable store atnode_modules/.pnpm/electron@37.10.3/node_modules/electron/dist.When electron-builder copies
Electron.appout of that path, the framework versioning symlinks (Electron Framework.framework/Versions/Current → A, top-levelElectron Framework → Versions/Current/Electron Framework, etc.) do not survive the copy out of the pnpm store. The resulting framework bundle ends up with both top-level files and aVersions/directory present, which is exactly the layout that makescodesignreportbundle format is ambiguous.Letting electron-builder resolve electron via its default pnpm-aware path (the pre-#698 behavior) preserves framework symlinks correctly, which is why every nightly before 04-07 was green.
How
resolveElectronDistPath()now returnsnullunlessNEXU_DESKTOP_ELECTRON_DIST_PATHis set, and validates the override path when present.--config.electronDist=...is only appended to the electron-builder argv when the helper returns a non-null value.Affected areas
Checklist
pnpm typecheckpasses — N/A (build script, not in tsc graph)pnpm lintpasses — not run locally (worktree without node_modules); change is a 14-line edit to a build script and follows existing patternspnpm testpasses — N/Apnpm generate-typesrun (if API routes/schemas changed) — N/Aanytypes introducedNotes for reviewers
dist:macmanually) and confirm the macOS arm64 codesign step completes successfully.NEXU_DESKTOP_ELECTRON_DIST_PATHexplicitly. Worth a quick grep in the e2e workflow to confirm whether anything depended on the implicit auto-resolution behavior introduced in chore: add desktop e2e coverage collection and reporting #698.