Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đã đóng
#3,104 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
72/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
cli

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
TypeScript
Star
4.9k
Fork
328
Merge trung bình
12 giờ 13 phút
Pull request đã merge (30 ngày)
541

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của callstack/agent-device

Tất cả issue của callstack/agent-device

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.