GitHub issue:
- Title:
Register daemon shutdown cleanup before readiness
- Description: The daemon can print readiness output before its async exit hook is registered, leaving a short window where
SIGTERM exits without killing the Kubo child process. The existing daemon shutdown test exposes this as a suite-level timing failure in test/cli/daemon.test.ts.
Discovered while verifying #58. Implementation moved shutdown cleanup registration before Kubo/RPC startup and was verified by the focused shutdown test plus the full CLI suite.
Discovered while verifying #58. Implementation moved shutdown cleanup registration before Kubo/RPC startup and was verified by the focused shutdown test plus the full CLI suite.