Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

fix(daemon): a superseded daemon overwrites the shared daemon-shutdown.json

Fermée
#3,104 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

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

Personne n'a encore pris cette issue.

Évaluation

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

Piste de recherche

Locate writeDaemonShutdownReport and clearDaemonShutdownReport, then trace readRegisteredDaemonOwnership and the shared state paths they use. Confirm how ownership records are interpreted and update both sites so a daemon proceeds only when ownership is match; done means a superseded daemon cannot overwrite or clear the successor's shutdown report.

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

Description

Problem

writeDaemonShutdownReport and clearDaemonShutdownReport write and delete daemon-shutdown.json in the shared state dir without checking who owns it, unlike the daemon.json and daemon.lock paths, which now prove ownership first (#3087).

A daemon that has been superseded still runs its own shutdown, so it can:

  • overwrite the successor's shutdown report with its own, or
  • clear a report the successor still needs.

Both hide why a shutdown happened from whoever is debugging the daemon that is actually serving clients.

Why it is separate from #3087

The issue's completion conditions cover daemon.json only. The fence needs the same reasoning applied to a second shared file, and that file has its own readers whose expectations have to be checked, so it does not belong in the #3087 diff.

Direction

Reuse readRegisteredDaemonOwnership at both sites and decline the write when the record is not match. Note that this file is written by the daemon leaving, so the check is "am I still the serving daemon", not "does this file name me".

Refs #3087, #3102

Langage dominant
TypeScript
Étoiles
4.9k
Forks
328
Merge moyen
12 h 16 min
PR mergées (30 j)
538

Préparer son environnement

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 callstack/agent-device

Toutes les issues de callstack/agent-device

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.