Repository navigation
Refresh SSH status after manual managed-server updates - #26665
Conversation
074e1c6 to
68cf6a6
Compare
94c8fbe to
525c8ca
Compare
|
Triage adjustment: rebased onto the updated #26663 (main plus one commit). The update action now calls a guarded clearManagedServerNotes(targetId, environmentId) instead of publishing a fresh managed status. It clears only update and serving notes, and only when the host's current status is already managed for that same environment. That way a manual update can't turn a relay or source-changed host into a managed one, or touch a host linked to another server. Dropped the new 220-line Docker manual-update spec and its workflow and routing changes, so this P2 fix adds no load to the Docker lane; the unit tests cover the action ordering, override refresh, and guard cases. |
525c8ca to
a736f33
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (5)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughManaged-server status publication now uses SSH target IDs, updates retained relay overrides, and broadcasts the managed-server status. A new function clears update and serving notes for a matching managed environment. Runtime maintenance actions call the clearing function for eligible update outcomes, after transport invalidation when applicable. Tests cover publication, note clearing, update outcomes, and error handling. Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to The note-clearing change is mergeable after normal checks; no remaining issue is established. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
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 |
ELI5
After Orca finishes updating a server, SSH Settings should stop saying the update is waiting. It now clears that old message as soon as the new server has been verified, while keeping the running terminal alive.
What Changed
A successful manual update now republishes the linked SSH host’s managed status through the existing host store and desktop/remote notifications. It does this after retiring the old client connection. An already-current result also clears the old note; deferred and failed updates retain their diagnostic.
Generalize the existing status publisher to accept a target ID and refresh any retained connection override. Add action/publication regressions and a separate real-host manual-update test. The existing idle-update control is preserved. The new test reuses the existing connect helper without disconnecting the launch-time connection, and runs in the dedicated Docker conversion lane.
Why
The owned Linux host successfully activated the new version, reported
deferredUpdate: null, and answered terminal requests with the same surviving terminal and pre-update output. SSH Settings still said “Runs a managed Orca server; it updates on a later connect.” Retiring the client connection did not refresh the earlier host decision.Publishing the verified result uses the existing status owner and subscriber path. Polling Settings or hiding every deferred message would add another source of state and could suppress a real deferral.
Linked Issue
Found during SSH → Remote consolidation testing. Maintainer fix; no separate issue opened.
Visual Proof
Before: after a verified successful update, Settings still says the update is waiting.
After: the old deferral disappears immediately; the host remains connected.
Actual failing baseline · Actual corrected ten-case host suite · Three failing baseline action cases
Testing
On macOS with hidden Electron renderers and owned Linux Docker SSH hosts: deploy template A, create a real terminal with a captured PID and output marker, restart the app with template B, and confirm the live terminal defers the automatic update. Open SSH Settings, force the update through the existing desktop API, then check the host’s active version, absence of a backend deferral, surviving PID/handle/output, and immediate removal of the rendered deferral. Close the same terminal and verify its process exits.
The unchanged client baseline fails the final rendered assertion in 23.9 seconds. The corrected case passes in 13.5 seconds. All ten conversion/update/stdio/alternate-port/idle/reconnect/reboot cases pass in 3.1 minutes.
154 affected tests / 16 files pass. They cover verified updates and already-current outcomes, retirement ordering, failed/deferred outcomes, both notification recipients, retained overrides, disconnected contact, unverifiable evidence, and isolation from another host. Full
pnpm tc, fullpnpm lintplus final affected-harness lint, changed-code quality, fresh Electron e2e build, and commit hooks pass.Review
P2; low merge risk. Stacked on #26663; merge #26637 → #26645 → #26663 first. Product changes are limited to publishing the existing verified update result and reusing the current status publisher. Check that failed/deferred updates keep their warning and a disconnected SSH connection remains disconnected when its host status is refreshed.
Agent skill upstream boundary
Notes
No RPC schema, update policy, terminal lifetime, host capability, Git-provider, or platform-specific changes. Both desktop IPC and existing runtime RPC use these same registered actions. Existing optional host-status fields are preserved for older peers. Folder workspaces do not need a Git worktree for status publication. Native Windows runtime was not exercised locally.
CI is fully green: 26 successful checks and 22 conditional skips, including the Docker conversion/manual-update lane, native package lanes and final verify. Parent #26663 is fully green too. The original Node shard 6/10 failed the unchanged remote-runtime-client WebSocket admission test because its short request deadline fired before the close event; 11,489 tests passed, one expected failure and 77 skips. That receipt is retained; one failed-job retry passed without source changes.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)