Repository navigation
fix(machines): tell this app to update when a PC's own Ovis is newer - #1938
Conversation
A PC whose socket is served by its own Ovis (managed_remote false) and whose bridge version differs was always sent to "update it through its own Settings". When that server is the newer one, that points at the side that is already up to date: this app is the one to update. Pick the message by the version the descriptor or the live identity reports; the older case and the setup action stay as they were.
|
Warning Review limit reachedYou'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 32 minutes. View limit details
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. Comment |
|
Merge pass review-work report. Overall: PASSED. This is an ordinary server fix, so it was gated by Codex Sol, an omo code reviewer and the merge pass's checks.
The new "Update this app" message appears only when the version is all digits and higher than this app's ( Unchanged:
Tests: 82 pass. With main's LOW follow-up: the tests for an older server use the text "older" rather than a lower number such as "34". CodeRabbit did not review this PR (rate-limited or skipped). The reviews above stand in for it. |
Change
A remote PC whose herdr socket is served by its own Ovis (an independently managed web server,
managed_remote: false) and whose bridge version differs from this app's fails withaction_required: "setup"and one fixed message: "Update it through its own Settings, thenreconnect". That is right when that server is older, and wrong when it is newer: then that
server is already the newest side, and the one behind is this app.
server/machines.tsnow picks the message by the version the descriptor (inprepare) or thelive identity (in
verify) reports:(v36); this app requires v35. Update this app in Settings → Updates, then reconnect; that server
was left running."
The action stays
setup, nothing on the PC is touched, and managed bridges keep theirbridge_conflict/update_bridgepaths.Why
Ovis for Mac showed "Setup needed" for the maintainer's Linux PC with the old message. The PC's
own Ovis had just updated itself from 0.4.13 to 0.4.16 (bridge v32 to v35). The Mac's Ovis server
was still 0.4.13: the 0.4.16 Ovis.dmg is only the window around it. The Mac reconnected 6 seconds
after the PC's restart, found the PC's v35 server, and was told to update the PC, which was
already up to date. The fix on the Mac was to update its own Ovis.
This reverses one choice from #519 ("An independently managed web server that is newer keeps its
own message"). That PR moved such a server off
bridge_conflict, whose text ("disconnect theother app") does not fit a server nobody started from here, and that part stays. But "update it
through its own Settings" cannot help a server that is already newer. This app's own update can:
after it restarts, it reconnects to the PC by itself.
Validation
a worktree with
REMOTE_BUNDLE_VERSIONraised to 36, and a second server (isolated state,port 0) running this branch as the client.
POST /api/machines/setup {destination: "localhost", session: "rsn-qa"}, thenGET /api/machines/setup/:id:failed,action_required: "setup", "...Update it through its own Settings, thenreconnect; it was left running." (the text the Mac showed)
failed,action_required: "setup", "...of a newer version (v36); this apprequires v35. Update this app in Settings → Updates, then reconnect; that server was left
running."
server/machines.test.ts(descriptor path) andserver/machine-update.test.ts(live-identitypath) cover the newer case: 82 pass. On main's
server/machines.tsexactly those two cases fail.The older-server cases are unchanged and pass.
bun run check fast: pass.Not changed (follow-ups)
reason line changes.
MachineActionRequiredstill never retries. When the PC's own Ovis is the one behind andupdates later, this app waits until the user reconnects, as the message says.