Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/daemon-client/src/daemon-client-lifecycle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ LOOPBACK_BLOCK_LIST.addSubnet('::ffff:127.0.0.0', 104, 'ipv6');

/**
* Whether a timed-out request may retire the daemon it was waiting on. An attach client never may: the
* daemon is not its to kill, and `ensureDaemon` is where an unresponsive one is replaced. Every other
* caller asks the retirement, which judges the record's owner before it signals anything.
* daemon is not its to kill, and `ensureDaemon` reuses a compatible daemon without asking it anything,
* so a hung one is ended only by a deliberate stop. Every other caller asks the retirement, which judges the record's owner before it signals anything.
*/
export function resolveTimeoutRecovery(
settings: DaemonClientSettings,
Expand Down
5 changes: 3 additions & 2 deletions packages/daemon-client/src/daemon-client-timeout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
remote: boolean;
/**
* Whether this caller may retire a daemon that answers nothing. An attach client never may: the
* daemon is not its to kill, and `ensureDaemon` is where an unresponsive one is replaced.
* daemon is not its to kill. `ensureDaemon` reuses a compatible daemon without asking it
* anything, so a hung one is ended only by a deliberate stop.
*/
retireUnresponsive: boolean;
timeoutMs: number;
Expand Down Expand Up @@ -194,7 +195,7 @@
return 'The daemon did not answer the liveness probe and was reset after the timeout. Read the request log for the timed-out step.';
}
if (stopCommand) {
return `The daemon did not answer the liveness probe, and this request does not retire a daemon it did not start. Stop it with ${stopCommand}, then retry. SDK clients call ensureDaemon() to start a fresh one.`;
return `The daemon did not answer the liveness probe, and this request does not retire a daemon it did not start. Stop it with ${stopCommand}. Then retry; an SDK client calls ensureDaemon() first, which starts a new daemon only after that stop.`;

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

View check run for this annotation

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`.
Comment thread
thymikee marked this conversation as resolved.
Resolved
}
const iosPrepareHint =
applePlatformDeclared && command === PUBLIC_COMMANDS.snapshot
Expand Down
Loading