fix(harness-driver): resolve installed broker under mise launchers - #1426
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe broker resolver now canonicalizes launcher references and searches installer-managed locations after PATH lookup. Tests cover symlinked launchers, fallback binaries, PATH precedence, legacy installation paths, and ChangesBroker resolution
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant NodeUp as agent-relay node up
participant Resolver as broker-path resolver
participant Path as PATH
participant Installer as Relay installer locations
NodeUp->>Resolver: resolve broker binary
Resolver->>Path: check broker executable
Path-->>Resolver: path or not found
Resolver->>Installer: check canonical launcher and user locations
Installer-->>Resolver: path or not found
Resolver-->>NodeUp: return broker binary path
Possibly related PRs
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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 |
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@CHANGELOG.md`:
- Line 8: Update the unreleased changelog heading from “## [Unreleased - Patch]”
to “## [Unreleased]”, leaving release-level labeling for the released version
heading.
In `@packages/harness-driver/src/broker-path.ts`:
- Around line 120-127: Update getInstalledBinaryPaths to also add broker sibling
candidates derived from realpathSync(process.argv[1]) and
realpathSync(process.execPath), while retaining the existing symlink-path
candidates and uniqueness handling. Add a regression test covering a symlinked
launcher with an unavailable optional package, verifying the canonical-target
sibling broker is found.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: f005fdb4-44d2-42b3-b651-f7ff3feca8cc
📒 Files selected for processing (3)
CHANGELOG.mdpackages/harness-driver/src/broker-path.test.tspackages/harness-driver/src/broker-path.ts
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 40a7100f0b
ℹ️ 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".
There was a problem hiding this comment.
All reported issues were addressed across 3 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Summary
Bug A evidence
Before, a clean globally installed CLI with its optional broker packages unavailable and a minimal PATH failed with:
After deploying this harness-driver build into the same install,
agent-relay node up --no-spawn --backgroundstarted PID 95430,node statusreported RUNNING and Node delivery CONNECTED, andfleet nodes --name no-optional-afterreported the node online/live. The temporary node was stopped afterward.Bug B investigation
No Bug B code is included. The original failing target was a different remote mini in a separate workspace; that node and exact invocation are unavailable. Targeted fleet spawn succeeded end to end against the currently available
relaynode from standalone 11.4.0, clean npm 11.4.0, and mise npm 11.2.0 clients; all three workers appeared innode agent listand were released.The trace found two important diagnostics for a future reproduction:
Validation
npx vitest run packages/harness-driver/src/broker-path.test.ts packages/cli/src/cli/commands/fleet.test.ts(25 passed)npm run typechecknpx prettier --check packages/harness-driver/src/broker-path.ts packages/harness-driver/src/broker-path.test.ts CHANGELOG.mdnpm pack --dry-runin packages/harness-drivergit diff origin/main...HEAD --check