You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(preview): leave a PC's released Ovis alone when the preview reaches it over SSH - #4802
The Mac preview build (staging profile, #4765) runs its own Ovis in a home of its own (~/.ost). A setup over SSH reads the PC's normal registry (~/.config/herdr-web-ui/bridges), so the Ovis it finds there is always another, released install. The preview picked that Ovis, offered its own update (to the newest release of that Ovis's own channel, e.g. v0.5.10-beta.7 for a desktop app on the beta channel) and, in an account add, would take it into the preview's staging account. The maintainer hit this on a preview build: "This PC runs its own Ovis v0.5.1, older than this app. Update it to v0.5.10-beta.7 to reconnect".
Change
app/electron/src/stagingProfile.ts: the staging profile also sets OVIS_PREVIEW_PROFILE=1 (an explicit value wins, like the other staging defaults).
server/core/status.ts passes it to MachineManager as previewProfile.
server/machines.ts: with previewProfile, a setup over SSH never chooses, discovers, connects to or updates a PC's own Ovis (target.own_ovis, the own-Ovis candidates, a live non-managed descriptor on the expected socket, and one that registers there while the bridge starts all end in a setup action with a plain message); an account add over SSH and a PC install are refused up front. Servers without the flag are unchanged.
Validation
New tests in server/machine-own-update.test.ts (preview: no connect, no update request, no install; no account add over SSH) failed before the change and pass after; server/machine-own-update.test.ts server/machine-account-add.test.ts server/machine-core-choice.test.ts server/machine-herdr-choice.test.ts: 151 pass. app/electron: src/stagingProfile.test.ts src/children.test.ts pass.
Real PC: an isolated server from this branch with the staging environment added the test MacBook Air (eamac, which runs its own Ovis 0.4.22) over SSH. Without the flag it showed own_ovis_older ("This PC runs its own Ovis v0.4.22, older than this app. Update it to v0.5.9 …"); with OVIS_PREVIEW_PROFILE=1 it stopped with the new message, sent no update request, and the account add returned 400. The Ovis on that Mac kept running untouched.
bun run check fast (TMPDIR under home): passed (typecheck, build, unit 28809 pass / 0 fail).
Skipped: integration and browser lanes, a packaged preview DMG run (the env reaches the server through the existing serverEnv pass-through).
Reviews
Codex (gpt-6.2-sol-fast, xhigh), one pass. MEDIUM: an Ovis registering on the socket during bridge startup was adopted -> now refused in the startup poll. MEDIUM: PC install started the released Ovis -> install refused in a preview. LOW: a descriptor without managed_remote -> the check now uses !managed_remote. LOW (not changed): a stale released descriptor still sets ownOvisAt before the liveness check, so a saved PC's automatic reconnect can wait as "Ovis away"; a manual reconnect clears it.
No UI control is added; the only visible change is the message on the PC's card in a preview build.
…es it over SSH
The Mac preview (staging profile) runs its own Ovis in a home of its own (~/.ost), so the Ovis a setup finds on a PC over SSH is always another, released one. The preview used to pick it, offer its own update (to the newest release of that Ovis's own channel) and, in an account add, take it into the preview's test account. The staging profile now passes OVIS_PREVIEW_PROFILE=1, and a server with it neither connects to nor updates a PC's own Ovis, and adds no PC to its account over SSH.
Review note (Codex LOW, left as is): a stale released descriptor still sets ownOvisAt through learnServer before the liveness check, so in a preview a saved PC's automatic reconnect can wait as "Ovis away" once that released Ovis has stopped and left its registration behind. A manual reconnect clears it. Not reproduced on a real PC; noted here only.
Merge waits for the 0.5.10 Release run to finish (this PR touches server/).
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.
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.
Summary
Summary by CodeRabbit
Bug Fixes
The Mac preview app now leaves independently managed released Ovis installations on other PCs untouched. It won’t offer to update them, add them to the preview account, or install Ovis on another PC over SSH.
Setup skips these installations and refuses requests to manage them, preventing remote operations from being initiated.
The staging profile enables preview mode by default. In that mode, MachineManager refuses specified remote installation and account-add operations and rejects independently managed Ovis servers during setup.
Changes: Preview profile isolation
Layer / File(s)
Summary
Enable and pass preview mode app/electron/src/stagingProfile.ts, app/electron/src/stagingProfile.test.ts, server/core/status.ts
The staging profile defaults OVIS_PREVIEW_PROFILE to "1" when unset. createStatusHub enables the MachineManager preview option when the value is "1". Tests cover the default and preservation of an explicit value.
Refuse remote operations in preview mode server/machines.ts, server/machine-own-update.test.ts, changelog.d/preview-leaves-own-ovis-alone.md
In preview mode, MachineManager refuses installation and SSH account-add requests and rejects independently managed Ovis servers during setup. Tests cover these restrictions. The changelog documents the preview behavior.
The change makes the Mac preview build leave a PC's separately installed Ovis alone over SSH. No defect was found in the preview-mode guards. The one noted limitation is that a saved PC's automatic reconnect may briefly show "Ovis away" after that Ovis has stopped, and a manual reconnect clears it. This is low impact and acceptable to merge once the release run finishes.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: a preview build leaves a PC's released Ovis alone when reached over SSH. It matches the changeset (preview-profile refusal of own-Ovis adoption and update over SSH) an…
Description check
The description follows the template. It has a Change section that describes the problem, the resulting behavior, and the files touched. It has a Validation section that lists the commands run, their …
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: a preview build leaves a PC's released Ovis alone when reached over SSH. It matches the changeset (preview-profile refusal of own-Ovis adoption and update over SSH) and is specific enough for a teammate scanning history. Length is slightly long but acceptable.
Full details: Description check
Explanation
The description follows the template. It has a Change section that describes the problem, the resulting behavior, and the files touched. It has a Validation section that lists the commands run, their results, and the checks skipped. It does not link a maintainer-agreed issue for the feature, but this is a fix, so that requirement does not apply. The HTTP/WS contract-test coverage note is missing, though the change touches server behavior and the description does not say whether contract tests apply.
Finishing Touches
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.
Reviewing files that changed from the base of the PR and between 3fbdb17 and d10f3b1.
Files selected for processing: 6
app/electron/src/stagingProfile.test.ts
app/electron/src/stagingProfile.ts
changelog.d/preview-leaves-own-ovis-alone.md
server/core/status.ts
server/machine-own-update.test.ts
server/machines.ts
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 2 remain after this review.
Merged through pr-merge at head 3f5169020. Seen before the merge was asked for: required checks green, no unresolved thread, no conflict, no hold, main not red, no release in progress. CodeRabbit said it did not review (a limit or a skip) since this head.
Reviews: dori omo review CLEAR at d10f3b1; Codex gpt-6.2-sol-fast one pass (two MEDIUMs and one LOW fixed, one LOW noted in a comment); CodeRabbit reviewed d10f3b1 with no actionable comments. The later head 3f51690 only merges main (one conflict in server/core/status.ts resolved by keeping main's line plus this PR's previewProfile option), so CodeRabbit did not review it. Merged on Dori's word after the 0.5.10 release.
Release 0.5.11 from `main` on the maintainer's go in the Dori session
2026-11-26 ("그냥 0.5.11 로 내봐 겸사겸사 테스트해보지뭐"). Its reason: phones whose
WebView reports offline while on Wi-Fi (seen on a Galaxy Z Flip6) could
not open a PC in 0.5.10's shell, on app.ovis.sh and in the Android 1.0.7
(15) build (#4810). It ships what `main` holds at 60797c2 (c642249,
then #4789 and #4801, folded by hand), including the terminal without
xterm.js (#4778, #4781).
- `package.json` and `herdr-plugin.toml`: 0.5.10 -> 0.5.11.
- `REMOTE_BUNDLE_VERSION` 54 -> 55 (`shared/machines.ts`): `server/`
changed since `remote-v54` (#4800, #4520, #4565, #4810). After this
merges, `remote-v55` is tagged on the merge commit and **Remote PC
bundles** publishes it before the Release run.
- `CHANGELOG.md`: `bun scripts/changelog-fold.ts 0.5.11` folded 7
fragments (#4520, #4565, #4778, #4781, #4800, #4802, #4810); all by the
maintainer, so no `by @login` credits.
- `release-summaries.json`: 0.5.11 in en, ko, ja and zh: 2 new, 2
improved, 1 fixed; each English line at most 70 characters.
- Android 1.0.8 (16) (`app/android/app/build.gradle`,
`app/store/android.md`): the store build is made from the v0.5.11 tag.
1.0.7 (15) stays on internal testing and is not sent to review.
## Checklist
1. Account service: no commits after 26eabfd, which production already
runs (migrations up to 0039, Worker e3f7c17c). No deploy.
2. Relay: `relay/` and `shared/relay-pass.ts`,
`shared/relay-server-proof.ts` are unchanged since v0.5.10. No deploy.
3. `MIN_SUPPORTED_CLIENT_VERSION` stays 0.4.20; the account's list
switches stay off.
4. Right before merging, fold any fragment merged after this head,
freeze merges, then `remote-v55`, then Release `0.5.11`.
## Contract diff v0.5.10..main
No HTTP route, WebSocket message `type`, relay frame, `WIRE_VERSION`,
`RELAY_PROTOCOL` or `BRIDGE_PROTOCOL` changed. `shared/` changed only in
a comment (`shared/web-policy.ts`); `server/` changed in agent status
and push internals (#4800), the Windows herdr start task's priority
(#4565), a remote-PC hint string (#4520) and `server/dsh.ts` (one line).
Read with `git diff v0.5.10 origin/main -- shared/ server/`; no skew
test was run.
## Validation
- `bun run check fast` at 26e43e6: every step ok (unit: 28740 pass, 0
fail, 259 skip).
- `bun scripts/release-guards.ts --base origin/main`: "Release 0.5.11:
remote bundle, telemetry Worker and release metadata are in order."
- `bun scripts/release-notes.ts 0.5.11` renders the notes (New features
2, Improvements 2, Bug fixes 1).
- After merging `main` 7751232 (#4789): `bun run check fast` at
0f23c42, every step ok (unit: 28743 pass, 0 fail, 259 skip). After
merging 60797c2 (#4801, merged after the freeze): the release guards,
the release-notes and guard tests (60 pass) and `bun run typecheck` at
fe350b6; the whole check runs in this PR's CI.
- The first CI run failed once on
`scripts/terminal-bundled-mono-regression.ts` (failed, passed on its
retry: a flake not quarantined).
- Not run: `check full`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Mac preview build (staging profile, #4765) runs its own Ovis in a home of its own (
~/.ost). A setup over SSH reads the PC's normal registry (~/.config/herdr-web-ui/bridges), so the Ovis it finds there is always another, released install. The preview picked that Ovis, offered its own update (to the newest release of that Ovis's own channel, e.g.v0.5.10-beta.7for a desktop app on the beta channel) and, in an account add, would take it into the preview's staging account. The maintainer hit this on a preview build: "This PC runs its own Ovis v0.5.1, older than this app. Update it to v0.5.10-beta.7 to reconnect".Change
app/electron/src/stagingProfile.ts: the staging profile also setsOVIS_PREVIEW_PROFILE=1(an explicit value wins, like the other staging defaults).server/core/status.tspasses it toMachineManageraspreviewProfile.server/machines.ts: withpreviewProfile, a setup over SSH never chooses, discovers, connects to or updates a PC's own Ovis (target.own_ovis, the own-Ovis candidates, a live non-managed descriptor on the expected socket, and one that registers there while the bridge starts all end in asetupaction with a plain message); an account add over SSH and a PC install are refused up front. Servers without the flag are unchanged.Validation
server/machine-own-update.test.ts(preview: no connect, no update request, no install; no account add over SSH) failed before the change and pass after;server/machine-own-update.test.ts server/machine-account-add.test.ts server/machine-core-choice.test.ts server/machine-herdr-choice.test.ts: 151 pass.app/electron:src/stagingProfile.test.ts src/children.test.tspass.eamac, which runs its own Ovis 0.4.22) over SSH. Without the flag it showedown_ovis_older("This PC runs its own Ovis v0.4.22, older than this app. Update it to v0.5.9 …"); withOVIS_PREVIEW_PROFILE=1it stopped with the new message, sent no update request, and the account add returned 400. The Ovis on that Mac kept running untouched.bun run check fast(TMPDIR under home): passed (typecheck, build, unit 28809 pass / 0 fail).serverEnvpass-through).Reviews
managed_remote-> the check now uses!managed_remote. LOW (not changed): a stale released descriptor still setsownOvisAtbefore the liveness check, so a saved PC's automatic reconnect can wait as "Ovis away"; a manual reconnect clears it.No UI control is added; the only visible change is the message on the PC's card in a preview build.