Commit 5bfc7a7
Fix CI hang: exit on termination signals and watchdog smoke test (#31)
The SIGINT/SIGTERM/SIGHUP handlers in runtime-diagnostics only logged the
signal name without calling process.exit. Registering a handler that does
not exit overrides Node's default termination behavior, so the server
ignored shutdown signals. The MCP SDK smoke test sends SIGTERM via
StdioClientTransport.close, so the child server stayed alive and the
"Run tests" job in the publish workflow hung until the workflow timeout.
Make the handlers log and then exit cleanly, and add a 60s hard timeout
to the smoke test so any future regression in shutdown can never hang
CI for hours.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 17f956a commit 5bfc7a7
2 files changed
Lines changed: 23 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
24 | 28 | | |
25 | 29 | | |
26 | 30 | | |
| 31 | + | |
27 | 32 | | |
28 | 33 | | |
29 | 34 | | |
0 commit comments