Skip to content

fix(roborev): expose Bun agents to daemon - #2361

Merged
shunkakinoki merged 3 commits into
mainfrom
codex/roborev-droid-path
Aug 12, 2026
Merged

fix(roborev): expose Bun agents to daemon#2361
shunkakinoki merged 3 commits into
mainfrom
codex/roborev-droid-path

Conversation

@shunkakinoki

@shunkakinoki shunkakinoki commented Aug 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • add the Bun global binary directory to the declarative RoboRev service PATH
  • make the installed Droid CLI discoverable by the Kyber systemd user service
  • cover launchd and systemd service-path contracts independently in ShellSpec

Kyber already has Droid at /home/ubuntu/.bun/bin/droid, but the live roborev.service PATH omits /home/ubuntu/.bun/bin. RoboRev therefore marks Droid unavailable and resolves the panel member named droid to its configured Gemini backup.

Bead: shunkakinokisoftware-vwlj

Before / after

Layer Before After activation
Kyber RoboRev PATH Nix and local bins only Includes /home/ubuntu/.bun/bin
Droid panel member Resolves to Gemini backup Resolves to the installed Droid CLI
Host configuration Live unit differs from interactive shell capability Declarative unit matches the installed runtime

Breaking and rollback

  • Behavioral: RoboRev will use Droid instead of Gemini for the droid panel member when Droid is installed.
  • Compile-time: none.
  • Durable state: none.
  • Rollback: revert the PATH entry and reactivate Home Manager.

Deliberate boundaries

  • This PR does not mutate the live Kyber unit manually; activation remains declarative after merge.
  • It does not add Bun's internal node_modules/.bin: the stable Droid shim is in ~/.bun/bin, and that exact future environment passed an authenticated probe.
  • It does not change RoboRev's reviewer failure policy or Gemini quota classification; those are separate concerns.

Verification

  • shellspec spec/activate_roborev_spec.sh — 13 examples, 0 failures
  • make nix-format-check
  • make nix-lint
  • HOST=kyber HOSTNAME=kyber nix eval --json .#homeConfigurations.kyber.config.systemd.user.services.roborev.Service.Environment --impure --no-update-lock-file
    • evaluated PATH contains /home/ubuntu/.bun/bin
  • minimal Kyber droid exec under the future unit environment returned exactly OK, confirming current authentication
  • git diff --check

Entire-Checkpoint: a2611cd19861
@indent-zero

indent-zero Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Warning

Indent Zero is shutting down on August 7th. Please migrate over to Indent 2.0 to continue getting PR reviews.

PR Summary

Adds ${homeDir}/.bun/bin to the RoboRev daemon's PATH on both macOS (launchd) and Linux (systemd) so Bun-installed agent CLIs like droid are discoverable when the daemon spawns agent-hook processes. Without this, launchd/systemd don't inherit the user shell's PATH and droid (declared in package.json, shim lives in ~/.bun/bin) fails to launch. Matches the pattern already used by the qmd and openclaw home-manager services.

  • home-manager/services/roborev/default.nix: inserts ${homeDir}/.bun/bin between ~/.local/bin and /etc/profiles/... in the launchd EnvironmentVariables.PATH and the systemd Service.Environment PATH, preserving the existing precedence so ~/.local/bin/roborev is not shadowed.
  • spec/activate_roborev_spec.sh: after two rounds of tightening (commits ad4ce32b, 33e54a0b), the spec now has two independent It blocks — one asserting the launchd PATH = "..." line and one asserting the systemd "PATH=..." line — each verifying ${homeDir}/.bun/bin is present in that specific service block, so a regression in either PATH would produce a clear, targeted failure.

Issues

All clear! No issues remaining. 🎉

1 issue already resolved
  • Daemon PATH omits ${homeDir}/.bun/install/global/node_modules/.bin, which the bash/zsh/fish profiles include alongside ~/.bun/bin; fine for droid today (its shim lives in ~/.bun/bin), but any Bun global that only exposes its binary via the hoisted node_modules/.bin would remain invisible to the daemon.

CI Checks

Waiting for CI checks...

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes

    • RoboRev services now locate Bun-installed agents when launched on Darwin and Linux systems.
  • Tests

    • Added coverage to verify the service PATH includes the Bun binary directory.

Walkthrough

RoboRev launchd and systemd services now include ${homeDir}/.bun/bin in their PATH values. A ShellSpec test verifies the configuration.

Changes

RoboRev Bun PATH support

Layer / File(s) Summary
Daemon PATH and validation
home-manager/services/roborev/default.nix, spec/activate_roborev_spec.sh
The launchd and systemd RoboRev services add ${homeDir}/.bun/bin to PATH. The activation specification verifies the path entry.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

Poem

A rabbit hops where Bun paths grow,
RoboRev finds the tools it needs to know.
Launchd and systemd share the trail,
A ShellSpec check confirms without fail.
~/.bun/bin now joins the flow!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Title check ✅ Passed The title clearly and concisely states that the RoboRev daemon will expose Bun-installed agents.
Description check ✅ Passed The description accurately explains the PATH change, affected services, behavior, tests, and deliberate scope boundaries.
✨ 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 codex/roborev-droid-path

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.

Comment thread home-manager/services/roborev/default.nix

@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 `@spec/activate_roborev_spec.sh`:
- Around line 76-79: Update the test “includes Bun-installed agents in the
daemon PATH” so it verifies both service PATH entries contain
`${homeDir}/.bun/bin`, either by asserting two matches or by checking the
launchd and systemd blocks separately; do not rely on a single whole-file grep
match.
🪄 Autofix

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: ba3226ad-2a96-4000-bb9a-7b6266d37fad

📥 Commits

Reviewing files that changed from the base of the PR and between 2bdaef4 and e1913b3.

📒 Files selected for processing (2)
  • home-manager/services/roborev/default.nix
  • spec/activate_roborev_spec.sh

Comment thread spec/activate_roborev_spec.sh Outdated
Entire-Checkpoint: ad6a86dc1dd2

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 2 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread home-manager/services/roborev/default.nix
Comment thread spec/activate_roborev_spec.sh Outdated
Entire-Checkpoint: 2905cb705a92
@shunkakinoki
shunkakinoki merged commit 7288fbb into main Aug 12, 2026
5 checks passed
@shunkakinoki
shunkakinoki deleted the codex/roborev-droid-path branch August 12, 2026 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant