Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): t3 run from a T3 terminal no longer trips on the service's launcher context #14263

Mergedplaycations(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/14263/headmerged by juliusmarminge View on GitHub

Showing 2 changed files with 23 additions and 10 deletions.

x
0 of 2 viewed, 2 left
18 additions and 2 deletionsapps/server/src/cloud/serviceLauncherClient.test.tsModified
View file
@@ -12,12 +12,13 @@
import * as ServiceLauncherClient from "./serviceLauncherClient.ts";
​
class FakeLauncherProcess {
- readonly connected = true;
+ readonly connected: boolean;
readonly env: Record<string, string | undefined>;
readonly sent: ServiceLauncherChildMessage[] = [];
readonly #listeners = new Map<string, Set<(...args: ReadonlyArray<unknown>) => void>>();
​
- constructor(context: unknown) {
+ constructor(context: unknown, connected = true) {
+ this.connected = connected;
this.env = { [SERVICE_LAUNCHER_CONTEXT_ENV]: JSON.stringify(context) };
​
@@ -136,3 +137,18 @@
expect(error.message).toBe("The service launcher supplied invalid startup context.");
}),
+​
+it.effect("ignores launcher context inherited without an IPC channel", () =>
+ Effect.gen(function* () {
+ const host = new FakeLauncherProcess(
+ { protocol: SERVICE_LAUNCHER_PROTOCOL, childVersion: "1.0.0" },
+ false,
+ );
+ const client = yield* makeClient(host, "1.1.0");
+ const error = yield* client