Repository navigation
fix(app): find the Mac plugin under its old id and stop waiting after two minutes - #1832
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
| Layer / File(s) | Summary |
|---|---|
Plugin identity and discovery app/mac/Sources/OvisMac/Run.swift, app/mac/Sources/OvisMac/Model.swift |
The app checks the current plugin ID and then the legacy ID. It stores the discovered ID and root, then reads status from that root. |
Plugin commands and server startup app/mac/Sources/OvisMac/Model.swift, app/mac/Sources/OvisMac/Run.swift, changelog.d/mac-app-old-plugin-id.md |
Restart and uninstall use the discovered plugin ID. Commands support timeouts. After restart, the app polls for up to 120 seconds and reports whether the plugin is missing or the server did not start. |
Retry the failed step app/mac/Sources/OvisMac/Model.swift, app/mac/Sources/OvisMac/OvisMacApp.swift |
The retry method runs restart when retrying a restart failure and install otherwise. The failed-state button calls this method. |
Priority:
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix
Possibly related PRs
- devswha/ovis#1691: Changes installer plugin-ID selection, which is related to the Mac app’s current and legacy plugin-ID discovery.
Merge Risk: 
Minimal · up to 2ed5e
-
The Mac app now finds the plugin under either ID, shows a visible failure with log details when the server does not start, and retries the failed step. No concrete merge-blocking defect was established. Hardening the timeout to force-kill hung processes is optional follow-up.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passedFull details: Docstring Coverage
-
Explanation
Docstring coverage is 45.45% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 3 files. (1 skipped: 1 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches: 💡 1
-
📝 Generate docstrings: 💡
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- 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.
Comment @coderabbitai help to get the list of available commands.
|
Merge pass review-work for a31aa30: REVIEW FAILED on one small mismatch between the description and the code. The fix itself is right. Blocker: the missing-plugin failure doesn't show the log tail the description promises.
Checked and passing:
Not verified here: the full install-to-QR flow from the published dmg. That rests on the author's eamac run. |
…nd retry the step that failed
|
Pushed 2ed5ef9 for the merge pass review and the agent reviews:
|
|
|
There was a problem hiding this comment.
🔇 Additional comments: 2
app/mac/Sources/OvisMac/Model.swift-87-87: 1
87-87:Major · Stability & Availability · Quick win
⚠️ Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.Bound both plugin actions before the startup wait.
If either stop or start hangs,
restart()remains insiderun()and never reacheswaitUntilRunning(). The screen stays on “Restarting…” without reaching the new failure state or Try again button. Give both actions a suitable timeout and handle a timed-out result.Also applies to: 91-91
app/mac/Sources/OvisMac/Run.swift-120-123: 1
120-123:Major · Stability & Availability · Heavy lift
⚠️ Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.Make the timeout finish when a process ignores SIGTERM.
If a timed
herdrorbuncheck ignores SIGTERM,process.terminate()does not end it. The termination handler then cannot resumerun(), so the app can remain on a checking or restarting screen indefinitely. Add a bounded grace period and force termination if the process remains running. Apple documents thatterminate()sends SIGTERM and may not stop a process that ignores it. (developer.apple.com)

Review info
-
Run configuration-
- Source mode: Auto
- Repository: devswha/ovis
- Branch: fix/mac-app-old-plugin-id
- File: .coderabbit.yaml
- Commit: 2ed5ef9
- Layers: Repository YAML
- Review profile: CHILL
- Plan: Advanced
- Run ID:
8b7772de-f489-4b53-a391-fb1c818acc64
Files selected for processing: 4-
app/mac/Sources/OvisMac/Model.swiftapp/mac/Sources/OvisMac/OvisMacApp.swiftapp/mac/Sources/OvisMac/Run.swiftchangelog.d/mac-app-old-plugin-id.md
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.
-
|
Pushed 91db4c4 for CodeRabbit's two additional comments:
|
|
Merge-pass review-work report. Overall: PASSED.
Build: Behaviour checked:
Follow-ups (MINOR):
Not verified here: the native install-to-QR flow, timeout and retry. The author reports running them on eamac. All required checks are green, and no review thread is open. CodeRabbit did not review this PR (rate-limited or skipped). The reviews above stand in for it. |
…emove (#1877) Restart in Ovis for Mac stops the Ovis server and leaves it stopped. **Cause.** `restart()` ran `herdr plugin action invoke <id>.stop` and then `<id>.start`. That command only queues the action, so the start ran while the old server was still up and failed with "the server stopped (exit 1) before it answered /api/health", and then the stop finished. Reproduced on the test MacBook Air (eamac) with the app from #1832: herdr's plugin log showed the start failing before the stop finished, and `/api/access` stayed unanswered. Start, from "Not running", goes through the same path. **Fix.** - Restart and Start run `bun <plugin root>/scripts/plugin.ts stop` and then `start`, waiting for each (60 s each, with `LC_CTYPE=UTF-8` as the login item gives herdr), instead of queueing herdr actions. - Remove waits for the same stop before `herdr plugin uninstall` removes the plugin's files. **Checked on eamac (macOS 27.0.1), real home, plugin under the old id, herdr running:** - Restart: the server pid changed (46160 → 69037), `/api/access` answered 200 within 3 s, and the window stayed on "Running on this Mac" with the QR code. - Start from "Not running": running with the QR code in under 7 s. - Remove (then confirm): the server stopped, the plugin and `tailscale serve` were removed, the login item was deleted, and herdr kept running. Install afterwards brought it back, with the QR code in 21 s. Reviewed by omo-native-code-reviewer (APPROVE; its LOW points on the locale and the comment are applied, and the same race in Remove is fixed here). The app has no Swift tests; `swift build` (arm64 and x86_64) passes on eamac and `bun run check fast` passes. Co-authored-by: mp <mp@local>
Ovis for Mac stays on "Starting herdr…" forever after a successful install.
Cause. The latest release, v0.4.13, installs the herdr plugin under its old id,
devswha.herdr-web-ui(install.sh keeps that id for 0.4.13 and older on purpose). The app only looks fordevswha.ovis, so after install.sh finishes it pollsherdr plugin listfor two minutes, never finds the plugin, and then drops back to the Install screen, even though the server answers on 7317. The maintainer hit this on his MacBook Pro with the published, notarized Ovis.dmg, and it reproduces on the test MacBook Air (eamac).Fix.
waitUntilRunningends in a clear failure instead of falling silently back to Install: "herdr does not list the Ovis plugin" or "The Ovis server did not start within two minutes", with the tail of~/Library/Logs/Ovis/herdr-server.log, and the Try again / Copy the log / Get help buttons.Checked on eamac (macOS 27.0.1), real home, herdr already running:
devswha.herdr-web-ui0.4.13,tailscale serveon 443) → the app sits on "herdr를 시작하는 중…" from 20:04:27 on.https://ea-macbookair.example.ts.netat once.The app has no Swift tests;
swift buildpasses on eamac andbun run check fastpasses.