Skip to content

fix(desktop): put managed node on model discovery PATH#2359

Open
Chessing234 wants to merge 1 commit into
block:mainfrom
Chessing234:fix/model-discovery-managed-node
Open

fix(desktop): put managed node on model discovery PATH#2359
Chessing234 wants to merge 1 commit into
block:mainfrom
Chessing234:fix/model-discovery-managed-node

Conversation

@Chessing234

Copy link
Copy Markdown

Summary

  • GUI launches often have no interactive login-shell PATH, so model discovery couldn't find node
  • Buzz already ships a managed Node runtime; discovery only used login_shell_path()
  • reuse the same cli_probe::augmented_path() as runtime spawn / ACP probes

Closes #2299

Test plan

  • Linux/macOS GUI launch with only Buzz-managed Node: open agent model dropdown and confirm live models load

Made with Cursor

Signed-off-by: Taksh <takshkothari09@gmail.com>
@Chessing234
Chessing234 requested a review from a team as a code owner July 22, 2026 11:16
@Chessing234

Copy link
Copy Markdown
Author

model discovery now uses the same augmented path as runtime spawn (managed node first).

@BradGroux

Copy link
Copy Markdown

Independent review against #2299: this is pointed at the correct seam. cli_probe::augmented_path() delegates to the same runtime::path::build_augmented_path() used for runtime spawn, so model discovery now receives the managed npm/node bins before the login-shell PATH. That is the behavior the GUI-only failure needs.

Local verification on head 31b44e45:

  • ./bin/just desktop-tauri-check — passed.
  • managed_agents::readiness::cli_probe::tests:: — 4 passed, including the #!/usr/bin/env node PATH regression.
  • managed_agents::runtime::path::tests:: — 5 passed.

There is one merge blocker: the repository formatting gate currently fails on this head:

$ ./bin/just desktop-tauri-fmt-check
Diff in desktop/src-tauri/src/commands/agent_model_process.rs:30:
-        if let Some(path) =
-            crate::managed_agents::readiness::cli_probe::augmented_path()
-        {
+        if let Some(path) = crate::managed_agents::readiness::cli_probe::augmented_path() {

Running ./bin/just desktop-tauri-fmt and pushing the result should clear it; then ./bin/just ci is the repo's full pre-PR gate.

The remaining coverage gap is non-blocking but worth fixing: the PR test plan is manual-only, and the issue is specifically about the model-discovery subprocess environment. The existing CLI-probe test proves the shared PATH builder can resolve an env node shim, but it does not exercise run_agent_models_command. A focused regression around that command with a fake #!/usr/bin/env node ACP adapter would protect this call site from drifting again.

I independently reproduced and reviewed this while preparing a fix, but did not open a duplicate after finding this PR.

@BradGroux

BradGroux commented Jul 22, 2026

Copy link
Copy Markdown

I implemented the direct subprocess regression as a signed-off support commit based on this PR's current head: BradGroux/buzz@bc757199.

It can be applied with:

git cherry-pick bc757199ee4acb6221bd82e834484f1602eb3904

The patch:

  • retains augmented-PATH discovery inside spawn_blocking, so login-shell probing does not block the async runtime;
  • adds a narrow injectable PATH-provider seam;
  • executes a fake buzz-acp and a fake ACP adapter with #!/usr/bin/env node;
  • proves the supplied PATH selects the fake node interpreter and returns the expected normalized model; and
  • includes the rustfmt correction noted above.

Verified on top of 31b44e45:

  • direct regression: 1 passed;
  • ./bin/just desktop-tauri-fmt-check — passed;
  • ./bin/just desktop-tauri-check — passed.

This is only a support branch for this PR; I have not opened a competing pull request.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Model discovery fails on GUI launch — bundled managed node not on discovery subprocess PATH (Linux/macOS)

2 participants