aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/spawn.ts
diff options
context:
space:
mode:
authorUttkarsh <38376852+uttkarsh-26@users.noreply.github.com>2026-08-06 00:20:49 +0530
committerGitHub <noreply@github.com>2026-08-06 00:20:49 +0530
commitd9bc46b508f8c6f7e0f0ff5d54d804340f3e6c80 (patch)
tree0ea1315ccc0feaee1ddf184ed16f16173455b3b4 /src/daemon/spawn.ts
parent31c1b27a50bc2b9ba7138ae67a4cfaba6945582e (diff)
fix: reconnect to Chrome only on explicit browser demand (#18)
* fix: reconnect to Chrome only on browser demand * fix(daemon): gate stale CDP bridge reconnect attempts * Harden bridge reconnect lifecycle against stale socket callbacks * fix(daemon): handle stale attempt failures without deferred settlement * test: align waitFor assertions and stale-socket case labels * fix(daemon): re-check socket after connect wait in handleRequest Restores the post-wait re-check from the original PR branch (dropped during the main rebase merge); TypeScript needs the local narrowing before send. * fix(daemon): reject in-flight requests when an open connection drops `failCurrentAttempt` delegated callback rejection to `settleAttempt`, but an attempt that reached `open` had already settled, so the close path returned early and never answered its in-flight requests. They hung until the 10s command timeout instead of failing immediately, which the on-demand reconnect change had promised to preserve. Reject the attempt's callbacks directly in `failCurrentAttempt`, before the close handler notifies clients. Move the connection-lifecycle tests out of test/manual/ — which nothing runs — into test/daemon/, where `npm test` picks them up, and convert the hand-rolled pass/fail counters to node:test. Adds a case covering the drop path above; it fails without the fix. --------- Co-authored-by: Hermes Subagent <hermes-subagent@example.com> Co-authored-by: Hermes Agent <agent@example.com> Co-authored-by: uttkarsh-26 <uttkarsh@users.noreply.github.com> Co-authored-by: amankumarsingh77 <amankumarsingh7702@gmail.com>
Diffstat (limited to 'src/daemon/spawn.ts')
0 files changed, 0 insertions, 0 deletions