Follow-up to #3359 (shared 'Maka Dev' profile owner gate).
The owner gate reads a process snapshot via pgrep/ps; the single-instance lock is taken by Electron at spawn time, AFTER the gate. Two worktrees launching nearly simultaneously can both pass the gate; the loser is focused onto the winner's window or lands on never-started.
Closing the window needs one of:
- a profile-level atomic reservation (reserve the userData lock before spawn, release on handoff/failure), or
- a post-spawn ownership handshake (after spawn, verify the running instance is the one we started; if not, surface the actual owner).
Documented in apps/desktop/README.md (owner gate section).
Follow-up to #3359 (shared 'Maka Dev' profile owner gate).
The owner gate reads a process snapshot via pgrep/ps; the single-instance lock is taken by Electron at spawn time, AFTER the gate. Two worktrees launching nearly simultaneously can both pass the gate; the loser is focused onto the winner's window or lands on never-started.
Closing the window needs one of:
Documented in apps/desktop/README.md (owner gate section).