daemon start reports DAEMON_CONNECTION_LOST for a daemon that never came up

Fermée
#684 2 commentaires 0 réactions 1 personne assignée Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@V3RON y travaille déjà.

Depuis le 18/10/2026.

  • #710 par @V3RON — fusionnée

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
45/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
Active
Stack technique
typescript
Domaine
cli

Piste de recherche

Start by reading the auto-launch polling path in src/cli/index.ts:239 and the HTTP-start failure path in src/daemon/main.ts:660; compare the error definitions in docs/CLI.md:132 and :498, and review the related discussion in #672. Done means auto-launch failures, including a daemon that stops before becoming available, are reported consistently as failed starts rather than as a lost live connection.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

bug:ready

simlock daemon start sometimes reports DAEMON_CONNECTION_LOST for a daemon that never came
up, instead of a failed start.

With the daemon's HTTP port held by another process (so the daemon claims its unix socket,
answers the CLI's hello, then stops itself on http-start-failed at
src/daemon/main.ts:660), most runs report the auto-launch timeout, and some report:

{"error":{"code":"DAEMON_CONNECTION_LOST","message":"Daemon connection closed"}}

exit 1, after ~240 ms. 4 of 22 direct daemon start runs at 24ce3d5a took that shape, plus
one of three console-lane runs (worker mode, fake driver, the daemon's HTTP port held); the rest
gave Timed out starting simlock daemon.

docs/CLI.md:132 defines that code as "the thing you were talking to went away" and
docs/CLI.md:498 as a live connection that died, leaving the lease standing. daemon start
never had a daemon to lose, so the line names no fact about the start: it reads as though a
running daemon died under the command. A script cannot tell a failed start from a lost daemon.

The connection is the CLI's own poll hitting the socket in the window before the dying daemon
releases it (src/cli/index.ts:239), so which of the two lines a start reports is left to
timing. Twice on a build of bd664e22 the same start instead exited 13 with
Warning: Detected unsettled top-level await and no cause; it did not reproduce on a build of
the tip. #672 already disputes the code the timeout path reports; a fix that classifies
auto-launch failures should cover these paths too.

Found while triaging #673.

Written by an agent.

Langage dominant
TypeScript
Étoiles
535
Forks
21
Merge moyen
8 h 52 min
PR mergées (30 j)
461

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de callstackincubator/simlock

Toutes les issues de callstackincubator/simlock

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.