Repository navigation
fix(desktop): sign release builds without exhausting file descriptors - #7
Merged
Merged
Conversation
@electron/osx-sign walks the app bundle with an unbounded Promise.all and opens every file at once to find binaries. The bundled agent service ships 60k+ files, so signing on the macOS release runner failed with EMFILE. Patch the walk to visit entries one at a time; it returns the same signing list and passes under a 256-descriptor hard limit. The service pack's partial `pnpm deploy` does not install osx-sign, so it allows unused workspace patches for that one deploy.
Jirentian
pushed a commit
to Jirentian/Atd
that referenced
this pull request
Nov 8, 2026
All twenty clips are re-rendered from atd-films ccd1f85 (PR JUNERDD#7), each in a single browser tab. Frames shared among parallel tabs drew glass and scaled layers half a pixel apart, so the selection toolbar's "Polish writing" label and the Mini Panel at the screen edge flickered every two or three frames. The clips' content is otherwise unchanged.
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.
Why
The first manual Release run (36374409286) failed in the arm64 installer job while signing:
@electron/osx-sign(1.3.3, pinned by electron-builder 26.15.3; still unchanged in 2.7.0) walksContents/with an unboundedPromise.all, opening every file at once to detect binaries. The app now holds ~60.7k files (mostly the bundled service'snode_modules); locally the walk needs a descriptor limit between 24,576 and 49,152, which the macOS runner doesn't allow. CI's smoke pack never signs, so this only surfaced at release time. Any signing run (ad-hoc or Developer ID) hits it.Change
patches/@[email protected]: the walk visits entries one at a time. The signing list is identical (1,007 paths, same order); the walk takes ~16s instead of ~4s.prepare-service-pack.mjs: the service pack's partialpnpm deploydoes not install osx-sign, so that one deploy allows unused workspace patches (pnpm_config_allow_unused_patches; pnpm 12 ignores thenpm_config_spelling). The workspace-wide unused-patch check is unchanged.Verification
ulimit -n 256(hard) +pnpm --filter @ai/desktop package:installer -c.mac.identity=- -c.mac.hardenedRuntime=falseon arm64: dmg, zip, blockmaps andlatest-mac.ymlproduced;codesign --verify --deep --strictpasses.pnpm install --frozen-lockfile, oxfmt and oxlint on the changed files.After merge, re-run the Release workflow on
mainto publish v0.1.0.