Commit Graph
3 Commits
Author SHA1 Message Date
roboomp 74e73debaf fix(launch): scope daemon prune to the daemons container
smokeTestDaemonBroker mkdtemp'd its runtime dir directly under
os.tmpdir(), and the broker's startup sweep pruneDeadDaemonRuntimeDirs
reclaims path.dirname(runtimeDir). On a default session that is /tmp, so
--smoke-test recursively deleted every aged sibling with no live
broker/clients (tmux/ssh sockets, editor state, build trees) while still
exiting 0.

- client.ts: keep the smoke broker's project and runtime dirs under a
  single private mkdtemp parent the process owns.
- presence.ts: refuse any prune root that is not the daemons container
  and only prune entries named like a 16-hex daemon scope key, so a
  relocated runtime dir can never rm -rf unrelated neighbours.

Fixes #8721
2026-08-16 11:50:00 +00:00
can1357 2dba883e08 fix(launch): preserved global daemon service runtimes 2026-08-16 02:43:31 +02:00
roboomp 0fc2b0f42c fix(launch): prune dead daemon runtime dirs on broker startup
~/.omp/run/daemons/<hash> scopes accumulated forever: broker shutdown
removed only the socket and PID lease, and nothing swept dead scopes, so
inert broker state and the persistent shared Chromium profiles grew
without bound (reporter: 1.3GB / 198 dirs in ~4 weeks).

Each broker now sweeps its sibling daemon roots on startup and removes a
scope only when its broker.pid is absent/dead, no live client presence
remains, and it has been untouched past a stale grace. The caller's own
runtime dir and the machine-global daemon container are skipped. The
sweep is detached and non-throwing so it never delays client connects.

Fixes #8674
2026-08-15 19:33:25 +00:00