What happens
Run bun run desktop, kill only the app window (or hit a shell crash) so the backend the Tauri shell spawned from its managed venv (~/Library/Application Support/com.debpalash.omnivoice-studio/project/.venv/...) is left running on port 3900. Run bun run desktop again and the predesktop hook dies:
error: Refusing to stop unrelated process <pid>
at clearDevPortsWith (scripts/clear-dev-ports.mjs:260:29)
The launch never starts. The orphan also survives bun run desktop-prod / installed-app / tauri dev-without-TAURI_SKIP_BACKEND runs.
Root cause
scripts/clear-dev-ports.mjs only treats a port holder as ours when it runs out of the git checkout (belongsToCheckout()). A backend running from the Tauri-managed app directory (com.debpalash.omnivoice-studio) is namespaced just as unambiguously but isn't recognized, so the script refuses to reclaim the port instead of freeing it.
Same class as #1941 (which fixed the Windows stop path) — this is the ownership check, on every platform.
Fix
Recognize a listener as VoiceStudio-owned when its executable path or command line contains the reverse-DNS bundle id com.debpalash.omnivoice-studio, in addition to the checkout-path test. Regression tests in tests/frontend/clearDevPorts.test.mjs.
What happens
Run
bun run desktop, kill only the app window (or hit a shell crash) so the backend the Tauri shell spawned from its managed venv (~/Library/Application Support/com.debpalash.omnivoice-studio/project/.venv/...) is left running on port 3900. Runbun run desktopagain and thepredesktophook dies:The launch never starts. The orphan also survives
bun run desktop-prod/ installed-app /tauri dev-without-TAURI_SKIP_BACKENDruns.Root cause
scripts/clear-dev-ports.mjsonly treats a port holder as ours when it runs out of the git checkout (belongsToCheckout()). A backend running from the Tauri-managed app directory (com.debpalash.omnivoice-studio) is namespaced just as unambiguously but isn't recognized, so the script refuses to reclaim the port instead of freeing it.Same class as #1941 (which fixed the Windows stop path) — this is the ownership check, on every platform.
Fix
Recognize a listener as VoiceStudio-owned when its executable path or command line contains the reverse-DNS bundle id
com.debpalash.omnivoice-studio, in addition to the checkout-path test. Regression tests intests/frontend/clearDevPorts.test.mjs.