Skip to content

feat: use Ovis names for settings, cookies, state and storage, keeping the old ones working - #1648

Merged
devswha merged 4 commits into
mainfrom
feat/ovis-runtime-ids
Oct 22, 2026
Merged

devswha merged 4 commits into
mainfrom
feat/ovis-runtime-ids

Conversation

@devswha

@devswha devswha commented Oct 22, 2026

Copy link
Copy Markdown
Owner

Change

Second layer of the Ovis rebrand (after #1579 and #1641): the runtime identifiers move to Ovis names, and every old name keeps working for installs from before.

  • Settings: HERDR_WEB_* become OVIS_* (HERDR_WEB_UI_REF becomes OVIS_REF). Every entry point (server/index.ts, managed.ts, supervisor.ts, remote-entry.ts, scripts/plugin.ts) first imports server/legacy-env.ts, which fills an unset OVIS_* from its old name; set under both names, the OVIS_* one wins. The plugin applies the same to its env files. install.sh/install.ps1 read the old names too. The token is removed from the PTY sidecar's environment under both names, and a remote PC is started with the herdr path under both names (bundles published before read the old one).
  • Cookies: herdr_web_token/herdr_web_device become ovis_token/ovis_device. The old cookies still sign in, still count as session-bearing for the cross-site check (machine-security.ts), and are cleared at sign-in, pairing and sign-out.
  • State dir: ~/.config/herdr-web-ui moves to ~/.config/ovis on first use (server/update-state.ts), leaving a link at the old path for a launcher, plugin or older release; if the move fails, the old dir stays in use. The plugin and installer find either.
  • Browser storage: herdr-web-ui:* keys move to ovis:* before anything reads them: src/lib/legacyStorage.ts is the first import of main.tsx and of the theme boot script (src/theme-bootstrap.ts, which paints the first frame before main.tsx runs). The old key is removed in the same step so a cleared draft or queue cannot come back.
  • Other names: pasted files go to <pane cwd>/.ovis; offline cache ovis-v4-ram/ovis-files-v1 (the worker already retires caches of other names); Codex client identity, usage User-Agent, keychain job label and plugin invocation_source say ovis; the Mac app passes OVIS_NO_OPEN.
  • Guard: scripts/conventions.test.ts "names from before Ovis" fails on a HERDR_WEB_* setting, herdr_web_* cookie, herdr-web-ui: key or .herdr-web-ui paste dir outside the files that carry an old install over (CARRY_OVER), with the Ovis name to use. It already caught the theme boot script and nine files added to main since this branch started.
  • Tests and regression scripts added since chore: use the Ovis name for the package, source comments and test fixtures #1579 use the ovis-test labels too.

Deliberately unchanged

The remote PC bundle and bridge paths (~/.local/share/herdr-web-ui/remote-vN, ~/.config/herdr-web-ui/bridges): bundles already published (remote-v31) write there. The telemetry Worker and shared/telemetry.ts (hash-pinned to the deployed Worker). The plugin id and repository URL (next PR, after the repository rename). External herdr names (HERDR_SOCKET, HERDR_TEST_*, HERDR_PLUGIN_*).

Validation

  • New tests: server/legacy-env.test.ts, server/update-state.test.ts (move + link, untouched once the new dir exists, nothing created on a fresh install, OVIS_STATE_DIR wins), src/lib/legacyStorage.test.ts, old-cookie cases in server/auth.test.ts, the conventions guard (checked to fail on a probe file with an old key, env name and paste dir).
  • bun run check fast on this branch (on main 56b48ad): workflow syntax, generated files, typecheck, build and unit tests pass.
  • Live server started with only HERDR_WEB_TOKEN and a state dir at the old XDG_CONFIG_HOME/herdr-web-ui:
cookie []                            401
cookie [herdr_web_token=qa-legacy-token] 200
cookie [herdr_web_token=wrong]       401
cookie [ovis_token=qa-legacy-token]  200
--- sign-in
HTTP/1.1 204 No Content
set-cookie: ovis_token=qa-legacy-token; Path=/; HttpOnly; SameSite=Strict; Max-Age=31536000
set-cookie: herdr_web_token=; Path=/; HttpOnly; SameSite=Strict; Max-Age=0
--- state
lrwxrwxrwx 1 devswha devswha   43 10월 22 21:57 herdr-web-ui -> /tmp/ovis-rebrand.yJELsk/qa-pr2/config/ovis
drwxrwxr-x 2 devswha devswha 4096 10월 22 21:57 ovis
{"marker":"legacy-state"}
/tmp/ovis-rebrand.yJELsk/qa-pr2/config/ovis
  • Browser (Chromium, light color scheme), old cookie herdr_web_token and old keys herdr-web-ui:settings = {theme: "dark", language: "ko"}, herdr-web-ui:sidebar-width = 333, app entry module held back so only the theme boot script has run: data-theme=dark, keys already ovis:settings, ovis:sidebar-width. After the app loads: theme dark, lang=ko-KR, sidebar width 333, signed in by the old cookie (no lock screen).

This PR touches authentication (cookie names), so it waits for a real CodeRabbit review.

Changelog: changelog.d/ovis-runtime-names.md.

…g the old ones working

Second of the layered Ovis rebrand. HERDR_WEB_* settings become OVIS_* (HERDR_WEB_UI_REF becomes OVIS_REF); every entry point adopts an unset OVIS_* from its old name first. The token and device cookies become ovis_token and ovis_device; the old cookies still sign in, count as session-bearing for the origin check, and are cleared at sign-in, pairing and sign-out. The state dir moves from ~/.config/herdr-web-ui to ~/.config/ovis on first use, leaving a link at the old path. Browser storage keys move from herdr-web-ui:* to ovis:* before the app reads them. The offline cache, pasted-file dir (.ovis), Codex client identity, User-Agent and plugin invocation_source follow. Remote bundle and bridge paths stay for the release-path PR.
…er install over

A file outside CARRY_OVER that names a HERDR_WEB_* setting, a herdr_web_* cookie or a herdr-web-ui: storage key fails scripts/conventions.test.ts with the Ovis name to use, so a branch written before the rename cannot bring the old names back once it is rebased.
@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 290 files, which is 140 over the limit of 150.

To get a review, reduce the PR to 150 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

⚙️ Run configuration
📥 Commits

Reviewing files that changed from the base of the PR and between 56b48ad and f589388.

📒 Files selected for processing: 290
  • .github/ISSUE_TEMPLATE/bug_report.yml
  • .gitignore
  • CONTRIBUTING.md
  • DESIGN.md
  • INSTALL.md
  • README.ja.md
  • README.ko.md
  • README.md
  • README.zh-CN.md
  • SECURITY.md
  • app/mac/README.md
  • app/mac/Sources/OvisMac/Model.swift
  • changelog.d/ovis-runtime-names.md
  • docs/app-updates.md
  • docs/development.md
  • docs/foldable-testing.md
  • docs/guide.md
  • docs/ios-home-screen-testing.md
  • docs/native-app.md
  • docs/remote-pcs-qa.md
  • docs/remote-pcs.md
  • install.ps1
  • install.sh
  • public/sw.js
  • scripts/agent-skill-menu-demo-regression.ts
  • scripts/agy-chat-browser-qa.ts
  • scripts/alert-sound-regression.ts
  • scripts/android-ime-regression.ts
  • scripts/application-paging-regression.ts
  • scripts/chat-browser-qa.ts
  • scripts/chat-fallback-browser-qa.ts
  • scripts/chat-greeting-demo-regression.ts
  • scripts/chat-outcome-note-browser-qa.ts
  • scripts/chat-size-regression.ts
  • scripts/chat-virtual-browser-qa.ts
  • scripts/check.test.ts
  • scripts/check.ts
  • scripts/ci-tests.ts
  • scripts/cliproxy-settings-regression.ts
  • scripts/command-outcome-demo-regression.ts
  • scripts/composer-fit-demo-regression.ts
  • scripts/composer-reconnect-regression.ts
  • scripts/context-menu-inputs-demo-regression.ts
  • scripts/conventions.test.ts
  • scripts/deep-link-demo-regression.ts
  • scripts/default-view-regression.ts
  • scripts/disposable-config.ts
  • scripts/droplet-demo-regression.ts
  • scripts/droplet-regression.ts
  • scripts/file-preview-text-browser-qa.ts
  • scripts/file-viewer-regression.ts
  • scripts/files-prompt-regression.ts
  • scripts/film/capture.ts
  • scripts/follow-focus-regression.ts
  • scripts/font-swap-demo-regression.ts
  • scripts/fresh-install-docker.ts
  • scripts/generate-protocol-types.ts
  • scripts/gjc-status-browser-regression.ts
  • scripts/grok-chat-browser-qa.ts
  • scripts/header-lens-switch-regression.ts
  • scripts/health-flap-demo-regression.ts
  • scripts/held-rows-demo-regression.ts
  • scripts/herdr-profiles-browser-qa.ts
  • scripts/herdr-profiles-ssh-qa.ts
  • scripts/herdr-restart-regression.ts
  • scripts/install-star.test.ts
  • scripts/key-bar-customization-demo-regression.ts
  • scripts/key-bar-hold-repeat-regression.ts
  • scripts/keybar-focus-regression.ts
  • scripts/lan-exposure-notice-regression.ts
  • scripts/machine-conflict-regression.ts
  • scripts/machine-dialog-regression.ts
  • scripts/machines-browser-qa.ts
  • scripts/mirror-scroll-demo-regression.ts
  • scripts/mobile-tabs-regression.ts
  • scripts/mobile-viewport-regression.ts
  • scripts/narrow-pane-demo-regression.ts
  • scripts/new-session-skills-browser-qa.ts
  • scripts/notification-startup-regression.ts
  • scripts/notification-view-regression.ts
  • scripts/omo-chat-browser-qa.ts
  • scripts/omo-plan-browser-regression.ts
  • scripts/omo-question-wheel-regression.ts
  • scripts/omp-question-compat.ts
  • scripts/opencode-prompt-regression.ts
  • scripts/output-browser-qa.ts
  • scripts/pages-gate.test.ts
  • scripts/palette-keys-regression.ts
  • scripts/palette-machines-demo-regression.ts
  • scripts/pane-find-regression.ts
  • scripts/pane-input-focus-demo-regression.ts
  • scripts/pane-paging-demo-regression.ts
  • scripts/pending-pane-switch-regression.ts
  • scripts/phone-setup.contract.test.ts
  • scripts/phone-setup.test.ts
  • scripts/phone-split-grid-demo-regression.ts
  • scripts/phone-worktree-sheet-regression.ts
  • scripts/plugin-actions-demo-regression.ts
  • scripts/plugin-phone.test.ts
  • scripts/plugin.test.ts
  • scripts/plugin.ts
  • scripts/portal-regression.ts
  • scripts/preferences-sync-regression.ts
  • scripts/prompt-dock-demo-regression.ts
  • scripts/push-settings-regression.ts
  • scripts/pwa-update-browser-qa.ts
  • scripts/readme-media/capture.ts
  • scripts/recent-folders-regression.ts
  • scripts/remote-bundle-smoke.ts
  • scripts/render-crash-demo-regression.ts
  • scripts/replay-clipboard-demo-regression.ts
  • scripts/repo-diff-browser-qa.ts
  • scripts/restored-draft-demo-regression.ts
  • scripts/revision-bound-update-demo-regression.ts
  • scripts/rewind-browser-qa.ts
  • scripts/secret-input-regression.ts
  • scripts/settings-pages-demo-regression.ts
  • scripts/shortcut-exact-modifiers-demo-regression.ts
  • scripts/sidebar-activity-demo-regression.ts
  • scripts/sidebar-branch-line-demo-regression.ts
  • scripts/sidebar-machine-layout-demo-regression.ts
  • scripts/sidebar-machine-removal-demo-regression.ts
  • scripts/sidebar-spacing-demo-regression.ts
  • scripts/sidebar-tokens-demo-regression.ts
  • scripts/skill-activity-browser-qa.ts
  • scripts/split-view-regression.ts
  • scripts/ssh-integration.ts
  • scripts/ssh-password-docker.ts
  • scripts/sticky-modifiers-regression.ts
  • scripts/tab-menu-regression.ts
  • scripts/take-over-regression.ts
  • scripts/telemetry-regression.ts
  • scripts/terminal-arrows-clicks-regression.ts
  • scripts/terminal-autoswitch-demo-regression.ts
  • scripts/terminal-cjk-punctuation-regression.ts
  • scripts/terminal-command-arrows-regression.ts
  • scripts/terminal-command-backspace-regression.ts
  • scripts/terminal-copy-regression.ts
  • scripts/terminal-ctrl-enter-regression.ts
  • scripts/terminal-draft-regression.ts
  • scripts/terminal-file-links-regression.ts
  • scripts/terminal-ime-diagnostic.ts
  • scripts/terminal-input-regression.ts
  • scripts/terminal-input-spacing-regression.ts
  • scripts/terminal-ipad-ime-regression.ts
  • scripts/terminal-keyboard-suggestions-regression.ts
  • scripts/terminal-pinch-regression.ts
  • scripts/terminal-safari-ime-evidence.ts
  • scripts/terminal-safari-ime-regression.ts
  • scripts/terminal-viewport-regression.ts
  • scripts/test-herdr.ts
  • scripts/theme-first-paint-demo-regression.ts
  • scripts/touch-long-press-demo-regression.ts
  • scripts/ui-contexts-regression.ts
  • scripts/ui-regression.ts
  • scripts/update-browser-qa.ts
  • scripts/update-notice-regression.ts
  • scripts/usage-regression.ts
  • scripts/virtual-source-browser-qa.ts
  • scripts/windows-install-e2e.ps1
  • scripts/windows-install.test.ps1
  • scripts/windows-lens-browser-qa.ts
  • scripts/windows-plugin.test.ts
  • scripts/workspace-rows-regression.ts
  • scripts/workspace-touch-reorder-demo-regression.ts
  • server/access.ts
  • server/adopt-legacy-env.ts
  • server/api.contract.test.ts
  • server/attach-held.contract.test.ts
  • server/auth.test.ts
  • server/auth.ts
  • server/bridge.ts
  • server/codex-daemon.ts
  • server/codex.test.ts
  • server/core/terminal-process.ts
  • server/device-access.contract.test.ts
  • server/devices.ts
  • server/file-view.test.ts
  • server/file-view.ts
  • server/herdr-profiles.test.ts
  • server/herdr-profiles.ts
  • server/herdr-update.test.ts
  • server/herdr-update.ts
  • server/index.ts
  • server/legacy-env.test.ts
  • server/legacy-env.ts
  • server/machine-proxy.test.ts
  • server/machine-security.ts
  • server/machines-refresh.contract.test.ts
  • server/machines.ts
  • server/managed.ts
  • server/manifest-request.test.ts
  • server/open-access.test.ts
  • server/order-sequence.test.ts
  • server/output.contract.test.ts
  • server/paste.test.ts
  • server/paste.ts
  • server/plugin-actions.test.ts
  • server/plugin-actions.ts
  • server/plugins.contract.test.ts
  • server/portal.test.ts
  • server/portal.ts
  • server/pty/pty-host.mjs
  • server/pty/session.test.ts
  • server/pty/session.ts
  • server/push.ts
  • server/reattach.contract.test.ts
  • server/remote-bundle.ts
  • server/remote-entry.test.ts
  • server/remote-entry.ts
  • server/remote-host.ts
  • server/repo-diff.test.ts
  • server/request-log.contract.test.ts
  • server/route-envelope.contract.test.ts
  • server/startup-order.test.ts
  • server/static.test.ts
  • server/static.ts
  • server/supervisor.ts
  • server/tailscale.test.ts
  • server/tailscale.ts
  • server/take-over.contract.test.ts
  • server/telemetry.test.ts
  • server/telemetry.ts
  • server/update-api.ts
  • server/update-state.test.ts
  • server/update-state.ts
  • server/updater.test.ts
  • server/usage.ts
  • server/voice.test.ts
  • server/voice.ts
  • server/watch.ts
  • server/windows-native.test.ts
  • shared/protocol.ts
  • shared/voice.ts
  • site/demo/transport.ts
  • src/App.tsx
  • src/components/AgentPicker.tsx
  • src/components/Composer.tsx
  • src/components/DevicesPanel.tsx
  • src/components/MachineSidebar.tsx
  • src/components/NewSessionDialog.tsx
  • src/components/PaneTerminal.tsx
  • src/components/PortalPanel.tsx
  • src/components/SettingsDialog.tsx
  • src/components/Sidebar.tsx
  • src/components/TelemetryControls.tsx
  • src/lib/alertTurns.ts
  • src/lib/api.test.ts
  • src/lib/api.ts
  • src/lib/compose.test.ts
  • src/lib/composerDraft.test.ts
  • src/lib/composerDraft.ts
  • src/lib/deepLink.ts
  • src/lib/filePanelWidth.ts
  • src/lib/i18n.ja.ts
  • src/lib/i18n.ko.ts
  • src/lib/i18n.zh.ts
  • src/lib/lastViewedPane.ts
  • src/lib/legacyStorage.test.ts
  • src/lib/legacyStorage.ts
  • src/lib/machineNotice.ts
  • src/lib/machinePalette.test.ts
  • src/lib/machinePalette.ts
  • src/lib/messageQueue.test.ts
  • src/lib/messageQueue.ts
  • src/lib/pendingMessages.ts
  • src/lib/preferencesSync.hook.test.ts
  • src/lib/recent-directories.test.ts
  • src/lib/recent-directories.ts
  • src/lib/repoDiff.test.ts
  • src/lib/repoDiff.ts
  • src/lib/seenFinishes.ts
  • src/lib/settings.legacy-fixture.ts
  • src/lib/settings.test.ts
  • src/lib/settings.ts
  • src/lib/settingsHistory.test.ts
  • src/lib/settingsHistory.ts
  • src/lib/sheetHistory.test.ts
  • src/lib/sheetHistory.ts
  • src/lib/sidebarActivity.hook.test.ts
  • src/lib/sidebarPins.ts
  • src/lib/sidebarWidth.ts
  • src/lib/split.test.ts
  • src/lib/split.ts
  • src/lib/terminalDraft.ts
  • src/lib/themeBoot.ts
  • src/lib/updateNotes.ts
  • src/lib/useFileViewer.ts
  • src/main.tsx
  • src/theme-bootstrap.ts

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

  • 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.

… dir from a test

Review fixes for the Ovis runtime names. A token changed in the plugin's env file under its old
name won over the new name the parent's environment had copied, so the server kept the old
token: each layer is now mapped by itself and then merged (mergeEnvLayers), and the side-effect
mapping moved to adopt-legacy-env.ts for the entry points.

defaultStateDir() only resolves where the state is and moves nothing, so a test or a script
that imports update-state.ts no longer moves a real state dir (windows-plugin.test.ts did). The
move runs once per process in the launcher, supervisor and server. The old dir is followed
when it is a link, an empty new dir no longer hides it, and when both hold files the old one
stays in use with a message. A storage-less WebView no longer stops the app from starting.
…shing

When an empty ~/.config/ovis existed, two processes of one install starting at once could both
try to remove it, and the loser died at startup. The loser now carries on when the dir is
already gone, warns about both dirs holding files only when the old one still does, and a
config dir it cannot read resolves to the new name instead of throwing.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Deploying ovis with  Cloudflare Pages  Cloudflare Pages

Latest commit: f589388
Status: ✅  Deploy successful!
Preview URL: https://7077bf71.ovis.pages.dev
Branch Preview URL: https://fix-flaky-windows-launcher-r.ovis.pages.dev

View logs

@devswha

devswha commented Oct 22, 2026

Copy link
Copy Markdown
Owner Author

CodeRabbit did not review this PR: it skipped it (289 files, over its 150-file limit, and no usage credits). Because the PR touches authentication (cookie names), it got a substitute review instead, by a code-review agent focused on auth, secrets, the state dir move, env precedence and browser storage.

First pass (on cf68abd), request changes:

  • Blocker H1: a token changed under its old name in the plugin's env file lost to the copy of herdr's parent token. Fixed in 93c93fd: each env layer is mapped by itself, then merged (mergeEnvLayers), with a test.
  • Blocker H2: a symlinked old state dir, or an empty ~/.config/ovis, was ignored, and an empty devices.json would reopen the pairing gate. Fixed in 93c93fd: links are followed, an empty new dir gives way, and when both dirs hold files the old one stays in use with a message. Tests cover each case.
  • Should-fix: the move raced and retried on every call; a null localStorage crashed boot; a test left a fake window behind. All fixed in 93c93fd.
    • The move now runs once per process, from the launcher, supervisor and server only.
    • A test or script that imports update-state.ts no longer moves a real state dir. windows-plugin.test.ts did, through updateStateDir's default argument.

Second pass (on 93c93fd), approve, with one medium finding:

  • N1: with an empty ~/.config/ovis, processes starting together could crash. Fixed in f589388. A 6-process race run 15 times now has 0 crashes and 0 spurious warnings; before the fix, 7 of 90 processes crashed.
  • Also fixed: a config dir that cannot be read now resolves to the new name instead of throwing (N2), and the run-once and OVIS_STATE_DIR behaviour is tested (N3).

Confirmed fine:

  • Only one cookie value is compared, so the legacy name gives no second guess.
  • The wrong-token backoff covers the legacy cookie too.
  • The CSRF exemption counts either cookie name.
  • Sign-out clears all four cookies.
  • The token is removed from the PTY sidecar's environment under both names.
  • adopt-legacy-env.ts is the first import of every entry point.

@devswha
devswha merged commit 4dd760f into main Oct 22, 2026
19 checks passed
@devswha
devswha deleted the feat/ovis-runtime-ids branch October 22, 2026 13:34
devswha added a commit that referenced this pull request Oct 22, 2026
#1651)

## Change

How PRs get reviewed while CodeRabbit cannot keep up with the rebrand
and the coming refactor:

- **Skipped reviews.** A skipped review ("Review skipped", e.g. a PR of
more than 150 files) counts as no review, like a rate-limited one. A PR
that needs a review stays under 150 files.
- **PRs that need a real review** (`--takeover`, observe permissions,
queued input, authentication, HTTP/WS contracts, workflows) can be
reviewed by a code-review agent when CodeRabbit skips them. Its findings
and how each was resolved go in a PR comment before the merge, as on
#1648.
- **Move-only PRs** (files moved or split, imports updated, no behaviour
change) do not wait for CodeRabbit. They merge on their checks once `git
diff --color-moved` shows only moved code and import paths.
- Every PR merged without a CodeRabbit review says so in a comment.
- `docs/development.md` no longer says every PR asks for `@coderabbitai
review` on its final head before merging; it points to AGENTS.md.

Why: in the last 25 PRs, CodeRabbit skipped the two over 150 files
(#1648 at 290, #1637's later pushes at 161) and was rate-limited on
three (#1592, #1597, #1598). The refactor is many move-only PRs, where a
review finds little and waiting on the hourly allowance costs hours.

Docs only; no changelog fragment (nothing users notice).
devswha added a commit that referenced this pull request Oct 23, 2026
…the rename (#1723)

## Problem

Updating in the app from 0.4.13 to the next release breaks the handover
to the new release's
supervisor. An update never replaces
the running launcher (`server/managed.ts`), so after the install the
0.4.13 launcher starts the new
release's supervisor. That launcher names the checkout
`HERDR_WEB_SOURCE_ROOT` and looks for the
active release only under `~/.config/herdr-web-ui/updates/<hash>/`.

The new supervisor first moves `~/.config/herdr-web-ui` to
`~/.config/ovis` (#1648), then accepts a
saved release only under the new path. The `current.json` the 0.4.13
supervisor wrote names
`~/.config/herdr-web-ui/.../release-*`, so the new supervisor ignores it
and starts the bridge from
the source checkout, which is still 0.4.13. That bridge reads
`HERDR_WEB_BOOT_ID`, not
`OVIS_BOOT_ID`, so it fails the supervisor's startup health check. The
new supervisor exits before
it is ready, and the launcher falls back to the 0.4.13 supervisor, which
shows "The updated
supervisor failed to start". By then the state dir has already moved out
from under the launcher.
The same failure repeats on every later update. A new supervisor that
did get to install would not
help either: the new supervisor
records the release under `~/.config/ovis/...`, the 0.4.13 launcher
rejects that path and starts
its own supervisor, and that one rejects it too.

## Change

- `server/legacy-env.ts`: `legacyLauncherStateDir(env)` tells whether a
launcher from before the
rename started this supervisor (`HERDR_WEB_SOURCE_ROOT` set,
`OVIS_LAUNCHER` unset). If one did,
  it returns that launcher's state dir (`HERDR_WEB_STATE_DIR`, else
`$XDG_CONFIG_HOME/herdr-web-ui`). The helper sits in this file because
it is already in
`CARRY_OVER`, the conventions test's list of files allowed to use the
old names.
- `server/supervisor.ts`: under such a launcher, the supervisor does not
move the state dir. It
uses the old dir for app state and update state, and hands that dir to
its bridge as
`OVIS_STATE_DIR`, so the bridge does not move it either. The move waits
for a launcher of this
version, which runs once the app starts from an updated source checkout
or plugin.
- `server/supervisor.ts`, `server/legacy-env.ts` (`withLegacyNames`):
under such a launcher, the
supervisor also hands its bridge the old names of what it sets
(`HERDR_WEB_MANAGED`,
`HERDR_WEB_BOOT_ID`, `HERDR_WEB_STATE_DIR`, `HERDR_WEB_REVISION`). When
a saved release fails to
start, the supervisor falls back to the source checkout, and under an
old launcher that checkout
is 0.4.13, whose bridge reads only the old names. Without them it could
not answer the health
check. After a second update, the old launcher's own fallback is the
previous release's
supervisor, which does the same thing, so the app stayed down. Even a
bridge that did come up
  would not be managed, so it could not update again.
- `server/managed.ts`: the launcher sets `OVIS_LAUNCHER=1`, so the
supervisors it starts keep moving
  the state dir as before.

The candidate fix put the same logic in `supervisor.ts`, but that file
is not in `CARRY_OVER`, so
the "names from before Ovis" conventions test fails on it. Moving the
logic into `legacy-env.ts`
keeps the conventions test passing without editing it.

## Test

`server/legacy-env.test.ts` gets three supervisor tests and a mapping
test. Each supervisor test runs the real `runSupervisor` and the real
`Updater` against a git fixture shaped like a 0.4.13 install that has
just installed a release. The
bridge's start is recorded and its health check is answered.

- Started the way the 0.4.13 launcher starts it, the supervisor runs the
installed release, and the
state stays in `herdr-web-ui`. Before this fix, the bridge started from
the source checkout:
`Expected: …/config/herdr-web-ui/updates/<hash>/release-next`,
`Received: …/checkout`.
- Started by the 0.4.13 launcher with a saved release that fails, the
supervisor falls back to the
source checkout and hands that bridge `HERDR_WEB_BOOT_ID`,
`HERDR_WEB_MANAGED`,
`HERDR_WEB_STATE_DIR` and `HERDR_WEB_REVISION`. In the stand-in, the
source checkout's bridge
reads only the old names, as 0.4.13's does. On 492f1da this test fails:
the bridge in
  `…/checkout` cannot answer the boot id it was given.
- Started by a launcher of this version, the supervisor still moves the
state dir to `ovis` and
  leaves a link at the old path.

`bun run check fast` passes.

Manual check with the real 0.4.13 launcher: a clone checked out at tag
`v0.4.13` ran
`bun server/managed.ts` against an installed release under a temp
`XDG_CONFIG_HOME` and the
isolated `ovis-test` herdr session.

- With the release at current main, the release's supervisor logs "The
new bridge failed its
startup health check." The launcher then falls back to the 0.4.13
supervisor, and the state dir
  has already been moved and replaced by a link.
- Two updates with a release that fails (scripted,
`/tmp/ovis-qa-two-updates.ts`). The real
0.4.13 launcher installs two releases through `/api/updates`. The second
release's bridge
passes its install check but exits at its next start, under its own
supervisor.
- On 492f1da: release 2's supervisor falls back to the 0.4.13 source
bridge, which fails the
health check. The launcher then falls back to release 1's supervisor,
which fails the same way,
    and the launcher exits 1. The app is down.
- On this head: the source bridge answers, and the app is up on 0.4.13.
`/api/updates` reports
it as managed with no error, so the user can update again, and the
launcher stays up.
- With the release at this branch, `/api/health` served the release's
revision from
the release's own supervisor, with no fallback. `~/.config/herdr-web-ui`
stayed a real directory,
  and `current.json` was kept.
devswha pushed a commit that referenced this pull request Oct 24, 2026
main renamed the history entry and settings keys to ovis: (#1648); the
branch scope's history test and browser check still wrote the old ones.
devswha added a commit that referenced this pull request Oct 24, 2026
## What this does for the user

Files pasted or attached in the browser are saved in `<pane cwd>/.ovis/`
so the agent can read them without a permission prompt. Until now every
upload showed up as an untracked change in the project's `git status`.

The default `.ovis` folder now ignores itself. Right after the server
creates the folder, it writes a `.gitignore` containing `*`. The file is
created exclusively (`wx`, mode `0600`), so:

- an ignore file already in that folder, or a symlink at that path
(dangling or not), is never followed, read or replaced (only `EEXIST` is
tolerated);
- any other create error fails the upload with an error instead of
returning a path;
- a folder set through `OVIS_PASTE_DIR` (trimmed, `~` expanded, even one
equal to the default path) is the user's own and gets no ignore file.

Ignored files still open by their explicit path, and the path the prompt
names is unchanged.

Known trade-off, raised in review: Git-backed `@` file completion lists
files with `git ls-files --exclude-standard`, so in a Git project a
pasted file no longer appears there. Looking it up by path or bare name
still works. Keeping pastes out of the project's Git view is the purpose
of this change, so the PR keeps it.

## Why

This was a local-only branch (`fix/default-paste-gitignore`) that was
never pushed. It is rebased onto current main and ported to the `.ovis`
/ `OVIS_PASTE_DIR` names from #1648. On main the paste route still only
does `mkdirSync`, so the bug still reproduces there.

It does not overlap with #1795, which changes only Pi delivery and
pending-message files and touches neither `server/paste.ts` nor its
tests.

## How it was verified

- `server/paste.test.ts` and `server/file-view.test.ts`: all 49 pass.
They cover the self-ignoring default folder, the temp-dir fallback, an
existing ignore file and file or dangling symlinks kept byte for byte,
overrides (trimmed, `~`, equal to the default) getting no ignore file,
and an unwritable folder reporting `EACCES`.
- The `POST /api/pane/image` contract tests run on an isolated herdr
session against a temporary Git project:
  - `git status` is empty after two concurrent uploads;
- `git check-ignore` names each returned path, and the bytes read back
through `/api/fs/file`;
- concurrent uploads keep a custom ignore file and file or dangling
symlinks;
  - overrides get no ignore file;
  - an unwritable folder answers 500 with no path.
- `bun run check fast`
- Reviews: `omo-native-code-reviewer` found no HIGH findings and
recommended APPROVE (the MEDIUM finding is the completion trade-off
above). Codex (`gpt-6-astra`) found nothing.

No HTTP/WS contract, auth or workflow change.

---------

Co-authored-by: mp <mp@local>
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