Skip to content

Adopt running-process 4.6.0 daemon environment policy#1169

Merged
zackees merged 1 commit into
mainfrom
chore/running-process-auto-env
Jul 24, 2026
Merged

Adopt running-process 4.6.0 daemon environment policy#1169
zackees merged 1 commit into
mainfrom
chore/running-process-auto-env

Conversation

@zackees

@zackees zackees commented Jul 24, 2026

Copy link
Copy Markdown
Member

Summary

  • update the fbuild running-process workspace dependency and lockfile to 4.6.0
  • start the custom tokio-spawned fbuild daemon from the logged-in user baseline environment
  • retain explicit daemon settings such as VIRTUAL_ENV as overlays
  • prevent inherited CLUD and RUNNING_PROCESS lineage markers from turning fbuild into a false orphan-reaper target

Validation

  • soldr cargo check -p fbuild-cli
  • git diff --check

The check passed with one existing unrelated GUID_DEVCLASS_USB unused-import warning.

Depends on zackees/running-process#653 and running-process 4.6.0: https://github.com/zackees/running-process/releases/tag/4.6.0

Summary by CodeRabbit

  • Bug Fixes
    • Improved daemon startup reliability by launching daemons with a clean, standardized environment.
    • Prevented unintended inheritance of the command-line process environment.
    • Added clearer error handling when preparing the daemon environment.

@zackees
zackees marked this pull request as ready for review July 24, 2026 00:47
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The CLI now constructs a baseline user environment for spawned daemons, clears inherited variables, applies that baseline, and maps environment construction failures to DaemonError. The running-process dependency is updated to version 4.6.0.

Changes

Daemon Environment Baseline

Layer / File(s) Summary
Isolate daemon environment
Cargo.toml, crates/fbuild-cli/src/daemon_client.rs
The running-process dependency is updated to 4.6.0, and spawn_daemon_process clears the command environment before applying user_baseline_environment(), mapping failures to DaemonError.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately reflects the dependency bump and daemon environment policy change.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/running-process-auto-env

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@crates/fbuild-cli/src/daemon_client.rs`:
- Around line 937-942: Update the command environment setup near
cmd.env_clear().envs(baseline) to explicitly preserve the caller’s
FBUILD_DAEMON_PORT override after clearing inherited variables, while retaining
the baseline environment and existing VIRTUAL_ENV handling.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 3b6abc54-cb24-414c-bfb2-9744f2a04fad

📥 Commits

Reviewing files that changed from the base of the PR and between d4b20d2 and 84518f8.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • Cargo.toml
  • crates/fbuild-cli/src/daemon_client.rs

Comment thread crates/fbuild-cli/src/daemon_client.rs
@zackees
zackees merged commit f896b7e into main Jul 24, 2026
87 of 93 checks passed
@zackees

zackees commented Jul 24, 2026

Copy link
Copy Markdown
Member Author

Review follow-up after this PR auto-merged: #1170 preserves FBUILD_DAEMON_PORT and the full documented FBUILD_* daemon-control namespace while retaining lineage isolation.

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.

1 participant