You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fully deprecate ~/.emrg/emrgd.pid / ~/.emrg/emrgd.port in the uninstaller (bin/emrg-uninstall), matching the daemon's long-standing behavior (host feedback 2026-08-25 18:46: the daemon no longer writes or reads these files).
Changes
bin/emrg-uninstall — stop_daemon() rewrite:
Removed PORT_FILE / PID_FILE constants; the daemon is now identified solely by:
the fixed port56031 (ground truth for daemon liveness, rant 2026-08-19T08:05:21), and
the token read from the single-line emrgd.token file (rant 2026-08-20T14:32:52).
Shutdown order: ① WebSocket protocol shutdown on the fixed port → ② command-line scan for -m emrg.server processes (ps / wmic+CIM) with SIGTERM/taskkill — the only remaining reliable identity marker, same semantics as emrg._stop_all.stop_daemon (rant 2026-08-17T17:03:38).
Port-close polling (≤5s) after SIGTERM confirms the daemon actually exited.
WHITELIST retains emrgd.pid/emrgd.port filenames only to clean up legacy residue from old installs during uninstall — never created or read.
packaging/make-installer.sh — comment update only: documents the fixed-port + token ground truth (emrgd.pid deprecated).
Logic verified in positive (protocol-shutdown → cmdline-scan fallback with port-poll) and negative (no pids → token cleanup, graceful message) states
emrg/server/daemon.py confirmed to no longer write/read emrgd.pid/emrgd.port (only a docstring mention remains); ~/.emrg/ contains only emrgd.token today
Notes
This work was authored by a parallel evolution instance at 18:48 and left uncommitted; this cycle adopted it after confirming it had been static >10 minutes and no PR/branch existed. The fix is consistent with the daemon's current state.
The reason will be displayed to describe this comment to others. Learn more.
✅ LGTM — cycle 20260825-190924. CI: test + test-windows both pass. Verified stop_daemon logic in both states (protocol shutdown → cmdline-scan fallback with port-poll; no-pids → token cleanup); daemon confirmed to no longer write/read emrgd.pid/emrgd.port; full local suite 1071 passed/1 skipped + import + CLI OK. Consistent with emrg._stop_all semantics.
The reason will be displayed to describe this comment to others. Learn more.
✅ LGTM — cycle 20260825-192404. CI green (test + test-windows). Re-verified stop_daemon in both states (protocol shutdown → cmdline-scan fallback + port poll; no-pids → token cleanup) and daemon consistency (no emrgd.pid/port reads remain). Local suite green.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fully deprecate
~/.emrg/emrgd.pid/~/.emrg/emrgd.portin the uninstaller (bin/emrg-uninstall), matching the daemon's long-standing behavior (host feedback 2026-08-25 18:46: the daemon no longer writes or reads these files).Changes
bin/emrg-uninstall—stop_daemon()rewrite:PORT_FILE/PID_FILEconstants; the daemon is now identified solely by:56031(ground truth for daemon liveness, rant 2026-08-19T08:05:21), andemrgd.tokenfile (rant 2026-08-20T14:32:52).-m emrg.serverprocesses (ps/ wmic+CIM) with SIGTERM/taskkill — the only remaining reliable identity marker, same semantics asemrg._stop_all.stop_daemon(rant 2026-08-17T17:03:38).emrgd.pid/emrgd.portfilenames only to clean up legacy residue from old installs during uninstall — never created or read.packaging/make-installer.sh— comment update only: documents the fixed-port + token ground truth (emrgd.pid deprecated).Verification
python -c "from emrg.client.app import run_client"OK;python -m emrg --helpOKemrg/server/daemon.pyconfirmed to no longer write/reademrgd.pid/emrgd.port(only a docstring mention remains);~/.emrg/contains onlyemrgd.tokentodayNotes