Repository navigation
fix(daemon): daemon.toml settings path follows NODESPACE_HOME - #3609
Merged
Merged
Conversation
Contributor
Author
Review round 1 (pragmatic-code-reviewer, medium)Verdict: approve, no critical issues. Improvements raised: (1) CLI Address-review
|
Contributor
Author
Review round 2 (pragmatic-code-reviewer, medium)Verdict: approve. Code change correct (CLI resolver, test env isolation, EnvRestore guard). One blocker: a stray Address-reviewRemoved in a follow-up commit (no other changes). Follow-up noted, not blocking: |
2 tasks
SettingsServiceImpl::with_default_path built its path from $HOME, so an isolated daemon read and wrote the user's real daemon.toml (API keys, routing probe verdicts). It now resolves through crate::nodespace_dir(), like every other daemon.toml reader. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… guard in tests Address review: nodespace mcp resolved daemon.toml from $HOME, so under NODESPACE_HOME it would read and flip the real user's [mcp] flag while the daemon used the isolated file. It now uses nodespace_daemon::nodespace_dir(). CLI mcp integration tests drop an ambient NODESPACE_HOME. The settings tests restore the environment through a Drop guard. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
mstomar125
force-pushed
the
issue-3605-settings-path
branch
from
October 5, 2026 11:43
bafaf35 to
78e1bb8
Compare
2 tasks
8 tasks
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.
Closes #3605
Summary
SettingsServiceImpl::with_default_pathbuilt$HOME/.nodespace/daemon.toml, so an isolated daemon (NODESPACE_HOMEset) still read and wrote the user's real settings file, including API keys and cached routing-probe verdicts. It now resolves through the existingcrate::nodespace_dir(), the same resolver every otherdaemon.tomlconsumer in the daemon already uses (local agent, capture, assembly). No second resolver.Callers checked
daemon.toml; evals use local models. No opt-in env var added (none exists for settings, and nothing needs one).scripts/eval/preflight.tsisolation message now says daemon.toml followsNODESPACE_HOMEtoo.daemon.tomlunder the isolated home.nodespace mcp(packages/cli/src/commands/mcp.rs) also read$HOME; now usesnodespace_daemon::nodespace_dir()too, so it cannot flip the real user's [mcp] flag under NODESPACE_HOME.Tests
Two tests with
HOMEat a temp home holding a settings file with an API key andNODESPACE_HOMEat another dir: the isolated service never sees or rewrites the real file, and uses the file underNODESPACE_HOME. Both fail whenwith_default_pathis reverted to$HOME. Daemon nextest (excluding golden/live/scenario6): 488 passed; clippy, fmt,bun test scripts/eval, pro-boundary check clean.Documentation
Updates the state-path list in architecture/daemon-cli-protocol.md: https://github.com/NodeSpaceAI/nodespace-docs/pull/104
🤖 Generated with Claude Code