Repository navigation
Ship the macOS release as a verified DMG containing only wimsy.app - #4
Merged
Merged
Conversation
The macOS release asset was a tarball of the entire Xcode build/macos/Build/Products/Release directory: ~1.3 GB unpacked (396 MB compressed) of .o files, .swiftmodule directories, SwiftPM resource bundles, duplicate frameworks and ~860 MB of dSYMs, with wimsy.app buried inside. Add tool/package_macos_dmg.sh, which stages only the app bundle (copied with ditto to preserve framework symlinks, permissions and the code signature) alongside an /Applications symlink for drag-to-install, builds a compressed UDZO DMG, and runs hdiutil verify on it. CI now runs this script and uploads/publishes wimsy-macos.dmg instead of wimsy-macos.tar.gz. The script deliberately does no signing: once Developer ID signing is added, the app is signed before this step and the DMG is notarized/stapled after it, with no change needed here. dSYMs are no longer shipped to users. Testing: - Ran the script against the v0.0.6 release wimsy.app: produced a 60 MB DMG (vs the 396 MB tarball) that passes hdiutil verify; mounted, it contains only wimsy.app and the Applications symlink; codesign --verify --deep --strict passes on the app inside and all 18 framework symlinks are intact. - Script exits 1 with a clear error when the app bundle is missing. - A local `flutter build macos --release` could not be used for an end-to-end check: Xcode refuses to build the Runner target because its keychain-access-groups entitlement requires a development certificate. That is a separate, pre-existing issue. - flutter analyze: no issues. flutter test: all 1044 passed. vendor/xmpp_stone dart test: all 190 passed. - Maestro flows not run: no Android emulator available, and this change touches only CI packaging, not the app. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add tool/verify_macos_dmg.sh and run it in the build-macos job between packaging and upload. It mounts the DMG read-only at a private mount point (always detached on exit) and checks that: - the image passes hdiutil verify and mounts; - the volume contains exactly wimsy.app and an Applications symlink pointing at /Applications; - wimsy.app passes codesign --verify --deep --strict; - the main executable is universal (x86_64 and arm64); - CFBundleShortVersionString equals the expected version, when one is given. All failures are reported before exiting non-zero. CI passes the expected version only for v* tag builds. Flutter strips every non-digit/non-dot character from the build name on Apple platforms, so a pre-release version such as 0.0.6-pre-1197ec9 becomes 0.0.611979 in the bundle and cannot be compared. These checks pass for the current ad-hoc signed build and remain valid once Developer ID signing is added. Checks specific to that signing (authority, hardened runtime, spctl, stapler) are left for the change that introduces it. Testing: - Against the DMG built from the v0.0.6 wimsy.app: passes with no expected version and with 0.0.6. - Negative cases, each exits 1 with a specific FAIL line: expected version 0.0.7; a tampered App.framework inside the app (codesign failure); an extra file on the volume plus an arm64-only app (both reported); a truncated DMG (verify and mount failures, remaining checks skipped); a missing DMG path. - No images left mounted after any case. - shellcheck clean on both tool/*.sh scripts; workflow YAML parses with the new step between "Package macOS" and "Upload macOS artifact". - flutter analyze: no issues. flutter test: all 1044 passed. vendor/xmpp_stone dart test: all 190 passed. - Maestro flows not run: no Android emulator available, and this change touches only CI packaging, not the app. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 19, 2026
Merged
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.
Problem
The v0.0.6
wimsy-macos.tar.gzis a tarball of the wholebuild/macos/Build/Products/Releasedirectory. Unpacked it's about 1.3 GB (396 MB compressed). It's mostly.ofiles,.swiftmoduledirectories, SwiftPM resource bundles, duplicate copies of the frameworks and about 860 MB of dSYMs.wimsy.appis buried in the middle of all that.Changes
Package as a DMG (
tool/package_macos_dmg.sh, 1197ec9)wimsy.app, usingdittoso framework symlinks, permissions and the code signature survive. It sits next to anApplicationssymlink so users can drag to install.hdiutil verifyon it.wimsy-macos.dmgin place ofwimsy-macos.tar.gz. dSYMs are no longer shipped.Verify the DMG in CI (
tool/verify_macos_dmg.sh, d217e1d)A new step runs between packaging and upload. It mounts the DMG read-only and checks that:
wimsy.appplus theApplications→/Applicationssymlinkcodesign --verify --deep --strictpassesv*tag builds only,CFBundleShortVersionStringmatches the tagThe script reports every failure before exiting with an error.
Designed to work with Developer ID signing later
Neither script signs anything, and nothing here would need undoing when signing is added. The app gets signed before packaging, and the DMG gets notarized and stapled after it. The checks above stay valid for a signed build. The signing-specific checks (Developer ID authority, hardened runtime,
spctl,stapler) should be added in the same change that adds the signing.Testing
wimsy.appand mounted the result. It contains only the app and theApplicationssymlink, the signature verifies, and all 18 framework symlinks are intact.0.0.6.FAILline:shellcheckreports nothing on both scripts, and the workflow YAML parses.build-macos, the packagedwimsy-macos.dmgartifact is 56 MB, and the verify step printed:0.0.02171there is a live example of the version mangling described in follow-up 3.flutter analyzeis clean andflutter test/vendor/xmpp_stonedart testpass. This PR doesn't touch the app.Not fixed here (follow-ups)
NSPOSIXErrorDomain Code=163 "Launchd job spawn failed". The cause is thekeychain-access-groupsentitlement inmacos/Runner/Release.entitlements. macOS restricts that entitlement, and the ad-hoc build has no team or provisioning profile to back it. I confirmed this by re-signing the same app without it, after which it launches. The same entitlement makes localflutter build macos --releasefail with "Runner" has entitlements that require signing with a development certificate. Developer ID signing with a matching provisioning profile would fix both.get-task-allow. Fixing this needs Developer ID signing and notarization, which needs the repo owner's Apple Developer credentials.0.0.6-pre-<sha>therefore becomes something like0.0.611979in the bundle. That's why the version check only runs on tag builds. A tag likev1.0.0-rc1would hit the same mangling, and the check would fail on it.🤖 Generated with Claude Code