Home

mweinbach / agent-coworker

publicmweinbach/agent-coworker
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

perf(desktop): shrink notarization upload and staple ticket after notarize

4 months ago

17c4958
Authored
mweinbach6/1/2026, 5:52:11 PM
Exclude *.map, *.map.json, *.tsbuildinfo, and .DS_Store from the
electron-builder bundle (files + extraResources filter). The stale
index.js.map (53 MB) in resources/binaries/ was the single largest
waste — removing it cuts the .app upload to Apple's notary service by
~50 MB.

Add a post-build prune step in build_desktop_resources.ts that removes
stale sourcemaps, tsbuildinfo, and .DS_Store from the binaries
directory so they never reach the bundle.

Add xcrun stapler staple after notarization succeeds, so the
notarization ticket is embedded in the .app for offline Gatekeeper
validation. Previously the CI step xcrun stapler validate would fail
without this. The staple helper is DI-friendly for testing.

Parent1c3b7b2

5 files changed
  • apps/desktop/electron-builder.yml+10−0
  • apps/desktop/scripts/notarize.cjs+32−6
  • apps/desktop/test/notarize.test.ts+35−1
  • scripts/build_desktop_resources.ts+39−0
  • test/build-desktop-resources.test.ts+41−0