Skip to content

Refresh SSH status after manual managed-server updates - #26665

Merged
OrcaWin merged 1 commit into
mainfrom
nwparker/managed-update-host-status
Oct 9, 2026
Merged

OrcaWin merged 1 commit into
mainfrom
nwparker/managed-update-host-status

Conversation

@nwparker

@nwparker nwparker commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​165 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​165
Prod 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​34 $\color{#cf222e}{\Huge{\mathbf{−}}}$​9 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​25

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.

Before

After: the old deferral disappears immediately; the host remains connected.

After

Actual failing baseline · Actual corrected ten-case host suite · Three failing baseline action cases

Testing

  • I manually tested these changes locally
  • Automated tests added/updated

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, full pnpm lint plus 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

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

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

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@OrcaWin
OrcaWin force-pushed the nwparker/managed-serving-status-copy branch from 074e1c6 to 68cf6a6 Compare October 9, 2026 05:33
@OrcaWin
OrcaWin requested a review from brennanb2025 as a code owner October 9, 2026 05:33
@OrcaWin
OrcaWin force-pushed the nwparker/managed-update-host-status branch from 94c8fbe to 525c8ca Compare October 9, 2026 05:35
@OrcaWin

OrcaWin commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

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.

@OrcaWin
OrcaWin changed the base branch from nwparker/managed-serving-status-copy to main October 9, 2026 06:01
@OrcaWin
OrcaWin force-pushed the nwparker/managed-update-host-status branch from 525c8ca to a736f33 Compare October 9, 2026 06:01
@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ec2642f5-4f69-4d87-bf10-7b6e357f4ffc
📥 Commits

Reviewing files that changed from the base of the PR and between b79862d and a736f33.

📒 Files selected for processing (5)
  • src/main/ipc/managed-host-status-publication.test.ts
  • src/main/ipc/managed-orcad-actions.ts
  • src/main/ipc/orcad-runtime-maintenance-handlers.test.ts
  • src/main/ipc/runtime-environment-managed-tunnel.ts
  • src/main/ipc/runtime-environments.ts

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


📝 Walkthrough

Walkthrough

Managed-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 a736f

The note-clearing change is mergeable after normal checks; no remaining issue is established.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 30.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 5 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: refreshing SSH status after manual managed-server updates.
Description check Passed The description follows the repository template and explains the user impact, implementation, rationale, testing, visual proof, scope, compatibility considerations, and checklist status. The missing i…
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.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@OrcaWin
OrcaWin merged commit bcb7305 into main Oct 9, 2026
30 checks passed
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.

2 participants