Repository navigation
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📥 CommitsReviewing files that changed from the base of the PR and between 985d03b9eb821b8c2c12ab147f6a1987023c46d5 and 7146181779a59000c05088a21dad802d35a8bfe2. 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe change adds runtime app-version reporting, cached client-version retrieval, SemVer-based skew evaluation, and skew propagation through runtime status, host registry, sidebar models, and host warnings. Localized messages support outdated and update-recommended states. It also adds shared-control session probes with configurable timing, stale-session detection, reconnect handling, socket cleanup, and tests covering silent and responsive relayed sessions. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/shared/remote-runtime-shared-control-session-probe.ts (1)
57-84: 🩺 Stability & Availability | 🔵 Trivial | 💤 Low valueSuccess branch lacks the same stale-socket guard as the failure branch.
The
catchbranch re-checksthis.hooks.getSocket() === probedSocketbefore callingforceClose, to avoid acting on a stale probe after an unrelated reconnect. The success branch'sthis.schedule()has no equivalent guard — it currently can't misfire only becausecloseSharedControlSocketunconditionally rejects all pending requests on any socket close, so a stale probe's promise can never resolve. This is correct today, but it's an implicit dependency on that rejection invariant rather than something enforced locally in this file.For symmetry and to guard against a future refactor of the pending-request cleanup path, consider skipping
this.schedule()in the success branch too whengetSocket() !== probedSocket.🛡️ Optional defensive guard
const probedSocket = this.hooks.getSocket() try { await this.hooks.probe(this.hooks.timeoutMs) - this.schedule() + if (this.hooks.getSocket() === probedSocket) { + this.schedule() + } } catch (error) {
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 7139a70e-a410-4437-b6df-10e4caf541e2
📒 Files selected for processing (25)
src/main/runtime/orca-runtime.tssrc/renderer/src/components/settings/RuntimeEnvironmentsPane.tsxsrc/renderer/src/components/sidebar/HostSectionHeaderMenu.tsxsrc/renderer/src/components/sidebar/WorktreeList.tsxsrc/renderer/src/components/sidebar/host-header-menu-items.test.tssrc/renderer/src/components/sidebar/host-header-menu-items.tssrc/renderer/src/components/sidebar/host-section-rows.tssrc/renderer/src/components/sidebar/sidebar-host-options.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/renderer/src/runtime/client-app-version.tssrc/renderer/src/store/slices/runtime-status.tssrc/shared/app-version-skew.test.tssrc/shared/app-version-skew.tssrc/shared/execution-host-registry.test.tssrc/shared/execution-host-registry.tssrc/shared/remote-runtime-shared-control-connection.test.tssrc/shared/remote-runtime-shared-control-connection.tssrc/shared/remote-runtime-shared-control-ready.tssrc/shared/remote-runtime-shared-control-session-probe.tssrc/shared/remote-runtime-shared-control-types.tssrc/shared/runtime-types.ts
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 7635f31f-c758-437e-80b9-e5625934e428
📥 Commits
Reviewing files that changed from the base of the PR and between 3865d6d and 97d17460e3d336c30fa52e32d31813c1c419b2f1.
📒 Files selected for processing (10)
src/renderer/src/App.tsxsrc/renderer/src/components/sidebar/RuntimeVersionSkewNudge.tsxsrc/renderer/src/components/sidebar/runtime-version-skew-nudge-plan.test.tssrc/renderer/src/components/sidebar/runtime-version-skew-nudge-plan.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/shared/remote-runtime-shared-control-session-probe.ts
🚧 Files skipped from review as they are similar to previous changes (3)
- src/shared/remote-runtime-shared-control-session-probe.ts
- src/renderer/src/i18n/locales/en.json
- src/renderer/src/i18n/locales/zh.json
Evidence (end-to-end)The PR surfaces version skew in three places. These captures are from a real setup: an actual 1. Proactive toast on skew detection (skill-freshness-nudge pattern; default Projects view, no host filter needed). One toast per environment per version pair per session — periodic probes never re-nag — with a 2. Sidebar host header for the same paired server (host-filter view) — amber caution icon + "Server outdated" detail: 3. Host menu — amber "Server update recommended" item; its tooltip carries the full sentence ("This Orca server (1.4.146) is older than your app (1.4.147). Update the server, or some features may fail."). This capture predates the live-pairing setup and used staged store data; the rendering is identical and driven by the same verdict: The reverse direction (server newer than client) renders the same surfaces with "App outdated" / "App update recommended" wording. Also applied the reviewer suggestion to mirror the stale-socket guard on the session probe's success branch. |
7146181 to
899fc56
Compare
|
Rebased onto current main. One real conflict: |
|
Associating this PR with related issue(s): #7718 |
1 similar comment
|
Associating this PR with related issue(s): #7718 |
|
Rebased onto current main (~84 new commits). Notable overlap this round: #9839 (remote server updates) landed its own |
899fc56 to
641eafd
Compare
… after serve restarts - status.get now reports the server's appVersion; clients evaluate a non-blocking skew verdict (new shared/app-version-skew.ts) and surface amber warnings in the sidebar host header and host menu, both directions. Protocol-incompatibility blocking is unchanged and takes precedence. - Shared-control connections gain an app-level liveness probe (status.get every 15s while subscribed). A serve restart behind a relay that keeps the socket open no longer strands worktree-graph subscriptions: a failed probe force-closes the socket and reuses reconnect + replay.
The sidebar host-header warning only renders in explicit host-filter views, so skew needed a bottom-right nudge (skill-freshness pattern): one warning toast per environment per version pair per session, with a Manage server action. Also guard the session probe's success branch against stale sockets (review feedback).
…unavailable The name can lag the first probe (pairing races status refresh) or be unset; showing an opaque environment id in the toast title was worse than a generic title. Found while capturing end-to-end evidence.
|
Rebased onto current main. Two small conflicts, both resolved as unions: |
641eafd to
454f156
Compare
|
As the summary says, this PR is really two independent fixes — it is being split so each can be reviewed on its own. Now open, both self-contained against current
The two fixes share no files, so the split is clean. The remaining ~540 changed lines here — the skew surfacing UI (sidebar host-header warning + menu item, proactive toast nudge, i18n strings, execution-host-registry passthrough) — exceeded a reasonable single-PR budget on top of #10234, so this PR will be rebased and shrunk to exactly that UI layer once #10234 and #10235 land. Not closing this PR. |
|
Closing in favor of the split: #10234 (app-version skew detection) and #10235 (self-heal stale subscriptions after serve restarts) — both are self-contained against current main with all review findings resolved. The end-to-end evidence in this PR's thread applies to the combined behavior and remains valid for both. |
Servers report appVersion in status.get; the renderer derives a non-blocking AppVersionSkew verdict when ingesting runtime status. UI surfacing stays in stablyai#9614. Split out of stablyai#9614.
Add an encrypted session probe to the shared control connection: a WS-terminating relay answers protocol pings itself, so a restarted orca serve behind it looks alive while its subscription registry is gone. A failed probe force-closes into the existing reconnect+replay machinery. Split out of stablyai#9614.



Summary
Two connection-layer fixes for desktop clients paired with a remote
orca servehost, both hit in the field on 2026-07-20 with a headless server on v1.4.146 and a desktop client that had auto-updated to v1.4.147:1. App-version skew is now detected and surfaced instead of failing downstream with misleading errors.
The runtime WS connect path exchanged no app version at all: the E2EE handshake (
e2ee_hello/e2ee_auth) carries none, andstatus.getonly carried the protocol number, which hard-blocks solely on true protocol incompatibility. A client running ahead of its server (desktop auto-update raced the server's twice-daily update) failed with errors like "could not launch claude in a new terminal", with no hint that the real cause was version skew. Now:status.getincludes the server'sappVersion, and the client evaluates a non-blocking skew verdict against its own version in the new dependency-freesrc/shared/app-version-skew.ts(semver-style compare including-rc.Nprereleases; a live server that reports noappVersionprovably predates this feature and is treated as older; unparseable versions stay silent).2. Stale worktree subscriptions after a serve restart behind a WS-terminating relay are now self-healing.
Same day, second report: the serve process restarted (auto-update) while a client stayed connected via a relay. The client's worktree-graph subscription lives in the server's in-memory registry, which died with the old process; worktrees created after the restart never appeared in the client sidebar until a manual app reload — even though both builds already contained the #7827 socket-liveness monitor (merged 2026-07-08, i.e. before this incident). That monitor pings at the RFC 6455 control-frame layer and declares death on inbound silence — but a WS-terminating relay answers protocol pings itself, so pongs prove only that the relay is reachable, not that the E2EE session behind it is alive. Fix: a session-level probe on the shared-control connection (
SharedControlSessionProbe) sends an encryptedstatus.getevery 15s while subscriptions are active (10s timeout). Only the server holding the connection's session keys can answer, so a relay can't fake it; a failed probe force-closes the socket and reuses the existing reconnect + replay(+tag) machinery from #7827/#7718 unchanged. This complements — not replaces — the socket-level monitor: that one is cheaper and catches half-open TCP; the session probe catches "transport up, session dead".The
src/relay/SSH path is untouched — it already has its own wire-level version handshake (relay-handshake.ts).Screenshots
In the PR comments: captured end-to-end from a real
orca serveat app version 1.4.100 paired to a 1.4.147-rc.4 client over the production WS/E2EE path — toast, sidebar host header, and host menu.Testing
pnpm lint— passes except two pre-existingswitch-exhaustivenesserrors (skill-freshness-group.tsx,daemon-server.ts) that reproduce identically on pristineupstream/mainwith no working-tree changes; not introduced by this PR.pnpm typecheckpnpm testpnpm buildNew/updated tests:
src/renderer/src/components/sidebar/runtime-version-skew-nudge-plan.test.ts— toast cadence: new skew shows, same version pair never re-nags within a session, changed pair re-notifies, resolution clears only on a reachable matching probe (unreachable blips don't reset dedupe), multi-environment independence.src/shared/remote-runtime-shared-control-connection.test.ts— repro of the field bug: server answers the first subscription, then goes silent with autoPong still enabled (relay answering pings), asserting the session probe force-reconnects and replays the subscription with no consumer-visible close. Also: probes keep a healthy connection on one socket; no probing while only one-shot requests are active.src/shared/app-version-skew.test.ts— match/older/newer, missing server version, rc ordering (rc.10>rc.2), release-vs-rc, unparseable versions stay silent, build metadata ignored.src/shared/execution-host-registry.test.ts— skew passes through to runtime host entries; a stale skew verdict is dropped when a probe records the server unreachable.src/renderer/src/components/sidebar/host-header-menu-items.test.ts— skew surfaces for usable hosts; a blocking verdict wins over skew.AI Review Report
Reviewed by Claude Code (agent-driven end to end). Checks performed:
unref()guarded for DOM typings (mobile mirrors shared code), no path/shortcut/shell handling touched.src/relay/, which has its own version handshake) and local execution are untouched. Skew is only evaluated for reachable remote runtime statuses, never for local/SSH hosts.upstream/main; the session probe was deliberately re-layered on top of fix: Remote Orca Server reconnect liveness — recover mirrors, input routing, and creates after tunnel drops #7827's socket-liveness + replay-tagging machinery rather than duplicating it, and reuses its close→reconnect→replay path unchanged.markReadyrestarts it); old servers (missingappVersiontreated as older by construction — any server without this code predates it); old clients (ignore the new optional field); noise control (skew warning is non-blocking amber, never toasts, and is dropped when the host is unreachable or blocked).text-amber-*), destructive red reserved for blocking states; tooltips/menu per existing host-header patterns; localization catalog synced for all five locales.Security Audit
appVersionis parsed with a strict anchored regex (parseAppVersion); unparseable/hostile strings yield no verdict and are never interpolated into anything but a UI string. Noeval/dynamic code.protocol-compat.ts's pattern).updater:getVersionhandler.Notes
appVersion; clients with this change show "Server outdated" for it (correct by construction), with a version-less tooltip message.lint:switch-exhaustivenessfailures noted above reproduce byte-identically on pristineupstream/main(skill-freshness-group.tsx:101,daemon-server.ts:652) — pre-existing, and worth a separate fix.