Skip to content

feat: stub running-process broker adoption#529

Merged
zackees merged 1 commit into
mainfrom
feat/rp-min-adoption
Jun 9, 2026
Merged

feat: stub running-process broker adoption#529
zackees merged 1 commit into
mainfrom
feat/rp-min-adoption

Conversation

@zackees

@zackees zackees commented Jun 9, 2026

Copy link
Copy Markdown
Member

Summary

  • adds a minimal fbuild_paths::running_process adoption seam for service metadata, platform service-definition paths, and the RUNNING_PROCESS_DISABLE=1 escape hatch
  • keeps the current direct HTTP daemon path as the working fallback while broker-client wiring is deferred
  • adds a fbuild-daemon.servicedef.textproto.in template stub for future packager-side protobuf generation
  • surfaces the current running-process broker state in CLI diagnostics/spawn tracing

Critical Windows host checks

  • git diff --check
  • soldr cargo test -p fbuild-paths running_process -- --nocapture
  • soldr cargo check -p fbuild-cli
  • soldr cargo fmt -p fbuild-paths -p fbuild-cli -- --check

Stubbed / deferred

  • actual protobuf encoding and installation of fbuild.servicedef in packages/installers
  • active BackendHandle endpoint-response probing; fbuild still uses the HTTP daemon endpoint in this slice
  • running_process::broker::client::connect_to_backend / Hello-skip broker path
  • broker-mode vs direct-mode integration tests and three-OS acceptance
  • Phase 7 default-on rollout and Phase 8 escape-hatch removal

Refs #510.
Refs zackees/running-process#242.
Refs zackees/running-process#228.

Summary by CodeRabbit

  • New Features

    • Added running-process broker adoption support, enabling configurable daemon operation modes through environment variable controls for broker enablement and service definition directory paths.
  • Chores

    • Added service definition template configuration for running-process broker integration.

@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: da164c67-bf7b-4946-b569-24cb83d3bd6c

📥 Commits

Reviewing files that changed from the base of the PR and between ef39f07 and 3b75ff2.

📒 Files selected for processing (4)
  • crates/fbuild-cli/src/daemon_client.rs
  • crates/fbuild-daemon/running-process/fbuild-daemon.servicedef.textproto.in
  • crates/fbuild-paths/src/lib.rs
  • crates/fbuild-paths/src/running_process.rs

📝 Walkthrough

Walkthrough

This PR introduces the running-process broker adoption seam for fbuild. It adds environment-based configuration to select between direct HTTP daemon mode and broker-requested mode, defines service-definition constants and path resolution, and integrates adoption status into CLI diagnostics and logs.

Changes

Running-process broker adoption seam

Layer / File(s) Summary
Running-process broker adoption module
crates/fbuild-paths/src/lib.rs, crates/fbuild-paths/src/running_process.rs
Introduces running_process module with service/broker constants (SERVICE_NAME, SERVICE_DEFINITION_FILE_NAME, BROKER_ISOLATION, environment variable names), RunningProcessDaemonMode enum, flag-checking helpers (running_process_disabled(), running_process_broker_requested()), mode-selection and adoption-summary functions, platform-aware servicedef path resolution, and unit tests validating constant metadata, path joining, and mode behavior.
Service definition template
crates/fbuild-daemon/running-process/fbuild-daemon.servicedef.textproto.in
Protobuf ServiceDefinition template specifying fbuild service name, SHARED_BROKER isolation mode, absolute-path placeholders for daemon binary and per-version binary directory, and metadata labels linking to FastLED/fbuild#510 and zackees/running-process#242.
CLI diagnostic and logging integration
crates/fbuild-cli/src/daemon_client.rs
Extends runtime_diagnostic() to append running-process adoption status to the diagnostic string, and adds tracing::debug! logging of adoption status in spawn_daemon_process() before daemon configuration.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related issues

Poem

🐰 A running-process broker blooms so bright,
With adoption flags set just right,
Environment paths, daemon modes in place,
The fbuild daemon finds its place,
From CLI logs to templates true—
The seam is set, adoption's through! 🌟

✨ 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 feat/rp-min-adoption

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 and usage tips.

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