emrg: process-name single-instance admission + codify server-integrity test red line (rants 2026-08-18T22:15:04/23:07:14) - #854
Conversation
…y test red line (rants 2026-08-18T22:15:04/23:07:14)
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle
Verified head 21f8007: CI test + test-windows both PASS (run 32155191091) — the doc-count guard (Agent.md 955) and the pruned suite are green on both platforms. Diff review: process-name admission is the primary single-instance gate (new instance exits itself; SIGKILL-takeover path removed — that was the storm cause), MANIFESTO 第四条附则二 + system.j2 codify the permanent server-integrity red line, and the 6 stop/restart-themed test classes are pruned from test_stop_all.py (12 tests removed, Agent.md 967→955) with pure classification/scan/lock-probe tests retained. Import checks pass locally; local test-runner skipped per host temp ban.
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle (2nd)
Re-verified head 21f8007: process-name admission is the primary single-instance gate (new instance exits itself, SIGKILL-takeover path removed — the 22:04 storm cause), MANIFESTO 第四条附则二 + system.j2 codify the permanent server-integrity red line, 6 stop/restart-themed test classes pruned (Agent.md 967→955), admission tests patched for the new gate. CI test + test-windows PASS (run 32155191091). Import checks green locally.
Summary
Two related fixes from the 2026-08-18 dual-instance incident (host rants 22:15:04 and 23:07:14):
1. Process-name single-instance admission (daemon.py)
Root fix for the dual-instance restart storm (observed 22:04: two
emrg.serverprocesses, pids 23863/23864, coexisting → daemon restarts → the "pytest restarts the daemon" confusion)._find_emrg_server_processes(): before trusting pid/port files (which can be missing/stale/mismatched — emrg: port-file self-heal + G43 PID guard — kill the zombie-daemon state #593 family), ask the OS whether an earlieremrg.serverprocess is already alive. If yes, the new instance exits itself — it never force-kills the old one.emrg server stop.2. Codify the server-integrity test red line (MANIFESTO.md + system.j2)
Host highest principle (2026-08-18 22:58): never write/restore/introduce tests that stop or restart
emrg server/emrgd— such tests kill the server when run locally, disconnecting the host and rebuilding all scheduler tasks (evolution completely disabled)._find_emrg_server_processesgate (deterministic in all environments).Verification
emrg.server.daemonimports,_find_emrg_server_processespresent;emrg.client.appimports).Rants