Repository navigation
Make NODESPACE_HOME alone isolate a daemon: the socket follows it, the app stops reading it - #3658
Conversation
|
Review round 1 (pragmatic-code-reviewer, medium): APPROVE, no critical findings. Follow-ups addressed: (1) the production set_daemon_socket calls on all four serve paths (unix/windows, headless/tray) predate this change and are unchanged; the new test covers the session-environment service level, and this PR does not add a source-shape guard. (2) ADR-032 already carries the amendment that the session environment names the daemon socket, and ADR-052 section 3 is unchanged because the parent directory is still created owner-only; no edit needed. (3) Windows and socket-path-length caveats added to the protocol doc (docs PR 114). Nits on agent-eval wording fixed. Not re-reviewed: only documentation text changed after the review. 🤖 Generated with Claude Code |
…s it, the app stops reading it The daemon and the CLI resolve the default socket (and the lock beside it) under the shared home rule, so no NODESPACED_SOCKET is needed for isolation. The app's bundled-model copy goes under the user's home. A launched agent session already receives the daemon's socket; the launch test now pins it against a daemon whose own environment names another. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
3d29509 to
e86d43a
Compare
Closes #3640
NODESPACE_HOMEalone now isolates a daemon and the CLI that talks to it.nodespace_dir()); the single-instance lock already follows the socket.NODESPACED_SOCKETand--socketstill override. WithNODESPACE_HOMEunset every path is unchanged.default_socket_path_forstill reads no environment; it now takes the state directory.NODESPACED_SOCKET(the daemon sets it after the PTY allowlist clears the environment), sopackages/agentis untouched. The launch test now has the stand-in agent report it, with the daemon's own environment naming a different socket.NODESPACE_HOMEinbundled_model.rsis removed; the model copies under the user's home. The app/daemon socket agreement tests are unchanged and pass.Tests (all mutation-checked, each fails with the fix reverted)
home_isolation::nodespace_home_alone_moves_the_socket_and_its_lock: realnodespaced,HOMEat a temp real home,NODESPACE_HOMEelsewhere, no socket override; socket and lock sit in the redirected home, none in the real one. Companion test: no redirect puts them in the home.home_isolation: counting listeners in both homes; the redirected one is dialed, the real one is not; no redirect dials the home; env and--socketoverrides win.launched_session: the agent'sNODESPACED_SOCKETis the served socket.bundled_model::the_copy_ignores_nodespace_home.Not covered: the local-agent model manager (
packages/agent/src/local_agent/model_manager.rs) still createsmodels/under$HOMEregardless ofNODESPACE_HOME; it is outside this issue and in the agent package.Documentation
Companion docs PR: https://github.com/NodeSpaceAI/nodespace-docs/pull/114 (daemon-cli-protocol.md, daemon-cli-lifecycle.md, ADR-033 note, agent-eval.md).
🤖 Generated with Claude Code