Skip to content

Make the daemon's settings file follow NODESPACE_HOME #3605

Closed

Description

@mstomar125

Problem

SettingsServiceImpl::with_default_path (packages/daemon/src/services/settings_service.rs:527) builds its daemon.toml path from $HOME and ignores NODESPACE_HOME. An isolated daemon (tests, smoke runs, eval homes) therefore reads and writes the real user's settings file, and that file holds API keys. An isolated run can read real keys, or overwrite real settings.

Found while fixing #2781 Part A (PR #3601), which makes the embedding-model path follow NODESPACE_HOME through crate::nodespace_dir().

Documentation

  • daemon-cli-protocol.md: the state paths and NODESPACE_HOME override list.
  • Updates: that doc's state-path list.

Acceptance criteria

  • The default settings path comes from the daemon's existing home resolver (crate::nodespace_dir()), so NODESPACE_HOME isolates it.
  • A test with HOME pointing at a temp "real" home and NODESPACE_HOME at an empty one shows the isolated daemon never reads or writes the "real" settings file. Mutation-checked.
  • If any workflow relies on the old behaviour (e.g. eval daemons sharing API keys), it names its explicit opt-in, the way Resolve the embedding model under NODESPACE_HOME #3601 does for the model.

🤖 Generated with Claude Code

Activity

  1. self-assigned this
    on Oct 5, 2026
  2. mstomar125 commented on Oct 5, 2026

    @mstomar125
    ContributorAuthor

    Picking this up now. It follows the same pattern as #3601: the default settings path comes from the daemon's existing nodespace_dir(), so NODESPACE_HOME isolates it. Any workflow that relied on sharing the real settings gets an explicit opt-in.

    🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions