apache / apache/maka

dev: close the shared Maka Dev profile launch race (atomic reservation / ownership handshake)

Open
#3,539 2 comments 0 reactions 1 assignee Claimed by @rbalachandar View on GitHub
bug
Dominant language
TypeScript
Stars
5.4k
Forks
502
Avg merge
1d 2h
Merged PRs (30d)
715

Description

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).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.