Uh oh!
There was an error while loading. Please reload this page.
refactor(broker): fold fbuild-broker crate into fbuild-daemon module (#560) - #561
Conversation
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
…560) fbuild stays as close to a monocrate as possible: the standalone fbuild-broker crate (PR #559) is removed and its protocol/service/session modules now live under crates/fbuild-daemon/src/broker/. The register_payload_protocol! pin and RUNNING_PROCESS_DISABLE=1 rollback behavior are preserved exactly. The dependency-free pieces the CLI `daemon running-process` diagnostic prints — CacheRoots plus the display constants (CI_TRUSTED_INSTANCE, MIN_VERSION, FBUILD_PAYLOAD_PROTOCOL, FBUILD_PROTOCOL_VERSION) — move into fbuild-paths::running_process so fbuild-cli need not depend on fbuild-daemon or pull in running-process. A drift test asserts the daemon's macro pin equals the fbuild-paths display copy. Adds a monocrate guard: crate-gate.yml runs ci/check_workspace_crates.py, failing CI if a new workspace member is added outside the approved allowlist. Documents the "never add a new crate" policy in CLAUDE.md and crates/CLAUDE.md. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
11f1fad to
233bb71CompareUh oh!
There was an error while loading. Please reload this page.
Summary
Resolves#560. fbuild stays as close to a monocrate as possible: the standalone
fbuild-brokercrate introduced by #559 is removed and itsprotocol/service/sessionmodules now live undercrates/fbuild-daemon/src/broker/. Stacked onfeat/v1-broker-adoptionso the diff is just the fold, not a re-review of #559.fbuild-brokercrate. The running-process v1 adoption is a module insidefbuild-daemon(the tokio process that actually adopts the broker session), matching how per-platform orchestrators live underfbuild-build.register_payload_protocol!pin andRUNNING_PROCESS_DISABLE=1rollback preserved exactly — the macro pin stays inbroker/protocol.rs(the real consumer); the escape-hatch test moved withsession.rs.fbuild-cliis a thin HTTP client and must not depend onfbuild-daemon, so the dependency-free pieces thedaemon running-processdiagnostic prints —CacheRoots+ the display constants (CI_TRUSTED_INSTANCE,MIN_VERSION,FBUILD_PAYLOAD_PROTOCOL,FBUILD_PROTOCOL_VERSION) — moved intofbuild-paths::running_process. A drift test asserts the daemon's macro pin equals thefbuild-pathsdisplay copy.crate-gate.ymlrunsci/check_workspace_crates.py, which fails CI if[workspace] membersgains an entry outside the approved allowlist (a justified new crate must be added to the allowlist in the same PR with rationale).CLAUDE.mdandcrates/CLAUDE.md.Test plan
soldr cargo check --workspace --all-targets— clean;Cargo.lockno longer referencesfbuild-brokersoldr cargo clippy -p fbuild-daemon -p fbuild-paths -p fbuild-cli --all-targets -- -D warnings— clean (only the pre-existing MSRV-config notice)soldr cargo test -p fbuild-paths -p fbuild-daemon --lib— all 15 broker tests pass in their new home, includingpayload_protocol_matches_paths_display_copy(drift guard) anddisable_env_and_unreachable_broker_contracts(rollback)uv run python ci/check_workspace_crates.py— OK: 14 approved members, no new crates; verified it flags an unexpected membercrate-gate.yml🤖 Generated with Claude Code