Skip to content

Fix macOS DMG bundle signing - #9

Merged
hrhrng merged 1 commit into
mainfrom
agent/fix-macos-dmg-signature
Aug 16, 2026
Merged

Fix macOS DMG bundle signing#9
hrhrng merged 1 commit into
mainfrom
agent/fix-macos-dmg-signature

Conversation

@hrhrng

@hrhrng hrhrng commented Aug 16, 2026

Copy link
Copy Markdown
Member

What changed

  • opt macOS packaging into complete ad-hoc bundle signing (identity: "-")
  • disable hardened runtime for the ad-hoc distribution so Electron frameworks can load normally
  • verify the mounted app bundle with strict codesign checks before uploading any workflow artifact or GitHub Release asset
  • run the packaged first-prompt smoke before publication and target the cold new-chat composer correctly

Root cause

The published DMG itself had a valid checksum, but the app inside was not a valid signed bundle. Electron Mach-O files retained linker-generated ad-hoc signatures while the app had no _CodeSignature/CodeResources resource seal. codesign --verify --deep --strict failed with code has no resources but signature indicates they must be present, which macOS surfaces as a damaged app.

Impact

New DMGs contain a structurally valid ad-hoc signed app instead of a malformed partially signed bundle. This removes the damaged-package failure without requiring an Apple Developer certificate. The build remains unnotarized, so macOS may still show the normal unidentified-developer warning.

Validation

  • reproduced the failure against the exact v0.0.3 Release asset; GitHub SHA-256 and hdiutil verify both confirmed the DMG transport was intact
  • built a new arm64 DMG and verified its checksum
  • mounted the final DMG and passed codesign --verify --deep --strict --verbose=4
  • passed packaged runtime import verification
  • launched directly from the mounted DMG and passed the packaged first-prompt smoke
  • pnpm run typecheck
  • pnpm run test:ci (148 tests)
  • node --test scripts/*.test.mjs (26 tests)

@hrhrng
hrhrng marked this pull request as ready for review August 16, 2026 11:15
@hrhrng
hrhrng merged commit 691818e into main Aug 16, 2026
3 of 5 checks passed
@hrhrng
hrhrng deleted the agent/fix-macos-dmg-signature branch August 16, 2026 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant