Skip to content

feat(runtime-move): install herdr-core from Settings, then offer the move - #3205

Merged
devswha merged 2 commits into
mainfrom
feat/move-install-core
Nov 6, 2026
Merged

devswha merged 2 commits into
mainfrom
feat/move-install-core

Conversation

@devswha

@devswha devswha commented Nov 6, 2026

Copy link
Copy Markdown
Owner

What

Settings > About offered "Move everything to herdr-core" (#3161) only on a PC that already had
herdr-core installed. Most people on herdr's TUI never installed it, so they never saw the row.

Now, on a herdr PC without herdr-core (plugin launcher, Linux/macOS, x64/arm64, no Herdr app), the
row reads Install herdr-core and move everything. One press:

  1. downloads herdr-core 0.1.17 (pinned, the same hc the desktop app carries),
  2. checks it against the pinned SHA-256 from releases.herdr.dev/core/0.1.17/manifest.json,
  3. unpacks only herdr-core and checks that it answers --version as hc 0.1.17 (the only hc
    command that never starts a core),
  4. puts it in ~/.local/bin/herdr-core the way herdr-core's own installer does (staged file,
    then link(), so a herdr-core that is already there, or appears meanwhile, is never
    replaced), and links hc beside it only when no hc exists,
  5. looks for hc again, then opens the existing move preview. Nothing moves until "Move everything".

No sudo, no core is started, herdr's TUI and its config are not touched, and #3161's
all-or-nothing move is unchanged. Any failure leaves ~/.local/bin as it was and shows the reason
under the row.

POST /api/runtime/move/install has the move's own gate: a driving device, from the app's own
page (x-herdr-update), only while the move answer offers install.
GET /api/runtime/move adds install: { version } to the no_herdr_core answer (additive).

Design: the install happens in place from the row that needs it, as Ovis's own Agents page installs
a missing agent CLI (server/agent-catalog-install.ts), in the existing Settings row style; no new
banner. The row's sentence stays visually hidden on the bare About page like its neighbours; a
failure shows under the label (condition).

Validation

  • Failing first: the three new test files fail on origin/main's code (row missing, route 404,
    module missing) and pass with this change.
  • server/herdr-core/install.test.ts: installs a release-shaped stand-in archive; refuses a
    checksum mismatch, a program that does not answer as that hc, an existing herdr-core, and a PC
    with no build, each leaving ~/.local/bin empty or untouched; pins equal
    app/electron/scripts/runtimes.ts.
  • server/runtime-move-install.contract.test.ts: offer shown only where herdr-core is all that is
    missing; 403/401 without the page header or auth; a failed install keeps the offer (502); a
    done install is not offered again.
  • src/components/RuntimeMove.test.tsx: the row shows the version, posts the install, shows the
    failure reason and re-enables the button.
  • Real install on an isolated HOME (env -i HOME=<tmp>, isolated herdr test session, telemetry
    off) through the built page: the real 0.1.17 archive from releases.herdr.dev installed into
    <tmp>/.local/bin/herdr-core (+ hc link), answered hc 0.1.17, no core was started
    (running: false), the move preview opened; this PC's real ~/.local/bin was untouched.
  • bun run check fast: all ok (workflow syntax, generated types/themes, typecheck, build, unit tests).
  • Not run: full integration/browser suites (CI runs them).

@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 42 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 6dfcc17 and 8dbd03b.

Files selected for processing: 16

  • changelog.d/move-install-herdr-core.md
  • docs/runtime-move.md
  • server/dispatch.ts
  • server/herdr-core/discovery.ts
  • server/herdr-core/install.test.ts
  • server/herdr-core/install.ts
  • server/index.ts
  • server/runtime-move-install.contract.test.ts
  • server/runtime-move-service.ts
  • shared/runtime-move.ts
  • src/components/RuntimeMove.test.tsx
  • src/components/RuntimeMove.tsx
  • src/lib/api.ts
  • src/lib/i18n/runtime-move.ja.ts
  • src/lib/i18n/runtime-move.ko.ts
  • src/lib/i18n/runtime-move.zh.ts
  • 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

…wnload while it streams, undo an install Ovis cannot find
@devswha

devswha commented Nov 6, 2026

Copy link
Copy Markdown
Owner Author

