Repository navigation
Fix spawned broker and CLI env separation - #396
Conversation
|
Warning Review limit reached
Next review available in: 41 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
✨ 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 |
There was a problem hiding this comment.
Code Review
This pull request introduces a new environment variable, BROKER_BINARY_PATH, to separate the native broker binary path from the external Agent Relay CLI (AGENT_RELAY_BIN), preventing conflicts where the broker was incorrectly invoked for cloud session operations. It also adds capability checks to verify if the configured AGENT_RELAY_BIN supports cloud sessions. The review feedback correctly identifies a potential execution failure on Windows when calling execFile on CLI wrappers without shell: true, and suggests combining stdout and stderr to make the CLI capability check more robust.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: be0663af87
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
b32171f to
114dd8f
Compare
Summary
BROKER_BINARY_PATHAGENT_RELAY_BINfor a distinct executable that proves theagent-relay cloud sessioncapabilityAGENT_RELAY_BINentirely when no valid capability-probed CLI exists; never emit an empty-string overrideAGENT_RELAY_BINas a legacy Pear broker input only when no explicitBROKER_BINARY_PATHis configuredRoot cause
Pear injected the native
agent-relay-brokerpath into spawned workerAGENT_RELAY_BIN. Relayfile defines that variable as the external Agent Relay CLI used to refresh delegated cloud credentials. When a delegated token expired, Relayfile therefore ranagent-relay-broker cloud sessionand could not re-mint the credential even though a compatible Agent Relay CLI was available.An empty-string replacement is also incorrect: it emits an explicit override instead of allowing downstream PATH/default discovery. The spawned environment now contains
AGENT_RELAY_BINonly for a distinct executable whose help output proves the cloud-session command contract.Regression coverage
Red-first Step 2 proof on the rebased branch failed exactly as expected: the native-broker case received
""where the new assertion expectedundefined; the valid CLI companion test remained green.The final tests prove both sides:
BROKER_BINARY_PATH; the spawned env does not own anAGENT_RELAY_BINproperty and reads it asundefined.cmdCLI wrappers are capability-probed through shell dispatch, with stdout and stderr combined independently of exit statusComposition
Rebased onto Pear main
02c5cc2a, which includes #397 and published AgentWorkforce 4.1.16 consumption. The Workforce broker-first precedence and this Pear env separation now validate together.Local validation
npm ciin the worktree;node_modulesis not a symlinknpm run verify:mcp-resources-driftnpm run lintnpm run typechecknpm test: 128 passednpx vitest run: 35 files, 527 passednpm run buildgit diff --checkAll green locally. Hosted checks and reviewers are monitored before final signoff.