Skip to content

fix(daemon-client): say that a hung daemon is stopped before ensureDaemon starts a new one - #4803

Merged
thymikee merged 2 commits into
mainfrom
t3/ensure-replaces-unresponsive-daemon
Nov 20, 2026
Merged

thymikee merged 2 commits into
mainfrom
t3/ensure-replaces-unresponsive-daemon

fix(daemon-client): say that a hung daemon is stopped before ensureDa…

483a8d6
Select commit
Loading
Failed to load commit list.
apex-sentinel-staging / Apex Sentinel succeeded Nov 20, 2026 in 7m 15s

1 finding(s) · approve

Apex Sentinel · ✅ Approve · review of 483a8d6

Since the review of 58aa019: 1 new · 0 still open · 1 no longer raised

1 finding(s): 1 minor.

🟡 Minor (1)

Where Finding
packages/daemon-client/src/daemon-client-timeout.ts:198 🆕 New hint/comment say only a deliberate stop ends a hung daemon; ensureDaemon force-retires one

Reviewed with this repository's own Sentinel configuration (7de4587536f8).

💬 Talking to Sentinel

In a finding's thread, reply with:

Command What it does
@apex-sentinel-staging note <context> Adds context; Sentinel re-checks the cited code
@apex-sentinel-staging pivot <why> Says the finding is wrong; Sentinel re-checks the cited code
@apex-sentinel-staging like Marks the finding as useful
@apex-sentinel-staging dislike <why> Marks it as not useful, so it is not raised again

On this conversation, comment @apex-sentinel-staging review to run a full review once again.

Annotations

Check warning on line 198 in packages/daemon-client/src/daemon-client-timeout.ts

See this annotation in the file changed.

@apex-sentinel-staging apex-sentinel-staging / Apex Sentinel

minor: New hint/comment say only a deliberate stop ends a hung daemon; ensureDaemon force-retires one

A version-matched daemon with a wedged event loop that answers no probe is force-retired by `ensureDaemon` via `replaceUnreachable` — no prior stop call is needed. The hint states that stop is a precondition for a new daemon to start, which contradicts the force-retire paths tested in `daemon-client-ensure-explicit-lifecycle.test.ts:394` and documented in `client-api.md:118`.