Fix macOS permissions and stale login agent #20

Merged
erik merged 2 commits from fix/task-4e2dc269-macos-login-permissions into main 2026-08-12 22:05:19 -05:00
Owner

Summary

Restore upgrade-safe macOS login launching so stale v0.1.3-v0.1.4 LaunchAgents no longer fail after upgrading and the signed app is consistently opened through Launch Services.

Task

Task: #task-4e2dc269

Changes

  • Add a signed native KvshareMacLauncher compatibility executable that opens the installed app through Launch Services.
  • Restore the stable launcher path in the supplied LaunchAgent.
  • Verify launcher presence, native format, signature, package payload, and launch configuration during release checks.
  • Bump the release version to 0.1.6 and document upgrade recovery.

Testing

  • Unit tests added/updated
  • Manual testing performed
  • make check
  • make pre-pr
  • Built an ad-hoc package and verified strict deep code signing.
  • Built a package with the persistent Apple Development identity and verified app/helper identifiers and team identity.
  • Full package installation and two-reboot permission persistence remain manual release gates because installer elevation is required.

Checklist

  • ./scripts/pre-pr.sh passes
  • Documentation updated (if needed)
  • No unrelated changes included
## Summary Restore upgrade-safe macOS login launching so stale v0.1.3-v0.1.4 LaunchAgents no longer fail after upgrading and the signed app is consistently opened through Launch Services. ## Task Task: #task-4e2dc269 ## Changes - Add a signed native `KvshareMacLauncher` compatibility executable that opens the installed app through Launch Services. - Restore the stable launcher path in the supplied LaunchAgent. - Verify launcher presence, native format, signature, package payload, and launch configuration during release checks. - Bump the release version to 0.1.6 and document upgrade recovery. ## Testing - [x] Unit tests added/updated - [x] Manual testing performed - `make check` - `make pre-pr` - Built an ad-hoc package and verified strict deep code signing. - Built a package with the persistent Apple Development identity and verified app/helper identifiers and team identity. - Full package installation and two-reboot permission persistence remain manual release gates because installer elevation is required. ## Checklist - [x] `./scripts/pre-pr.sh` passes - [x] Documentation updated (if needed) - [x] No unrelated changes included
fix: preserve macOS login compatibility
All checks were successful
CI / Rust build, lint, and test (pull_request) Successful in 1m17s
CI / Swift build, lint, and test (pull_request) Successful in 2m17s
7eda9ffbd4
Task: #task-4e2dc269
Author
Owner

PR review

Summary

The compatibility launcher, stable LaunchAgent path, signing validation, package assertions, version bump, and recovery documentation are aligned with the bug. CI passed for both Rust and Swift. The required installed-upgrade and reboot evidence is still missing, so the PR is not ready to merge.

Acceptance criteria

  • Met — Upgrades preserve the obsolete KvshareMacLauncher path by packaging a signed native compatibility executable that opens the current app through Launch Services.
  • Partial — Packaging verifies the launcher and signatures, but no clean reboot of the installed v0.1.6 package has demonstrated that the LaunchAgent avoids exit code 126.
  • Not evident — Local Network, Accessibility, and Input Monitoring authorization has not been verified across two reboot cycles.
  • Partial — Both ad-hoc and persistent-identity packages were built, but the signed v0.1.6 package has not been installed over the affected v0.1.5 setup.
  • Met — Release checks validate the launcher source, LaunchAgent path, native packaged helper, package payload, and strict code signature.
  • Met — docs/MACOS_APP.md documents recovery for affected v0.1.5 users.

Blocking issues

  1. Install the persistently signed v0.1.6 package over the affected v0.1.5 installation and verify the stale LaunchAgent starts kvshare without exit code 126.
  2. Reboot twice and verify Local Network, Accessibility, and Input Monitoring remain authorized and kvshare connects after each login.

Warnings

  • None.

Verdict

Changes requested — implementation and CI look sound, but three acceptance criteria remain partial or unverified until the real upgrade and reboot checks are recorded.

## PR review ### Summary The compatibility launcher, stable LaunchAgent path, signing validation, package assertions, version bump, and recovery documentation are aligned with the bug. CI passed for both Rust and Swift. The required installed-upgrade and reboot evidence is still missing, so the PR is not ready to merge. ### Acceptance criteria - **Met** — Upgrades preserve the obsolete `KvshareMacLauncher` path by packaging a signed native compatibility executable that opens the current app through Launch Services. - **Partial** — Packaging verifies the launcher and signatures, but no clean reboot of the installed v0.1.6 package has demonstrated that the LaunchAgent avoids exit code 126. - **Not evident** — Local Network, Accessibility, and Input Monitoring authorization has not been verified across two reboot cycles. - **Partial** — Both ad-hoc and persistent-identity packages were built, but the signed v0.1.6 package has not been installed over the affected v0.1.5 setup. - **Met** — Release checks validate the launcher source, LaunchAgent path, native packaged helper, package payload, and strict code signature. - **Met** — `docs/MACOS_APP.md` documents recovery for affected v0.1.5 users. ### Blocking issues 1. Install the persistently signed v0.1.6 package over the affected v0.1.5 installation and verify the stale LaunchAgent starts kvshare without exit code 126. 2. Reboot twice and verify Local Network, Accessibility, and Input Monitoring remain authorized and kvshare connects after each login. ### Warnings - None. ### Verdict **Changes requested** — implementation and CI look sound, but three acceptance criteria remain partial or unverified until the real upgrade and reboot checks are recorded.
fix: launch macOS app with application identity
All checks were successful
CI / Rust build, lint, and test (pull_request) Successful in 13s
CI / Swift build, lint, and test (pull_request) Successful in 14s
b0c3a4a998
Task: #task-4e2dc269
Author
Owner

