BrainBar GUI orphans + socket litter: manual 'open' during deploy leaves a second menubar app running indefinitely
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Trace the 1.5.8 deploy path and its launchd/Terminal.app handoff first, then inspect BrainBar startup, test socket handling, the hybrid helper, and the Wave 4.5 self-verifier. Done means deployment cannot leave an unmanaged or duplicate GUI, tests and helpers clean up stale sockets, and verification confirms exactly one GUI instance and one daemon holding /tmp/brainbar.sock.
Written by the indexing model from the issue text.
Description
Observed live 2026-08-19 by Etan ("there are now two brainbars at the same time").
Root cause: the 1.5.8 deploy runbook works around the agent-spawn _dyld_start hang by launching BrainBar via Terminal.app open. That instance is NOT launchd-managed (registers as application.com.brainlayer.brainbar.<n>) and nothing ever reaps it — PID 13335 ran from Aug 17 19:47 until manually killed Aug 19 21:5x, alongside the launchd-managed app (com.brainlayer.brainbar). Two menubar icons, two app processes, indefinitely.
Also found: 168 stale /tmp/brainbar-test-*.sock files from test runs (Aug 17-19) and 8 orphaned brainbar-hybrid-<pid>.sock files whose owning PIDs were long dead. Cleaned manually this session.
Asks:
- Deploy path should not leave an unmanaged GUI instance — either fix the agent-spawn hang so launchd can own it, or have the runbook hand the process to launchd (and refuse to start a second instance if one is already registered).
- BrainBar should single-instance itself: on launch, if another BrainBar is already running, either exit or take over — never silently run two menubar apps against the same DB.
- Tests must clean up their sockets (tmpdir fixture or atexit); the hybrid helper should unlink its socket on exit and sweep
brainbar-hybrid-*.sockwhose PID is dead at startup. - Wave 4.5's self-verifier should assert exactly one GUI instance + one daemon holding /tmp/brainbar.sock — this is the same existence-vs-liveness class as #714.
🤖 Generated with Claude Code
- Dominant language
- Python
- Stars
- 9
- Forks
- 7
- Avg merge
- 4h 50m
- Merged PRs (30d)
- 404
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from EtanHey/brainlayer
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
EtanHey/brainlayer#1431 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
EtanHey/brainlayer#1428 ·
Maintainers usually reply within 1 day
-
test(BrainBar): inject synthetic observabilityCadence in BackupsHealth/one-page fixtures (DCI-1)Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
EtanHey/brainlayer#1367 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 Half a day Newbie friendliness 78/100
EtanHey/brainlayer#1364 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
EtanHey/brainlayer#1362 ·
Maintainers usually reply within 1 day
All issues in EtanHey/brainlayer
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
glossyio/traffic-monitor#264 ·
Maintainers usually reply within 1 day
-
Add self-hostOpen
Difficulty 1/5 Under an hour Newbie friendliness 75/100
Atarity/deploy-your-own-saas#102 ·
-
[Bug]: RDFlex silently drops the covariate adjustment when the outcome or treatment column is integer-typedPossibly taken @vrjdev claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
DoubleML/doubleml-for-py#424 ·
Maintainers usually reply within 1 day
-
agentic-dmx docs enhancement
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
521xueweihan/HelloGitHub#4150 ·