Repository navigation
fix(macos): run the service from its own helper app so it is never the Driga app - #85
Merged
Merged
Conversation
…e Driga app Package drigad in a nested background-only app with the run.driga.service identity, matching release metadata, and Driga branding. Sign the helper before the GUI bundle and validate both bundles in release archives. Migrate launchd from the old same-bundle executable during service install, GUI startup, and Homebrew upgrades. Preserve the installed service environment during cask migration so custom data and configuration paths keep working. Activate the main app on notification clicks and deliver the target through the private stdin hand-off. Keep the GUI independent of the notification callback deadline and query notification permission under the helper identity. Document the new permission prompt and the manual Launch Services host check. Validate with native, Linux, and Windows go vet; the requested package tests in local time and UTC; helper, migration, signing, and notification regressions; and Python compilation and shell syntax checks. No real notarization was run. Claude-Session: https://claude.ai/code/session_01T2vtcW6ihn1ywy9vxUq9a4
Windows file systems have no execute permission bits, so the helper plist test failed on the Windows CI job at the st_mode assertion.
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 changed
The Driga service now runs from its own helper app inside the bundle:
Driga.app/Contents/Helpers/Driga Service.app, with bundle IDrun.driga.serviceandLSBackgroundOnly. It is no longer a second executable carrying the main app's identity. The launch agent,driga service install, upgrades, the build and signing scripts, release verification and GoReleaser are updated. Notifications are posted under the helper's identity, and clicking one opens the main app on its target.Why
The service ran as
Driga.app/Contents/MacOS/drigadwith the app's bundle IDrun.driga, so Launch Services treated it as the running Driga app. Spotlight, Finder andopen -a Drigabrought the windowless service forward instead of starting the app. An AppleEventquittorun.drigaquit the service. #82 set a prohibited activation policy, which held on first install but not after launchd restarted the service:lsappinforeportedtype="Foreground"again, and Spotlight opened no window. A nested helper with its own identity is the standard macOS pattern and removes the ambiguity.Risk and rollout
driga service installand the app's upgrade rewrite the launch agent to the helper path, and the oldContents/MacOS/drigadis no longer shipped or run.verify-macos-app.pyandverify-release-dist.shcheck the helper's identity, plist keys and signature order. No notarization ran locally; the release workflow exercises it.Contract changes
Contents/MacOS/drigadis replaced byContents/Helpers/Driga Service.app/Contents/MacOS/drigad(bundle IDrun.driga.service). Anything that references the old path, such as custom launchd setups, must move.Verified
drigadwith a temporary data dir.lsappinfoshowsbundleID="run.driga.service"andtype="BackgroundOnly", and System Events shows background onlytrue, visiblefalse. Notifications start with "native, not asked yet".LSBackgroundOnlybundle already has, which disabled notifications. The check now reads the resultingactivationPolicy.go testpasses for attention, service, scripts, self and cmd/driga.go test ./...fails onlyTestPermissionHookBuiltBinary(pre-existing on this Mac, fixed by fix(chat): register permission prompts before slow broker work #84 and the cleanup issue) and oneTestCommandSandboxIntegration"scope changed" under full-suite load; this PR doesn't touchinternal/command, and the test passes on rerun.GOOS=linux go build,GOOS=windows go vet.open -aagainst an installed signed build. Both need the release pipeline and an install.https://claude.ai/code/session_01T2vtcW6ihn1ywy9vxUq9a4