Commit Graph
3 Commits
Author SHA1 Message Date
hermes 5b74536472 DC-067: harden shutdown per Codex C-grade feedback
- Logger validation now requires info/warn/error (was info-only)
- Force-exit timer now survives manager stop drain so a hung manager
  cannot trap the process in half-shutdown
- installSignalHandlers is now actually idempotent — tracks installed
  signals on coordinator and skips duplicates
2026-08-12 03:52:34 -07:00
hermes bb01a77ae7 DC-067: fix shutdown sequencing — stop managers AFTER server.close drains
Codex grade D flagged two real defects:
1. Managers were stopped before HTTP server finished draining, so in-flight
   requests could fail when their backing services were already down.
2. _stopManager() promises weren't awaited, contradicting the documented
   'declaration order' claim for async stop methods.

Fix: server.close callback now awaits _stopManagersInOrder() before
exiting. The 'shutdown' event fires first (so listeners can observe the
signal); the 'closed' event fires after all managers are stopped.
2026-08-12 03:46:42 -07:00
hermes 88ff260e5e DC-067: graceful shutdown coordinator (EventEmitter, 10s drain, idempotent) 2026-08-12 03:36:49 -07:00