You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(daemon-client): timeout reset clears daemon.json and daemon.lock without proving ownership #3105
The daemon-client timeout reset path in src/daemon-client/daemon-client-timeout.ts (resetDaemonState, around line 191) unlinks daemon.json and daemon.lock without proving that this client's daemon is the process those files describe. It is the client-side twin of #3087: a client giving up on a slow daemon deletes the metadata of a daemon that is alive and simply busy, or of a successor that took over meanwhile.
Direction
Route the cleanup through the same fence the daemon uses — readRegisteredDaemonOwnership for the info file, and the existing liveness proof for the lock — and decline with a typed reason instead of unlinking. Client cleanup is what makes an absent record normal for the daemon at exit, so this path must stay fail-closed rather than simply deleting less.
Implemented and verified on main in #3127 (merge 2212eacf5b). Timeout reset now awaits the central stopAndRetireDaemon operation: verified process lifetime, confirmed exit, protected registration re-read, ownership-checked metadata removal and typed retained outcomes. Raw client info/lock removal helpers are gone. Replaced, unreadable or unproven metadata is retained.
The final head passed ownership/retirement controls, its affected gate and all 21 GitHub checks. Closing the metadata/lock ownership defect. The separate question of whether one timed-out request should terminate sibling sessions or host-wide runners remains open in #3177.
Activity
thymikee commentedon Oct 4, 2026
Implemented and verified on main in #3127 (merge
2212eacf5b). Timeout reset now awaits the central stopAndRetireDaemon operation: verified process lifetime, confirmed exit, protected registration re-read, ownership-checked metadata removal and typed retained outcomes. Raw client info/lock removal helpers are gone. Replaced, unreadable or unproven metadata is retained.The final head passed ownership/retirement controls, its affected gate and all 21 GitHub checks. Closing the metadata/lock ownership defect. The separate question of whether one timed-out request should terminate sibling sessions or host-wide runners remains open in #3177.