You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(ssh): defer managed serving until a connection needs it - #34593
A missing SSH serving file could stop Orca from opening, even when the user only needed local workspaces. Orca now loads that file when a managed connection needs it. A missing file still fails the managed operation.
What Changed
Separate existing status constants and listener registration from managed serving execution. The tunnel manager loads execution code from its serving callback. Status listeners still work when registered before that import or replaced while a wake is pending.
Why
Three eager runtime imports pulled the serving implementation into desktop startup. Moving only the tunnel import would leave the constant and listener consumers eager. This changes all three edges while retaining tunnel ownership, shutdown, serving checks, and cached verdicts. It does not repair quarantined files or change antivirus detection.
No layout or interaction changes. A disposable production-build copy was launched with an isolated profile and all windows hidden. The intact control started. Removing only the serving chunk reproduced the failure before the fix. The fixed copy rendered its root with the same chunk removed.
I manually tested these changes locally. Actual built Electron startup on macOS, including the intact control and missing-chunk comparison above.
Automated tests added/updated. The import/shutdown regression failed before the fix. Five focused suites passed 45 tests. Tests also verify deferred import errors and listener registration/replacement.
pnpm build:electron-vite and pnpm tc:node passed.
pnpm check:changed --maxWorkers=2 passed all 19 checks.
Native Windows antivirus quarantine, Linux, WSL, and live SSH were not exercised. The missing artifact was simulated on macOS. Full native packaging and the complete unit suite remain for CI.
AI Disclosure
Developed with OpenAI Codex. GPT-6 Astra and GPT-6.1 Sol independently reviewed the final production diff.
Review
Review found no actionable issues. No platform-specific APIs, paths, shell commands, wire schemas, permission checks, or database formats change. Local, SSH, and WSL tunnel consumers retain their behavior. Existing serving cache and shutdown code remain in place. The implementation import is cached by the module loader. No renderer design, provider integration, or git-provider behavior changes.
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
X/Twitter handle not provided.
Checklist
This PR is small and focused.
I explained what changed and why.
Before/after startup evidence is included above.
Self-reviewed for correctness, security, and performance.
Cross-platform, SSH/remote, and path/shortcut impact considered.
Full pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass. Local scoped checks are listed above; CI covers the complete checks.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Walkthrough
The change moves managed-serving result types, status details, and listener state into a separate module. The serving implementation retrieves the current listener for start and settlement notifications. The managed tunnel manager now dynamically imports the serving implementation when it runs a serving check. Tests cover listener registration and replacement, plus behavior when the serving implementation is unavailable.
Priority: Normal
Severity of issue fixed: Medium
Merge Risk: Minimal · up to 187c9
Local-only startup and shutdown do not require the managed-serving chunk. No actionable merge-blocking risk remains after normal checks.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within survi…
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
Title check
The title clearly and concisely describes the primary change: managed serving is deferred until a connection requires it.
Description check
The description follows the repository template and explains the user impact, implementation, rationale, linked issue, startup evidence, testing, limitations, AI disclosure, review notes, and checklis…
Linked Issues check
Issue #34378 requires deferred loading of the managed-serving chunk so a missing file does not block startup, while a managed operation still fails when it needs the file. The PR moves status types, c…
Out of Scope Changes check
The reviewed changes stay within issue #34378. They separate serving state from serving execution, defer the managed-serving import, update dependent imports, and add regression tests. These changes s…
Full details: Description check
Explanation
The description follows the repository template and explains the user impact, implementation, rationale, linked issue, startup evidence, testing, limitations, AI disclosure, review notes, and checklist status. It clearly states that full local validation was not run and that CI is expected to cover it.
Full details: Linked Issues check
Explanation
Issue #34378 requires deferred loading of the managed-serving chunk so a missing file does not block startup, while a managed operation still fails when it needs the file. The PR moves status types, constants, and listener state into orcad-managed-serving-state, removes the static serving import from orcad-managed-tunnel.ts, and dynamically imports orcad-managed-serving from ensureServing. The added tests cover shutdown without the serving implementation, deferred import errors, and listener registration or replacement. The reported focused tests and build checks also passed.
Full details: Out of Scope Changes check
Explanation
The reviewed changes stay within issue #34378. They separate serving state from serving execution, defer the managed-serving import, update dependent imports, and add regression tests. These changes support startup resilience and preserve managed-operation failure behavior. No antivirus detection, file repair, renderer, provider, or unrelated platform behavior changes are shown.
Full details: Docstring Coverage
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 3 functions across 10 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
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.
Thank you for this. Closing it because lazily importing the serving module doesn't fix #34378. The roughly 123 KB that antivirus flagged moves into orcad-managed-crash-loop-* and orcad-managed-tunnel-* chunks, which main still loads at startup, so a content-based verdict would flag those instead. Other startup paths also import the tunnel statically. A real fix needs either a larger refactor that takes the whole managed-server lifecycle off the startup path, or a clear missing-chunk error at bootstrap, so I've flagged #34378 for a maintainer decision.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
A missing SSH serving file could stop Orca from opening, even when the user only needed local workspaces. Orca now loads that file when a managed connection needs it. A missing file still fails the managed operation.
What Changed
Separate existing status constants and listener registration from managed serving execution. The tunnel manager loads execution code from its serving callback. Status listeners still work when registered before that import or replaced while a wake is pending.
Why
Three eager runtime imports pulled the serving implementation into desktop startup. Moving only the tunnel import would leave the constant and listener consumers eager. This changes all three edges while retaining tunnel ownership, shutdown, serving checks, and cached verdicts. It does not repair quarantined files or change antivirus detection.
Linked Issue
Fixes #34378.
Visual Proof
No layout or interaction changes. A disposable production-build copy was launched with an isolated profile and all windows hidden. The intact control started. Removing only the serving chunk reproduced the failure before the fix. The fixed copy rendered its root with the same chunk removed.
Before:
After:
{"phase":"green","startup":"passed","ready":true,"windowsHidden":true}Testing
pnpm build:electron-viteandpnpm tc:nodepassed.pnpm check:changed --maxWorkers=2passed all 19 checks.AI Disclosure
Developed with OpenAI Codex. GPT-6 Astra and GPT-6.1 Sol independently reviewed the final production diff.
Review
Review found no actionable issues. No platform-specific APIs, paths, shell commands, wire schemas, permission checks, or database formats change. Local, SSH, and WSL tunnel consumers retain their behavior. Existing serving cache and shutdown code remain in place. The implementation import is cached by the module loader. No renderer design, provider integration, or git-provider behavior changes.
Agent skill upstream boundary
Notes
X/Twitter handle not provided.
Checklist
pnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass. Local scoped checks are listed above; CI covers the complete checks.