Skip to content

fix(hosts): update an old linked host's daemon normally once recovery is offered - #533

Merged
andrebrait merged 2 commits into
mainfrom
fix/old-daemon-update-recovery
Nov 18, 2026
Merged

andrebrait merged 2 commits into
mainfrom
fix/old-daemon-update-recovery

Conversation

@andrebrait

@andrebrait andrebrait commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

getHostSoftwareUpdates gives an old daemon (no force contract) a forceMethod of "recovery" as soon as this server's own release exists on GitHub. updateHostSoftware read that as "this update is a recovery" for every update, so the normal update of a 0.7.1-or-older linked host was refused with "This host requires explicitly approved recovery" once 0.7.2 was published. Recovery is now used for a linked host only on Force; a normal update goes to that host's own updater as before. This machine's old daemon keeps requiring Force (recovery), as the 0.7.2 upgrade note and the old-server GUI e2e (#524) require.

The unit tests that cover it reached the live GitHub API, so they passed while the release was unpublished or the API rate-limited the runner. They now serve the release lookup themselves.

Summary by CodeRabbit

  • Bug Fixes
    • Linked hosts on version 0.7.1 or older can use their own updater for normal updates. Forced recovery remains available through Force update and updates this machine’s older daemon.
  • Documentation
    • Updated the changelog to describe the legacy-host update behavior.

getHostSoftwareUpdates gives an old daemon (no force contract) a
forceMethod of "recovery" as soon as this server's own release exists on
GitHub. updateHostSoftware read that as "this update is a recovery" for
every update, so the normal update of a 0.7.1-or-older host was refused
with "This host requires explicitly approved recovery" once 0.7.2 was
published. Recovery is now used only for a forced update; a normal one
goes to the host's own updater as before.

The tests that cover it reached the live GitHub API, so they passed while
the release was unpublished or the API rate-limited the runner. They now
serve the release lookup themselves.
@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The update path now selects legacy recovery for ordinary updates only when the update is forced. Tests stub GitHub release-tag lookups and restore the original fetch function. The changelog describes the update behavior for older hosts.

Changes: Host update recovery

Layer / File(s) Summary
Recovery selection and update tests
lib/hosts/hub.ts, lib/hosts/host-updates-route.test.mjs, lib/hosts/upgrade-shim.test.mjs, CHANGELOG.md
Recovery is selected for ordinary updates only when the recovery force method is used with force enabled. The tests stub GitHub release-tag lookups and restore the original fetch function during cleanup. The changelog records the behavior for older hosts.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Possibly related PRs

  • ompweb-dev/ompweb#529: Changes the same host update path and adds release-lookup stubs to the same tests.
Merge Risk: Minimal · up to 763e6

Normal updates of linked hosts running older daemons will use the host's own updater, while Force still starts recovery. The change is small and covered by an existing routing test, so merge risk is low.

Security architecture risk: Minimal · up to 763e6

The change restores ordinary updates for older linked hosts while keeping recovery explicitly force-approved. No material introduced or worsened security, failure-containment or update-ownership risk was established in the inspected change.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The changed dispatch addresses the selected host through its existing update transport. It does not add cross-host fan-out or a new execution channel; forced recovery retains its separate helper-execution branch.

Security Findings and Attack Paths

  • inferred — The inspected change restores ordinary-update reachability without establishing a recovery-approval bypass: recovery helper execution still requires force, while the newly selected ordinary path retains eligibility, protocol, version and applicable release-pin controls. No introduced or worsened security attack path was established.

Trust Boundaries and Controls

  • observed — Caller-controlled target, version and force pass the existing origin policy, JSON content-type requirement, bounded parsing and field validation before reaching the host-update selector. These request controls are unchanged by the PR.

Resilience and Maintainability Implications

  • observed — Legacy recovery retains per-host atomic admission, immutable operation-parameter checks, same-operation retry handling and claim retention after uncertain transport loss. Terminal reconciliation checks operation identity and receipt state before releasing the claim. The selector change does not modify this lifecycle; ordinary update completion remains delegated to the daemon.
Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: a linked host running an old daemon (0.7.1 or older) can now be updated normally once recovery is offered, with recovery reserved for Force. The raw summary confirms t…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: a linked host running an old daemon (0.7.1 or older) can now be updated normally once recovery is offered, with recovery reserved for Force. The raw summary confirms the hub.ts change that limits legacy recovery selection to explicit force requests for remote hosts, plus a CHANGELOG entry and test stubs. The title is specific and matches the changeset, so it passes.

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
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: dd176102-53dc-4a21-b1c1-66b5a78378cd
Commits

Reviewing files that changed from the base of the PR and between 75c3fe4 and 763e665.

Files selected for processing: 2

  • CHANGELOG.md
  • lib/hosts/hub.ts
Files skipped from review as they are similar to previous changes: 1

  • CHANGELOG.md

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.

The old-server GUI update e2e (#524) requires the plain update of this
machine's 0.7.0/0.7.1 daemon to be refused so that only Force starts its
recovery, as the 0.7.2 upgrade note says. Only a linked host's old daemon
takes a normal update through its own updater.
@andrebrait andrebrait changed the title fix(hosts): update an old host daemon normally once recovery is offered fix(hosts): update an old linked host's daemon normally once recovery is offered Nov 18, 2026
@andrebrait

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-18T18:31:32.228277Z
We couldn’t complete this review. Comment @codex review to try again.
763e665 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@andrebrait
andrebrait merged commit 9c7b128 into main Nov 18, 2026
8 of 9 checks passed
@andrebrait andrebrait mentioned this pull request Nov 18, 2026
andrebrait added a commit that referenced this pull request Nov 18, 2026
Bumps the version to 0.7.3 and folds [Unreleased] into [v0.7.3]: the Windows tray built at release (#530), resumable omp runner downloads (#531) and the normal update of an old linked host (#533).
andrebrait added a commit that referenced this pull request Nov 18, 2026
Bumps the version to 0.7.3 and folds [Unreleased] into [v0.7.3]: the Windows tray built at release (#530), resumable omp runner downloads (#531), the normal update of an old linked host (#533) and one write lock per outbox add (#535).
@andrebrait
andrebrait deleted the fix/old-daemon-update-recovery branch November 18, 2026 23:08
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