Skip to content

fix(cli): spawn sibling fbuild-daemon binary, not bare PATH lookup (#830) - #889

Merged
zackees merged 1 commit into
mainfrom
fix/830-spawn-sibling-daemon-binary-v2
Jun 30, 2026
Merged

fix(cli): spawn sibling fbuild-daemon binary, not bare PATH lookup (#830)#889
zackees merged 1 commit into
mainfrom
fix/830-spawn-sibling-daemon-binary-v2

Conversation

@zackees

@zackees zackees commented Jun 30, 2026

Copy link
Copy Markdown
Member

Problem

When a venv-installed fbuild CLI does daemon restart, the previous code bare-spawned "fbuild-daemon" and let the OS PATH lookup pick the binary. On Windows that picked up the user's global %USERPROFILE%\.local\bin\fbuild-daemon.exe from a prior system-wide install, leaving a venv 2.3.13 CLI silently restarting a 2.2.27 daemon. The user thinks they're testing fresh code; they aren't.

Repro from #830:

.venv\Scripts\fbuild.exe --version          # fbuild 2.3.13
.venv\Scripts\fbuild.exe daemon restart
.venv\Scripts\fbuild.exe daemon status      # Version: 2.2.27  Path: ~\.local\bin\fbuild-daemon.exe

Fix

Reuse the existing daemon_executable_hint() in spawn_daemon_process, which already checks for a fbuild-daemon (or .exe) binary in the same directory as the running fbuild CLI before falling back to the bare name (and thus PATH). The hint was already used by the info / status surfaces — now spawn agrees with them, so all three views of "which daemon binary is in play" stay consistent.

Also improve the spawn-failure error message to include the resolved path so the next person hitting an install-layout issue sees what was actually attempted, not just a generic PATH suggestion.

Verification

  • soldr cargo check -p fbuild-cli clean
  • soldr cargo clippy -p fbuild-cli --all-targets -- -D warnings clean

(daemon_executable_hint depends on std::env::current_exe(), which is hard to unit-test without a refactor; the function itself is small and was already covered by being the info-path's primary lookup.)

Closes #830

)

When a venv-installed fbuild CLI does `daemon restart`, the previous
code bare-spawned "fbuild-daemon" and let the OS PATH lookup pick the
binary. On Windows that picked up the user's global
`%USERPROFILE%\.local\bin\fbuild-daemon.exe` from a prior
system-wide install, leaving a venv 2.3.13 CLI silently restarting a
2.2.27 daemon. The user thinks they're testing fresh code; they
aren't.

Fix: reuse the existing `daemon_executable_hint()`, which checks for
a `fbuild-daemon` (or `.exe`) binary in the same directory as the
running `fbuild` CLI before falling back to the bare name (and thus
PATH). The hint is already used by the info / status surfaces — now
spawn agrees with them, so all three views of "which daemon binary
is in play" stay consistent.

Improve the spawn-failure error message to include the resolved path
so the next person hitting an install-layout issue sees what was
actually attempted, not just a generic PATH suggestion.

Closes #830
@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@zackees, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 38 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 794de1d7-b016-4851-bcdc-2a5c9b32ce59

📥 Commits

Reviewing files that changed from the base of the PR and between 1450a9c and da42039.

📒 Files selected for processing (1)
  • crates/fbuild-cli/src/daemon_client.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/830-spawn-sibling-daemon-binary-v2

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@zackees
zackees merged commit e5b5f3f into main Jun 30, 2026
82 of 93 checks passed
@zackees
zackees deleted the fix/830-spawn-sibling-daemon-binary-v2 branch June 30, 2026 18:24
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

Source install restarts stale global fbuild-daemon binary

1 participant