Repository navigation
fix(ai-vault): give Orca servers reached over SSH the 15 s all-hosts scan budget - #31226
Conversation
…scan budget (#31139) All hosts gave every Orca server a 3 s scan, including the managed servers Orca reaches through an SSH tunnel, which now serve every SSH host. A healthy SSH host walking a large home timed out and showed up empty. The saved environment's connectionDependency now picks the 15 s budget for tunnelled servers; direct LAN/Tailscale servers keep 3 s. Reported, with the proposed approach, by @quzard in #31139.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to
|
ELI5
In Agent Session History, All hosts asks every connected computer for its sessions and waits a fixed time for each. Computers Orca reaches over SSH only got 3 seconds, which is often not enough to read a large history over a tunnel, so they came back empty. They now get 15 seconds, the same budget the old SSH path had.
What Changed
Mechanism: the all-hosts fan-out (
src/main/ipc/ai-vault.ts) gave every Orca serverruntimeScan= 3 s. Since #27214 removed the SSH relay client, every SSH host is served by a managed Orca server through an SSH tunnel, so the 15 ssshScanRelaybudget inai-vault-all-host-timeouts.tswas no longer used by anything and SSH hosts silently fell to 3 s. The saved environment record already says how a server is reached:connectionDependency: 'ssh-tunnel'is required by the schema for every server with SSH access or a managed SSH deployment (src/shared/runtime-environments.ts).getSavedRuntimeAiVaultHostInfosnow copies that field onto the host info, andallHostsRuntimeScanTimeoutMspicks 15 s for tunnelled servers and 3 s otherwise. I also folded a duplicateRuntimeAiVaultHostInfotype into one and dropped the two dead SSH constants.Why
The environment's own
connectionDependencyis the record the rest of the app uses to decide "this server needs an SSH tunnel" (the settings row, the status owner, the managed-tunnel checks), so the budget follows the same source of truth rather than guessing from endpoints or ports. Alternatives considered: raising the budget for every server (makes one dead LAN server stall All hosts for 15 s) and returning partial results on timeout (a bigger protocol change; worth doing separately).Linked Issue
Part of #31139 (item 5, "All hosts with an Orca server reached over SSH"). Reported, with this approach, by @quzard. The issue stays open for the remaining items.
Visual Proof
N/A: no UI change; the same list now fills in for SSH hosts instead of timing out.
Testing
src/main/ipc/ai-vault.test.ts: All hosts with one direct and one tunnelled server passes 3 s and 15 s respectively (fails on main: both get 3 s).src/main/ai-vault/runtime-session-scanner.test.ts: the saved environment'sconnectionDependencyreaches the host info (fails on main).Full static-analysis job run locally on this head (all steps, including ratchets, anti-slop and localization), plus the orcad terminal smoke.
Verified only in tests; not exercised against a live SSH host.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
AI Disclosure
Review
Codex review (gpt-6.1-sol, high): clean. Independent Opus review: no P0-P2 findings.
Agent skill upstream boundary
Notes
Ensure no issues in: Security, Cross-platoform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
No wire change: the field is read from the desktop's own saved environments. WSL deployments carry no dependency value and keep 3 s.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)