Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/verify-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,28 @@ jobs:
path: ${{ runner.temp }}/compiled-upgrade.log
if-no-files-found: ignore

# Published 0.6.0, 0.7.0 and 0.7.1 servers updated through their own GUI update path (real npm installs from the registry).
- name: Old published servers update to this checkout through their own GUI
if: runner.os == 'Linux'
shell: bash
timeout-minutes: 20
env:
OMPWEB_OLD_SERVER_E2E: "1"
run: |
log="$RUNNER_TEMP/old-server-upgrade.log"
status=0
npx bun test --parallel --timeout 900000 lib/old-server-upgrade.integration.test.mjs > "$log" 2>&1 < /dev/null || status=$?
cat "$log"
exit "$status"

- name: Upload the old-server upgrade log
if: ${{ !cancelled() && failure() && runner.os == 'Linux' }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: old-server-upgrade-${{ matrix.os }}
path: ${{ runner.temp }}/old-server-upgrade.log
if-no-files-found: ignore

- name: Packed install smoke test
shell: bash
run: |
Expand Down
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -1789,6 +1789,7 @@ during the wait.
- **Update omp** (`POST {target:"omp",version}`, no `force`; same auth/origin checks and `OMP_WEB_DISABLE_AUTOUPDATE` gate). Between ompweb releases a host gets a newer omp from the fork's releases: `checkUpdates` reports `omp: { currentVersion, availableVersion, updateAvailable, canUpdate, blockedReason, blockers, operation, runnerChannel: true }` (a daemon without `runnerChannel` reports only a version, and the hub keeps just that). The source is the newest published release of `omp-runner.json`'s repo that attaches this platform's runner and whose `ompweb-omp.json` names this ompweb's `RUNNER_PROTOCOL` (`findRunnerRelease`: 100 releases a page, at most `RELEASE_PAGE_CAP` pages, so a release that speaks another protocol is skipped, never offered); it is available when that release's tag is another build than the running omp and, where both have a stamp, a newer one (never a downgrade). The daemon installs it in-process (no worker, no restart; `hostUpdateBlocksNewWork` is false for it) into `<agent dir>/omp-web/omp/<ompweb version>/<tag>/`: downloaded into a fresh staging directory, checked there (SHA-256, `--runner-info` protocol, `--smoke-test`), renamed into place and only then pointed at by `current.json`. A failure at any step leaves the pointer and the selected runner exactly as they were. Running sessions keep their binary, new spawns use the pointed one, and an ompweb update starts from its own pinned runner (a new version has a new directory). A caller's `operationId` names one omp update: a replay returns the stored operation, running or settled, installing nothing again; the same id for another version, an id an ompweb operation holds, or the id of an earlier attempt a later one superseded (`omp-update.json` keeps the last 32 in `earlier`) is `operation_conflict`; an ompweb update request with an omp operation's id is too. **It never touches ompweb's record.** It keeps its own (`<agent dir>/omp-web/host-update/omp-update.json`, reported as `omp.operation`; `HostUpdateInfo.operation` stays ompweb's, which a coordinated upgrade verifies in `status.json`) and takes the shared claim lock (`lock.json`, which records its `target`), so the two never run together: an omp update is refused with blocker/error code `ompweb_update_active` while an ompweb operation is running (prepared, committing and recovery-required included) or any ompweb claim is live, and `omp_install_active` while another omp install runs; an ompweb update is blocked by `omp_install_active` (its start fails `update_in_progress`) while an omp install holds the claim. Also blocked by the disable switch, or by an omp the install does not choose (`OMP_WEB_OMP_BIN`: `unsupported_install`). The hub answers a blocked omp POST with the first blocker's code.
- **Recovery plane.** Modern candidates may acknowledge an approved future server protocol through an operation-bound preflight nonce and maintenance receipt. Legacy recovery admits only a fixed bootstrap on one operation-bound runner channel, never general old application traffic. Windows uses native process/service/task handling. Old daemons copy only `update-worker.ts`; its startup must work without sibling modules and load shared lifecycle code from verified sources before replacing an install.
- **Completion and rollback.** `upgrade-plan.ts`, `self-update.ts` and `server-update-worker.ts` persist progress; POST acceptance and shell output are not success. Verify the expected release, live process identity and operation/boot receipt after reconnect. Retain the prior install until healthy, and report partial recovery explicitly. See `docs/superpowers/specs/2026-11-14-coordinated-gui-upgrades-design.md` when changing upgrade or bootstrap contracts.
- **Published-release proof.** `lib/old-server-upgrade.integration.test.mjs` (`OMPWEB_OLD_SERVER_E2E=1`, Linux CI) installs npm 0.6.0, 0.7.0 and 0.7.1 with real npm, updates each through its own GUI (`POST /api/app-update` prepare/commit) to this checkout, then recovers it. The old servers never send their launcher the arm message, so on a plain unsupervised `ompweb` the worker's SIGTERM ends the launcher with the server, nobody answers its restart request, and it reports success with nothing running: the user runs `ompweb` again. That code is the old install's own `bin/omp-web-update-worker.js` and `bin/omp-web.js`; current code cannot change it. An old daemon only upgrades through Settings → Hosts Force (`forceMethod:"recovery"`).
- `/api/omp-update` keeps only `restart`, an explicit server-side maintenance API for existing callers. The settings UI and AppShell no longer use it as a global update control or send a server-wide session restart after a host update.

### Auth and model config
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ All notable changes to **omp-web** (`@kahme247/ompweb`) are documented in this f

## [Unreleased]

### Upgrading from 0.7.1 or older

- **Start ompweb again after the in-app update.** The updater of 0.6.0, 0.7.0 and 0.7.1 installs the new version and reports success, but an `ompweb` you started yourself (no systemd, launchd or tray supervisor) does not come back: the old launcher exits with the server. If the page does not return, run `ompweb` again. The cause is in the old version's own updater, which this release cannot change.
- **Then update each host with Force.** A 0.7.x host daemon sharing the installation is shown in Settings → Hosts after the restart; its normal update is refused while the package was replaced under it, so use **Force update** to move it to this release.

### Added

- **Update omp on a host without a new ompweb release.** Settings → Hosts shows "Update omp to …" for a host whose omp is older than the newest published release of the oh-my-pi fork whose runner speaks this ompweb's runner protocol (`RUNNER_PROTOCOL`; a release that speaks another one is never offered). The daemon downloads the runner into a fresh staging directory, checks its SHA-256, its `--runner-info` protocol and `--smoke-test` there, and only then moves it into place and points new sessions at it; any failure leaves the runner in use and its pointer as they were, and running sessions are not interrupted. A caller's `operationId` names one omp update: a replay returns the stored operation and installs nothing again, and a conflicting request, or a replay of an attempt a later one superseded, is refused (`operation_conflict`). An omp update keeps its own record and never touches an ompweb update's: the two never run together, and each is refused with a machine-readable blocker (`ompweb_update_active`, `omp_install_active`) while the other runs.
Expand Down
Loading
Loading