emrg: stop_all stops clients (GUI/TUI) before daemon - #820
Conversation
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 576: reordered stop_all to clients-first/daemon-last; order tests added (daemon index after both clients); CI test+test-windows green. Matches rant 2026-08-17T14:15:33.
|
I tested this PR end-to-end (Windows, branch feature/stop-order-clients-first):
The reordering rationale is sound and matches the auto-spawn behavior: both the GUI (daemon_client.js spawn path) and the TUI (daemon_manager.py start_daemon) will bring the daemon back if it disappears while they are alive, so stopping the daemon first would leave the installer hitting locked files. Stopping clients first and the daemon last gives One non-blocking observation: |
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 577: re-verified diff (Agent.md count 871 + _stop_all reorder + order tests); CI test+test-windows green, mergeable CLEAN; pm25coder Windows end-to-end pass confirms. 2/3.
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 578: 3rd consecutive approval (576/577/578). Re-verified: order fix correct, tests green, CI pass, mergeable CLEAN. Merging.
Fix host rant 2026-08-17T14:15:33 — stop order was reversed.
Problem:
stop_all()stopped the daemon FIRST, then GUI/TUI. Both clients auto-spawn the daemon when they detect it missing (GUIdaemon_client.jsensureConnected → spawnDaemon; TUIclient/app.pyreconnect). So stopping the daemon first with clients alive made them immediately re-spawn it — the installer still hit locked files under ~/.emrg/install.Fix: reorder to clients-first, daemon-last:
With the daemon stopped last, no client remains to bring it back, verify() sees the true final state, and the installer overwrite is safe.
Tests: +2 order tests in test_stop_all.py (clients before daemon on Windows incl. bundled-git; POSIX skips bundled-git). Doc sync: Agent.md Python count 869→871. Full suite: 870 passed + 1 skipped.