Reviews

  • omo (dori review) at e2e1941: CLEAR.
  • Codex (gpt-6.1-terra, adversarial) at e2e1941: no HIGH. No auth/CSRF bypass, no checksum bypass, nothing starts a core or touches herdr's TUI. Findings and what was done:
    1. MEDIUM, fixed in 8dbd03b: an install that a later check rejected (for example a home mounted noexec, or the server's own look for hc failing) left ~/.local/bin/herdr-core behind, and every retry was then refused. The staged copy is now asked --version in ~/.local/bin itself before it is linked into place. If the server still cannot find it, Ovis removes exactly what it installed (matched by dev, inode, size and mtime, so a file someone put there meanwhile stays), and the row offers the install again. Test: "takes out only what it installed when undone".
    2. MEDIUM, fixed in 8dbd03b: the 64 MiB cap was checked only after the whole body had been buffered. The body is now read as it streams and refused once it passes the cap. Test: "stops reading a download past the size cap".
    3. LOW, fixed in 8dbd03b: when an install succeeded but its answer was lost, the row stayed on "Install". After any install error, the row now reads the plan again.
    4. LOW, left as is: if Settings > About opens during the server's first look for hc (a few seconds after start), the row stays hidden until About is opened again. No follow-up issue (LOW).

check fast at 8dbd03b: all ok.

@devswha
devswha merged commit 0997040 into main Nov 6, 2026
29 of 31 checks passed
@devswha

devswha commented Nov 6, 2026

Copy link
Copy Markdown
Owner Author

Merge note (merge pass) at head 8dbd03b:

  • Merged on GitHub's required checks, all green on this head (Fast checks, Integration and browser, Native Windows install).
  • omo review receipt: CLEAR at this exact head. Unresolved review threads: 0 (GraphQL). CodeRabbit: neutral; no CodeRabbit review ran on this head.
  • Downloads and runs a binary, so the merge pass ran its own strict supply-chain pass at this head. Holding: the four Linux/macOS archive URLs and SHA-256 pins are hard-coded and match the desktop app's pins (a test checks parity); the archive is hashed before it is unpacked or run; only the herdr-core member is extracted, into a fresh temporary folder; it is published with a same-directory hard link, which fails if anything (including a symlink) is already there; the install route needs a full drive principal (not open access or watch-only) and the custom-header/same-origin checks. Recorded, not reproduced (they need another local user able to write this user's ~/.local/bin or an earlier PATH directory, which already means that user controls the account): the staged file is written without O_EXCL/O_NOFOLLOW and probed by path before linking; after install, discovery takes the first herdr-core that answers 0.1.17 rather than the one installed. Also recorded: redirects are followed before the checksum rejects a different archive (redirect: "error" would be cheap hardening); a cleanup failure after the link reports a failed install while the binary stays.

@devswha
devswha deleted the feat/move-install-core branch November 6, 2026 16:40
devswha added a commit that referenced this pull request Nov 6, 2026
…d 0.5.0 connection docs (#3223)

## What

Docs only. The privacy policy and the user docs now say what the account
service and the relay's direct connections do in this release.

**Privacy policy** (`ovis-site/privacy/`, `ovis-site/ko/privacy/`, new
date):
- **Your account**: sign-in with GitHub or Google (what
`account.ovis.sh/v1/providers` offers today). It keeps one hashed
provider ID per sign-in method and when it was added. It keeps no email,
name, username or provider token, and never joins accounts on a matching
email. A sign-in lasts 60 days from its last use, and the account
doorbell's push subscription is kept per device.
- **Who is asking** (#3203, ovis-sh/account#9): join requests and link
page requests keep the system the device says it runs and the country
and city Cloudflare saw. They never keep the IP address. They are handed
out for 10 minutes and deleted within about a day. The service keeps no
logs with addresses. Sign-in methods can be removed in Settings.
- **New "Direct connections" section**: on whenever the relay is on, and
turned off with the Same Wi-Fi direct connection switch. It covers what
the PC listens on (port 7319 or another free port, on its home network
addresses and its Tailscale address, never a public one), who can
connect (only devices already paired through the relay, the same key and
encryption, nothing pairs, web pages refused, Tailscale peers only on
the Tailscale address), what others on the network see (sizes and
timing), and how the app picks a route. The phone keeps the direct
addresses with the pairing, and the In short box and the network section
mention it.
- **PCs on your Tailscale**: it reads `tailscale status` and asks only
your own login's PCs. Nothing goes to us.

**docs/guide.md**:
- On your phone gets **Which way the app connects**. It covers the order
(same Wi-Fi, then Tailscale, then the relay), that the relay opens
beside the direct tries after 300 ms and the first one up is kept,
moving back to direct, the switch, the iPhone Local Network and Windows
firewall prompts, and how each device is connected (Settings > Devices
and PCs, Your PCs, Check now).
- Through an account now says GitHub or Google. It also covers signing
in a PC with one code at `account.ovis.sh/link` (and `link`), the
approval card's system and place, and the account's sign-in methods.
- Remote PCs: adding a PC through the relay, and **PCs on your
Tailscale** with **Add PC**.
- Herdr app terminals: **Move everything to herdr-core** and **Install
herdr-core and move everything**, linking to `docs/runtime-move.md`.

**docs/relay.md**: the route order in "Direct on the same network", and
per-device status (`connection` on `GET /api/devices`, `?check=1`, Your
PCs probes).
**docs/account.md**: how long who-is-asking is kept, and a rule that
Tailscale is not account membership.
**docs/remote-pcs.md**: PCs on your Tailscale (one-tap add, which peers
are asked, the server_id check).
**ovis-site/README.md**: the privacy policy now also tracks the account
service and the direct connections.

No README change. No changelog fragment: docs only.

## Sources

Each statement comes from the merged PRs (#3152, #3163, #3180, #3194,
#3197, #3200, #3201, #3202, #3203, #3205, #3206, #3161, #3187), the
account service README at main (ovis-sh/account#9 merged) and the live
`GET https://account.ovis.sh/v1/providers` (`github`, `google`). UI
labels were checked against the i18n tables (`Same Wi-Fi, direct`,
`Location unknown`, `Check now`, `Add {provider}`, `Turn the relay on on
that PC first.`, and others).

## Validation
- `bun test scripts/ovis-site.test.ts`: 22 pass (canonicals, hreflang,
sitemap, translations).
- `bun run check fast`: all ok at the head (typecheck, build, 12880 unit
tests pass, 0 fail).
- Not run: browser regressions and integration (docs only).
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