Follow-up fix and live verification

The live failure exposed a second launch problem: executing Contents/MacOS/KvshareMac directly from launchd gave the process an osservice<com.caradoc.kvshare.mac> identity. The updated LaunchAgent now runs /usr/bin/open -W /Applications/KvshareMac.app, which produces the expected app<application.com.caradoc.kvshare.mac...> identity.

System Settings also contained three stale KvshareMac Local Network records. Cycling every matching entry changed the live Network.framework path from Local network prohibited to satisfied, established TCP to erik-dev:24800, and reported connection state ready without rebooting.

Added documentation for both recovery paths and a release check that requires the packaged LaunchAgent to use Launch Services. make pre-pr and persistent-identity package verification pass locally.

## Follow-up fix and live verification The live failure exposed a second launch problem: executing `Contents/MacOS/KvshareMac` directly from launchd gave the process an `osservice<com.caradoc.kvshare.mac>` identity. The updated LaunchAgent now runs `/usr/bin/open -W /Applications/KvshareMac.app`, which produces the expected `app<application.com.caradoc.kvshare.mac...>` identity. System Settings also contained three stale `KvshareMac` Local Network records. Cycling every matching entry changed the live Network.framework path from `Local network prohibited` to `satisfied`, established TCP to `erik-dev:24800`, and reported connection state `ready` without rebooting. Added documentation for both recovery paths and a release check that requires the packaged LaunchAgent to use Launch Services. `make pre-pr` and persistent-identity package verification pass locally.
Author
Owner

Installed upgrade verification

Installed the persistently signed v0.1.6 test package over the affected v0.1.5 installation.

Verified:

  • Installer receipt and app bundle report v0.1.6.
  • The installed app and compatibility launcher pass strict deep code-signature verification with team 3XP3VF6Y5V.
  • The existing user LaunchAgent starts /usr/bin/open -W /Applications/KvshareMac.app and remains running without exit code 126.
  • RunningBoard identifies the process as app<application.com.caradoc.kvshare.mac...>.
  • Existing Accessibility, Input Monitoring, and Local Network grants required no new prompts.
  • After Enable, the wired route to erik-dev:24800 became satisfied, TCP connected, and Network.framework reported ready.

The remaining acceptance evidence is two physical reboot cycles confirming login startup and privacy grants persist.

## Installed upgrade verification Installed the persistently signed v0.1.6 test package over the affected v0.1.5 installation. Verified: - Installer receipt and app bundle report v0.1.6. - The installed app and compatibility launcher pass strict deep code-signature verification with team `3XP3VF6Y5V`. - The existing user LaunchAgent starts `/usr/bin/open -W /Applications/KvshareMac.app` and remains running without exit code 126. - RunningBoard identifies the process as `app<application.com.caradoc.kvshare.mac...>`. - Existing Accessibility, Input Monitoring, and Local Network grants required no new prompts. - After Enable, the wired route to `erik-dev:24800` became `satisfied`, TCP connected, and Network.framework reported `ready`. The remaining acceptance evidence is two physical reboot cycles confirming login startup and privacy grants persist.
Author
Owner

PR review

Summary

The updated PR safely supports obsolete login configurations, launches the current app through Launch Services, validates the compatibility paths during packaging, and documents recovery. The signed v0.1.6 package was installed over the affected v0.1.5 setup and connected successfully. CI passed.

Acceptance criteria

  • Met — The signed KvshareMacLauncher compatibility executable preserves copied v0.1.3-v0.1.4 LaunchAgent paths, while the current LaunchAgent opens the app through Launch Services.
  • Met — The persistently signed v0.1.6 package was installed over the affected v0.1.5 installation; the job had no exit code 126 and the app connected to erik-dev:24800.
  • Met — Release checks require the compatibility launcher, native executable format, strict signature, package payload entry, and Launch Services-based current LaunchAgent.
  • Met — docs/MACOS_APP.md documents v0.1.5 recovery, application-identity verification, and duplicate Local Network record recovery.

Blocking issues

  • None.

Warnings

  • None. Physical reboot verification was explicitly waived by the task owner and removed from the acceptance criteria.

Verdict

Approved — all current acceptance criteria have direct implementation and verification evidence.

## PR review ### Summary The updated PR safely supports obsolete login configurations, launches the current app through Launch Services, validates the compatibility paths during packaging, and documents recovery. The signed v0.1.6 package was installed over the affected v0.1.5 setup and connected successfully. CI passed. ### Acceptance criteria - **Met** — The signed `KvshareMacLauncher` compatibility executable preserves copied v0.1.3-v0.1.4 LaunchAgent paths, while the current LaunchAgent opens the app through Launch Services. - **Met** — The persistently signed v0.1.6 package was installed over the affected v0.1.5 installation; the job had no exit code 126 and the app connected to `erik-dev:24800`. - **Met** — Release checks require the compatibility launcher, native executable format, strict signature, package payload entry, and Launch Services-based current LaunchAgent. - **Met** — `docs/MACOS_APP.md` documents v0.1.5 recovery, application-identity verification, and duplicate Local Network record recovery. ### Blocking issues - None. ### Warnings - None. Physical reboot verification was explicitly waived by the task owner and removed from the acceptance criteria. ### Verdict **Approved** — all current acceptance criteria have direct implementation and verification evidence.
erik merged commit a4422c0fa1 into main 2026-08-12 22:05:19 -05:00
erik deleted branch fix/task-4e2dc269-macos-login-permissions 2026-08-12 22:05:19 -05:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
erik/kvshare!20
No description provided.