Repository navigation
Conversation
The daemon had no SIGTERM or SIGINT handler, so `node9 daemon stop`, which sends SIGTERM, ended it without the 'exit' event: the activity socket stayed, and nothing ever removed its per-HOME directory under XDG_RUNTIME_DIR. A harness that starts many daemons with throwaway HOMEs left one directory per HOME in /run/user/<uid>, a tmpfs. SIGTERM now exits 0 and SIGINT 130 through process.exit(), so the existing 'exit' clean-up runs once. That clean-up closes the activity server, unlinks the socket only when it is ours, then removes the directory only when it is this HOME's directory under XDG_RUNTIME_DIR (never ~/.node9/run or another HOME's), a real directory of this user, and empty. SIGKILL still leaves the directory; the next start reuses it as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of the shutdown clean-up (ae8b18c) found that two daemons with one HOME, which share one socket path, removed each other's socket: - The activity socket started before the HTTP port was owned, so a second start that then yields, or a newer build taking over, first replaced the live daemon's socket. - On the way out, Node's server.close() unlinks whatever file is at the path, and the uid-only ownership check passes for every daemon of this user. The exiting daemon removed its successor's socket and directory; the successor was without one until its 2 s probe rebound it, and five such rebinds in a minute trip the circuit breaker. The socket now starts in the listen callback, once this process owns the port. Shutdown no longer closes the server (the process ends anyway) and unlinks the socket only when its dev/ino match the file this daemon bound. SIGHUP (a foreground daemon's terminal closed) now exits 129 through the same clean-up. removeOwnSocketDir reuses isPrivateDir. Tests: a yielding second start and a takeover keep the survivor's socket (no rebind, same inode); SIGHUP cleans up; the stop test allows a slow CLI start on a loaded runner. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ned (fw#320) At the observe level the gate reaches its block or review and the level records it without stopping the call. The summary counted such an attack as undetermined whenever an input was not reproduced (the package registry), although its outcome is known: it goes through and is logged. On a workspace in observe this moved 50 of 135 headline attacks out of the count. Undetermined now means an allowed attack whose unreproduced input could have stopped it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
🛡️ node9 agent-security · ✅This PR introduces no agent-security findings. 0 finding(s) · · technical details |
Member
Author
|
🎉 This PR is included in version 2.50.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
node9 daemon stop, systemd and launchd stop the daemon with SIGTERM, which used to end it without the 'exit' event: the activity socket stayed, and nothing ever removed its per-HOME directory under XDG_RUNTIME_DIR. A harness that starts many daemons with throwaway HOMEs left one directory per HOME in /run/user/, a tmpfs. SIGTERM (exit 0), SIGINT (130) and SIGHUP (129) now run the same clean-up as a normal exit.daemon stop, a non-empty directory, a link, SIGKILL then restart, a yielding second start and a takeover. The new tests fail without the fix.CI green on dev 638d65a.
🤖 Generated with Claude Code