Skip to content

docs(install): preserve agent discovery in services - #1896

Merged
devswha merged 1 commit into
devswha:mainfrom
jimbb:fix/service-agent-path
Oct 25, 2026
Merged

devswha merged 1 commit into
devswha:mainfrom
jimbb:fix/service-agent-path

Conversation

@jimbb

@jimbb jimbb commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Change

A source install started directly by a service manager can have a restricted PATH that omits ~/.local/bin. The server then reports an installed Grok CLI as unavailable and the new-session picker hides it.

Document launching source services through the existing scripts/with-bun.sh, including a systemd example and the service-user/HOME requirements. Add regression tests that run a real Bun child to verify Grok discovery with a restricted PATH and preserve an explicitly selected Grok command. Add the required changelog fragment.

The existing launcher already handles this case; no application runtime changes or new dependencies are needed.

Validation

  • bun test ./scripts/with-bun.test.ts: 21 passed, including the two new Grok cases.
  • UNIT_TEST_WORKERS=2 bun run check fast: passed workflow syntax, generated types/themes, typechecking, production build and the unit suite (6,410 passed, 0 failed, 13 skipped across 455 files). The verification report marks the checked source state as verified.
  • Applied the existing launcher to the affected local systemd service and restarted the web UI. Authenticated /api/agents changed Grok from installed: false to installed: true; /api/health returned ok: true.
  • No live model conversation or native macOS/Windows run. Local Node is 24; CI pins Node 22.

@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: devswha/ovis
  • Branch: main
  • File: .coderabbit.yaml
  • Commit: 63af5d5
  • Layers: Repository YAML
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 835a0bd0-da5a-476b-bd27-f24a06a50abf

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: devswha/ovis
  • Branch: main
  • File: .coderabbit.yaml
  • Commit: 4c8ce30
  • Layers: Repository YAML
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 801aaf1e-be26-4ab7-b0d8-3ce99c152e42
Commits

Reviewing files that changed from the base of the PR and between 4c8ce30 and d4f3c3d.

Files selected for processing: 3
  • INSTALL.md
  • changelog.d/source-service-agent-path.md
  • scripts/with-bun.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

📝 Summary

Summary by CodeRabbit

  • Documentation
    • Clarified how to run Ovis as a Linux or macOS service so it can find agents installed by the same user, even when the service has a restricted PATH.
    • Added guidance to restart the web UI after changing service configuration. The new-session picker only shows agents the server can find.

The source-install guide explains how to run Ovis under a service manager with the existing scripts/with-bun.sh launcher and the agent-owning user's HOME. Two tests check user-local agent discovery and PATH command precedence.

Changes: Service agent discovery

Layer / File(s) Summary
Service PATH guidance and launcher checks
scripts/with-bun.test.ts, INSTALL.md, changelog.d/source-service-agent-path.md
Tests check that Bun finds grok in ~/.local/bin when it is absent from PATH, and prefers the PATH executable when both locations contain it. The installation guide and changelog describe service setup and agent discovery.

Priority: Normal

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other

Possibly related PRs

  • devswha/ovis#1690: Defines how /api/agents reports installed agents from commands found on the server PATH.

Suggested reviewers: devswha

Merge Risk: Minimal · up to d4f3c

The documented service setup and regression tests align with the launcher’s agent-discovery behavior.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: preserving agent discovery for source installs running under service managers.
Description check Passed The description includes both required sections, explains the problem and resulting behavior, documents the implementation scope, and lists relevant validation results and limitations.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
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.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files. (2 skipped: 2 unsupported.)

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@devswha
devswha force-pushed the fix/service-agent-path branch from d4f3c3d to 3d66655 Compare October 25, 2026 02:38
@devswha

devswha commented Oct 25, 2026

Copy link
Copy Markdown
Owner

Rebased onto main a1e4f8b83, resolving the INSTALL.md conflict by keeping both the newer Rust PTY host instructions and this service-launcher guidance.

  • Checked scripts/with-bun.sh and scripts/bun-path.sh: the launcher appends existing user-local directories after PATH and executes Bun with that environment. The service-user/HOME guidance and preservation of an explicitly chosen command match the implementation.
  • Launcher, docs/conventions and changelog tests: 60 passed, 0 failed, including the real Bun-child Grok discovery and PATH-precedence cases. No runtime changes or live service restart were needed.

The conflict-resolution rebase is pushed; the merge decision stays with the maintainer.

Review prepared with a code-review agent and checked against the code. The merge decision stays with the maintainer's merge pass.

@devswha

devswha commented Oct 25, 2026

Copy link
Copy Markdown
Owner

Merge pass review-work report. This is an outside-contributor PR, and the maintainer approved merging it in this pass. The ext-pr-review lane verified it, and its comment is above. Overall: PASSED (docs and tests only).

Lane Verdict
Code review (omo-native-code-reviewer) PASS

The INSTALL.md text matches scripts/bun-path.sh, which appends user-local folders after PATH, never before it. The two new with-bun tests check that the launcher's PATH reaches the Bun lookup that server/agents-routes.ts:48 uses. The fragment is valid. Tests pass (33).

CodeRabbit did not review this PR (rate-limited or skipped). The reviews above stand in for it.

@devswha
devswha merged commit 35b629a into devswha:main Oct 25, 2026
11 checks passed
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.

2 participants