Repository navigation
fix(mac): retry stale helper registration after launch repair - #201
Noah-Tervalon-Nvidia merged 7 commits into
Conversation
Signed-off-by: Myles Shannon <github@mylesshannon.com>
Signed-off-by: Myles Shannon <github@mylesshannon.com>
…tale-registration Signed-off-by: Myles Shannon <github@mylesshannon.com>
Signed-off-by: Myles Shannon <github@mylesshannon.com>
Signed-off-by: Myles Shannon <github@mylesshannon.com>
Signed-off-by: Myles Shannon <github@mylesshannon.com>
|
One more thing - I tried this with the signed build - when I just uninstalled my other copy and then installed this one I was left with the old helper because we never ran an upgrade flow or a first install flow. This is very niche, but possible. When I reset all app data and it ran through the setup flow again it had fixed this. You can choose to fix this or not, but might be combo of very difficult to detect and also not worth it. |
Signed-off-by: Myles Shannon <github@mylesshannon.com>
Done. Thanks for the feedback! |
Changelog title
Recover stale macOS helper registrations after upgrades
Changelog body
Bumps
Summary
Follow-up to #192, related to #175. Depends on #192. This branch includes its two commits and merges the latest
develop; the new recovery change is isolated in a4dd4bf. The PR diff currently includes the prerequisite signing fix.Testing the signed build on my Apple Silicon Mac confirmed that both native binaries satisfy the pinned signing requirements. However, launchd retained a launch constraint requiring the old helper identifier,
com.nvidia.nvpair, and rejected the correctly signedcom.nvidia.nvpair.helper. macOS invalidated the old registration about 10 seconds later, but the job continued failing. An additional unregister/register cycle recovered XPC communication, firewall configuration, and setup persistence across app restarts.The existing once-per-version repair marker prevented that additional cycle. This change permits at most two replacement attempts per app version, saving the count and clearing setup completion before each unregister. Before the second attempt, it waits 12 seconds and checks status again. A recovered helper is left running, and pending approval stops recovery until a subsequent launch. A saved version without a count consumes the first attempt.
Scope
macOS helper recovery, persisted attempt bookkeeping, regression tests, and the existing helper documentation. The follow-up leaves signing requirements, helper identifiers, privileged operations, and Windows/Linux behavior unchanged.
services: patchrecords the desktop bug fix in release notes; all Go component bumps remainnonebecause their compiled output is unchanged.Validation
make -o desktop/package-lock.json check: SPDX headers, build-script verification, lint, all three TypeScript targets, service contracts, 26 Node tests, and 303 Vitest tests passed. The make option reuses installed dependencies; the upstream lockfile change only updates the application version.cd desktop && npm run dead-code:check: passed.cd desktop && ./node_modules/.bin/vitest run --project unit tests/modular/mac-privilege-service.test.ts: 21 tests passed. The five initial recovery regressions failed against the previous implementation before the fix.git diff --check: passed.Risk and remaining test
The 12-second delay is based on the observed launchd repair window, not an Apple timing guarantee. A failed retry leaves setup incomplete and cannot repeat replacement indefinitely. Signature pinning remains enforced throughout.
Checklist