Repository navigation
Resolve the GGUF models directory through the daemon's NodeSpace home (closes #3761) - #3762
Conversation
Pragmatic code review: initial reviewVerdict: REQUEST CHANGES (posted as a comment; GitHub blocks requesting changes on one's own PR). The production fix is clean and minimal; one test-support regression needs fixing first. Requirements check (#3761)
FindingsCritical: daemon-spawning app-lib tests now look in the wrong directory Important: Important: Nit: Nit: Answers to the author's questions
|
malibio
left a comment
There was a problem hiding this comment.
Automated pragmatic-code-review: REQUEST CHANGES (posted as a comment; GitHub blocks requesting changes on one's own PR). Full findings in the review comment above.
Review feedback addressed (75f11f4)Addressed (4)
Skipped (2)
Verification
Re-review decisionRE-REVIEW NEEDED. The critical finding was a behavioural fix with new test-support API and three edited test files, not a cosmetic change. Run |
Pragmatic code review: re-review of 75f11f4Verdict: APPROVE (posted as a comment; GitHub blocks approving one's own PR). Verification was by reading the diff and the code it touches; tests were not re-run by the reviewer (the author's runs are in the previous comment). Previous feedback4 recommendations: 4 addressed, 0 not addressed, 0 new blocking issues, 2 nits. The 2 author skips are acceptable.
Risk checks
Nits (no action required)
|
Address-review: re-review of 75f11f4No code changes. The re-review verdict is APPROVE with two optional nits, both deliberately not taken:
Re-Review DecisionDecision: NO RE-REVIEW NEEDED. No code changed since the approved commit, so there is nothing new to review. Merging is the user's call. |
…closes #3761) GgufModelManager::new() read only HOME, which Windows does not set, so the daemon logged "could not determine models directory: $HOME is unset" at startup and ran with local GGUF model management disabled. Add models_dir() beside nodespace_dir() in the daemon and use it for both the embedding model lookup and the model manager, so the two share one resolution that follows NODESPACE_HOME and finds the user's home through the platform. Delete GgufModelManager::new() and default_models_dir(); the daemon passes the directory to with_dir(). The degraded-mode test now redirects through NODESPACE_HOME, and a new test opens the manager with HOME unset. Both fail against the HOME-only code. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…refs #3761) A spawned test daemon's models directory sits under its isolated NODESPACE_HOME, so now that the GGUF manager follows that home, the model in the user's real ~/.nodespace/models is invisible to it while the old model_file_available guard still checked the real home. The guard passed and the daemon then started a live multi-gigabyte download. - Replace model_file_available with SpawnedDaemon::spawn_with_user_model, which returns None (skip) when the user lacks the model and otherwise links that one file into the daemon's isolated models directory. The check and the link are one operation, so they cannot disagree. Only the file is linked, never the directory, so the embedding model stays invisible. - Make the with_env test helper restore variables through a Drop guard. - Resolve the golden runner's default model path with dirs::home_dir(). Skipped: bundled_model's hand-built models path (pinned by an existing test) and nlp-engine's standalone fallback (only reached with no explicit path). Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
75f11f4 to
2427a7e
Compare
Summary
On Windows the daemon logged
could not determine models directory: $HOME is unsetat startup and ran with local GGUF model management disabled, becauseGgufModelManager::new()read onlyHOME. Windows definesUSERPROFILE, notHOME.models_dir()besidenodespace_dir()in the daemon: themodels/directory under the NodeSpace home, which followsNODESPACE_HOMEand otherwise asks the platform for the user's home.resolve_model_path) and the GGUF model manager, so the two share one resolution instead of two parallel ones.GgufModelManager::new()anddefault_models_dir(). The daemon passes the directory towith_dir(), so the rule has one copy.dirs::home_dir().Test plan
shared_local_agent_new_opens_the_model_manager_when_home_is_unset(new): withHOMEunset the manager opens and creates the models directory under the NodeSpace homeshared_local_agent_new_survives_a_real_model_manager_init_failure: now redirects throughNODESPACE_HOME; a file occupying the models path still degrades cleanlyHOME-only code (reverted the fix locally and watched them fail)bun run test:changed(scripts, types, node-types, Rust workspace via nextest) andbun run quality:fixpassNot covered: a real Windows run of the fixed daemon. The failure was observed on the v0.3.5 installer in a Windows 11 ARM VM; the fix is verified by the tests above, not by relaunching it there.
Closes #3761
🤖 Generated with Claude Code