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
On PR #304 (feat(mcp): connect the daemon to its engine over IPC), two of the three daemon restart tests fail on test (ubuntu-latest):
thread 'engine_recovers_after_hyperd_killed' panicked at hyperdb-mcp/tests/daemon_tests.rs:1744:9:
daemon should restart hyperd within 45s
thread 'hyperd_monitor_detects_killed_hyperd_and_restarts' panicked at hyperdb-mcp/tests/daemon_tests.rs:1647:9:
daemon should restart hyperd within 45s
test result: FAILED. 61 passed; 2 failed
client_report_triggers_restart_after_kill (the third restart test) passes. This is after#309 raised the readiness budget 12 → 45s, so it is not the old budget-too-small timeout — the daemon genuinely does not restart hyperd within 45s over UDS under CI load.
Why this looks like a real UDS regression, not the known flake
The distinguishing evidence: the same two tests pass on main (TCP transport) on ubuntu — confirmed green at 82b45cb (the rc.3 release commit) and on #309's CI run (bea4855, test (ubuntu-latest) passed). They fail only on #304, whose sole functional change is switching the daemon's engine connection from TCP to a Unix domain socket. So the delta is the transport, not test flakiness or CI noise.
They pass 4/4 locally (macOS dev box, the adversarial reviewer's runs, and the fix-worker's runs), so the failure is load/timing/platform-dependent and does not reproduce on a developer machine — which is why it slipped past local gates and the review.
Likely mechanism (from the #304 review's own I-1/I-4 findings)
hyperd refuses to bind an already-occupied domain-socket path and dies ("domain socket is in use"). The restart path works only because try_restart_hyperd drops the old HyperProcess (reaping the SIGKILLed child) before respawning, so hyperd's pid-liveness staleness check on <dir>/hyper.pid lets the replacement rebind the same socket path. Under ubuntu CI load, the reap-then-rebind sequence appears to race — the stale socket/pid state may not clear in time, so the rebind is refused or delayed past 45s and the restart never completes. The fast-fail pre-flight added in the fix cycle only rejects an already-bound socket; it does not fix a slow or racy rebind.
Over TCP (the previous transport) this never happened because each restart bound a fresh ephemeral port, sidestepping the stale-endpoint problem entirely.
Impact
#304 must not merge until this is resolved. It is a reliability regression in the daemon's core value — crash detection and restart — over the new transport. It is not urgent: rc.3 is already shipped, rc.4 is not being cut, and #304 is future work. But it blocks #304, and it is a genuine finding about the IPC design, not a test artifact.
Next steps
Confirm consistency — re-run feat(mcp): connect the daemon to its engine over IPC #304's ubuntu job a few times. A flake would intermittently pass; a real rebind race should fail most runs. (One re-run is in progress as this is filed.)
If consistent, fix the UDS stale-socket rebind on restart: likely try_restart_hyperd (or hyperd startup) should explicitly unlink the stale socket path before rebinding, rather than relying on the pid-staleness check racing the reap under load. This is the same territory as the review's I-1 and the deferred single-instance-lock work.
Surfaced when #304 was update-branched onto main (with #309's fixes) and its test (ubuntu-latest) leg failed 2/3 restart tests. Verified the same tests pass on main over TCP. #304 head e51fdefb, run 34092465671.
Symptom
On PR #304 (
feat(mcp): connect the daemon to its engine over IPC), two of the three daemon restart tests fail ontest (ubuntu-latest):client_report_triggers_restart_after_kill(the third restart test) passes. This is after #309 raised the readiness budget 12 → 45s, so it is not the old budget-too-small timeout — the daemon genuinely does not restarthyperdwithin 45s over UDS under CI load.Why this looks like a real UDS regression, not the known flake
The distinguishing evidence: the same two tests pass on
main(TCP transport) on ubuntu — confirmed green at82b45cb(the rc.3 release commit) and on #309's CI run (bea4855,test (ubuntu-latest)passed). They fail only on #304, whose sole functional change is switching the daemon's engine connection from TCP to a Unix domain socket. So the delta is the transport, not test flakiness or CI noise.They pass 4/4 locally (macOS dev box, the adversarial reviewer's runs, and the fix-worker's runs), so the failure is load/timing/platform-dependent and does not reproduce on a developer machine — which is why it slipped past local gates and the review.
Likely mechanism (from the #304 review's own I-1/I-4 findings)
hyperdrefuses to bind an already-occupied domain-socket path and dies ("domain socket is in use"). The restart path works only becausetry_restart_hyperddrops the oldHyperProcess(reaping the SIGKILLed child) before respawning, sohyperd's pid-liveness staleness check on<dir>/hyper.pidlets the replacement rebind the same socket path. Under ubuntu CI load, the reap-then-rebind sequence appears to race — the stale socket/pid state may not clear in time, so the rebind is refused or delayed past 45s and the restart never completes. The fast-fail pre-flight added in the fix cycle only rejects an already-bound socket; it does not fix a slow or racy rebind.Over TCP (the previous transport) this never happened because each restart bound a fresh ephemeral port, sidestepping the stale-endpoint problem entirely.
Impact
#304 must not merge until this is resolved. It is a reliability regression in the daemon's core value — crash detection and restart — over the new transport. It is not urgent: rc.3 is already shipped, rc.4 is not being cut, and #304 is future work. But it blocks #304, and it is a genuine finding about the IPC design, not a test artifact.
Next steps
try_restart_hyperd(orhyperdstartup) should explicitlyunlinkthe stale socket path before rebinding, rather than relying on the pid-staleness check racing the reap under load. This is the same territory as the review's I-1 and the deferred single-instance-lock work.Provenance
Surfaced when #304 was update-branched onto
main(with #309's fixes) and itstest (ubuntu-latest)leg failed 2/3 restart tests. Verified the same tests pass onmainover TCP. #304 heade51fdefb, run 34092465671.