fix(ssh): stop killing the managed server on reconnect #13341
Closedmorgaesis(GitHub profile, opens in a new tab)wants to merge 3 commits into
main fromrefs/pull/13341/headopened View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XS
- packages/ssh/src/tunnel.test.ts line 372OutdatedResolvedby morgaesis(GitHub profile, opens in a new tab)@@ -317,0 +352,21 @@352+ " );",353+ "});",354+ ].join("\n"),355+ );356+ const script = buildRemoteLaunchScript({ nodeScriptPath: serverScript });357+ const pidFile = NodePath.join(home, ".t3", "ssh-launch", "launch-test", "pid");358+ const runtimeFile = NodePath.join(home, ".t3", "userdata", "server-runtime.json");359+ const pids = new Set<number>();360+ const managedPid = () => {361+ const pid = NodeFS.readFileSync(pidFile, "utf8").trim();362+ pids.add(Number(pid));363+ return pid;364+ };365+ const launch = () => {366+ const result = NodeChildProcess.spawnSync("sh", ["-s", "--", "launch-test"], {367+ input: script,368+ env: { ...process.env, HOME: home },369+ encoding: "utf8",370+ timeout: 30_000,371+ });372+ assert.equal(result.status, 0, result.stderr);
juliusmarminge added labelsmacroscope-review
maria-rcks closed this
Sign in to join this conversation.
Approvability#
Verdict: Not approved
Macroscope's review found this PR not approvable — The SSH fix narrowly preserves a healthy managed server on reconnect while retaining handoff to a different default server, with focused real-process tests for both paths. Human review is required because the test file adds a file-level directive suppressing the
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).nodeBuiltinImportstatic-analysis diagnostic.