fix(#2855): tmux health check fails across module instances in same process

The server-health module used module-level state for inProcessServerRunning,
which doesn't survive when Bun loads separate module instances in the same
process. Fix: use globalThis with Symbol.for key so the flag is truly
process-global.

- server-health.ts: replace module-level boolean with globalThis[Symbol.for()]
- export markServerRunningInProcess from tmux-utils barrel
- test: verify flag skips HTTP fetch, verify globalThis persistence
This commit is contained in:
YeonGyu-Kim
2026-03-27 14:17:06 +09:00
parent 19ab3b5656
commit 7ce7a85768
3 changed files with 50 additions and 4 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
export { isInsideTmux, getCurrentPaneId } from "./tmux-utils/environment"
export type { SplitDirection } from "./tmux-utils/environment"
export { isServerRunning, resetServerCheck } from "./tmux-utils/server-health"
export { isServerRunning, resetServerCheck, markServerRunningInProcess } from "./tmux-utils/server-health"
export { getPaneDimensions } from "./tmux-utils/pane-dimensions"
export type { PaneDimensions } from "./tmux-utils/pane-dimensions"