Repository navigation
Conversation
759b6b2 to
c5f3a4e
Compare
da5e68f to
c5f3a4e
Compare
80a1178 to
505729d
Compare
505729d to
c427775
Compare
aba5da7 to
452d566
Compare
|
Closing after an in-depth source, lifecycle, caller and test review because this implementation does not clear the performance bar in #27143: a free win, or a nonfree gain substantial enough to justify its cost. The final-head measurements in this PR show a modest saving for unused SSH: 4.48 MiB median process-tree PSS at 60 seconds across three pairs (2.36–11.26 MiB range). The 7.08 MiB figure is the earlier 3.5-second snapshot; after SSH demand, the difference falls to roughly 0.5–0.7 MiB. Meanwhile the first transport request adds 34.80 ms, maximum main-thread delay adds 30.85 ms, and overlapping IPC delay adds 29.60 ms. SDK evaluation remains synchronous on main; the timed transport request also does not cover every managed activation path. That is not a free improvement, and these savings do not justify the added transport/full/compatibility loading stages, proxy registration and readiness states, cancellation/quit fences, and lifetime ownership spread across 50 changed files plus the lifecycle dependency. The staged quit controls are valuable validation of hazards introduced by deferral; they do not establish a separate functional benefit sufficient to carry this patch. The focused controls and green CI support correctness in their tested scope, but do not change this cost/benefit judgment. This closes the current implementation on its measured merits, not because of conflicts, missing benchmarks, or a claim that lazy SSH is already shipped. The branch is preserved. A substantially smaller/free version or evidence of a substantially larger whole-path benefit would warrant a new proposal. |
ELI5
Local-only sessions keep saved SSH targets available without loading the active SSH implementation. Testing a connection loads one shared transport/authentication owner; managed connections load deployment, restoration and compatibility code on demand. A queued quit can stop the remaining loading stages before they initialize an owner.
What Changed
Reuse the existing process manager, credential callbacks, cancellation registry and quit drain. Managed initialization upgrades the same owner, and saved-target restoration still completes before renderer/headless publication. Check committed quit between loading stages and before initialization. Load the public CommonJS SSH2 entry lazily; fixed yields let queued work run between stages. Automation wiring stays behind its existing asynchronous demand import. No protocol or public IPC signature changes.
Head
e6987e7581d209974b90ff696119c5ca696b7880depends on lifecycle #33891 atc427775815e7fac53cf268248403b8524b444f2a. Benchmark-only #33912 was reverted by #34162; measurement programs and reports remain external validation artifacts.Measurements and tradeoffs
Six alternating fresh Linux Electron process pairs compare the production-built eager lifecycle parent with this head:
Three additional alternating untouched-profile pairs sample 3.5, 30 and 60 seconds. At 60 seconds, paired process-tree PSS is 4.48 MiB lower (range 2.36–11.26 MiB lower), and main-process PSS is 5.99 MiB lower. All final apps retain zero SSH2 CJS files versus 21 eager files through 60 seconds. The 30-second range crosses zero; shared-host load and GC variation limit interpretation. This supports a modest saving for unused SSH in these Linux profiles, not a universal percentage or long-term steady-state guarantee.
Staging and the CommonJS correction do not establish a reliable latency improvement over the prior narrowed loader. Their demonstrated benefit is quit progress: nine independent controls prove a quit queued during SDK evaluation runs before subsequent transport/full/compatibility initialization. SDK evaluation remains synchronous on main, and loaded modules remain for the process lifetime. No historical combined-stack 3% figure is attributed to this implementation.
Validation
ORCA_BACKGROUND_LAUNCH=1 pnpm check:changed --maxWorkers=2 --base=c427775815e7fac53cf268248403b8524b444f2apassed 20/20 checks in 832.0 seconds. The lifecycle dependency separately passed 19 checks and hosted CI.Visual Proof
Final hidden CDP screenshots were directly inspected. The managed remote shell returns
QA_CLI_READYwith a converted folder row and remote explorer; rejected credentials render the specific authentication failure after Cancel. The production deploy/forward/quit harness is separate from this E2E-mode renderer. No test window was shown or focused on the user’s desktop.Compatibility and limits
Source review, deterministic controls and the stated Linux journeys cover connection ownership, credentials, saved state, folder workspaces and unchanged mixed-version contracts. Native macOS/Windows/WSL and authentication methods are covered where the corresponding workflows actually run. Linux Docker success does not establish every native or mobile journey. Cold managed deployment has functional proof; the timing workload measures the first transport request, not every managed activation path.
Agent skill upstream boundary