Repository navigation
fix(test): stabilize system SSH transport integration - #11597
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe SSH integration fixture adds relay runtime stubs, expands the remote 🚥 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 3d848856-8b65-4c16-aedc-3bd96d30f7e4
📒 Files selected for processing (1)
src/main/ssh/ssh-system-transport.integration.test.ts
Greptile SummaryThis PR fixes three pre-existing bugs in the SSH system-transport integration test fixture and extracts a display-mode predicate to keep the session screen file under its max-lines ratchet. No production behavior changes.
Confidence Score: 5/5Safe to merge — all changes are test-fixture corrections and a mechanical predicate extraction with no production code path affected. Every production call site for the extracted predicate is a direct mechanical replacement with identical logic; the SSH changes touch only the test fixture and add well-targeted progress assertions that match the exact strings emitted by the production deploy function. Files Needing Attention: No files require special attention.
|
| Filename | Overview |
|---|---|
| src/main/ssh/ssh-system-transport.integration.test.ts | Three bugs fixed: missing relay-watcher.js/managed-hook-runtime.js artifacts in the fixture (causing a real npm install), a 20-second leaked fake relay process, and a duplicated protocol parser in the --connect path replaced with a clean socket proxy. Progress assertions now guard the warm-install path. |
| mobile/src/session/mobile-session-route-helpers.ts | Adds isTerminalPhoneDisplayMode predicate extracted from the large session screen component. Logic is identical to the removed inline function; signature widens the map to ReadonlyMap and is fully compatible with the Map<string, MobileDisplayMode> state. |
| mobile/src/session/mobile-session-route-helpers.test.ts | New test file covering all five branches of isTerminalPhoneDisplayMode (auto, phone, missing handle, null, desktop). Coverage is complete. |
| mobile/app/h/[hostId]/session/[worktreeId].tsx | Removes the inline isPhoneMode closure and replaces three call sites with the extracted isTerminalPhoneDisplayMode. Change is mechanical and behaviorally identical. |
Reviews (3): Last reviewed commit: "fix(test): exercise fake relay socket br..." | Re-trigger Greptile
* fix(test): stabilize system SSH transport integration * fix(lint): extract terminal display mode predicate * fix(test): exercise fake relay socket bridge
Summary
npm installand close the fake detached relay after its readiness probe.mainremains below its max-lines ratchet without a disable or limit increase.Screenshots
No visual change.
Testing
pnpm lintpnpm typecheckpnpm testpnpm buildFocused verification:
pnpm exec oxlint --format default— 0 warnings, 0 errors across 11,025 filespnpm run check:max-lines-ratchetpnpm run typecheck:nodeThe full
pnpm testrun passed the SSH transport integration file and completed 41,639 tests successfully. It reported four failures outside this change: two environment-sensitive assertions inagent-exec-handler.test.tsand two timeouts inpty-subprocess.test.ts.AI Review Report
Reviewed the fixture against the current relay install and native dependency probe contracts. The review found that the fixture lacked
relay-watcher.jsand a workingnode-pty/lib/utilsprobe stub, so the intended warm-install test performed a real upload andnpm install. It also found that the fake detached relay stayed alive for 20 seconds after the test. Both issues are fixed, and progress assertions now guard the warm path.The initial CI run also exposed an unrelated max-lines regression already present on current
main. The terminal display-mode predicate was moved into the existing session route domain module with focused tests; behavior and styling are unchanged.Cross-platform review covered macOS, Linux, and Windows. The SSH fixture remains explicitly POSIX-only and skipped on Windows; added paths use
node:path, no production shortcuts or labels changed, no Electron behavior changed, and no production SSH shell behavior changed. The mobile extraction preserves the existing display-mode behavior on every platform.Security Audit
The SSH change has no production input, auth, IPC, or dependency changes. Reviewed temporary path handling, fake shell execution, process cleanup, and dependency behavior. All commands operate on test-generated paths, and the change removes the test's unintended external package installation. The mobile follow-up is a pure predicate extraction with no new input or side effects.
Notes
The local full-suite run used Node 26 while the repository declares Node 24. No production SSH behavior changed.