Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(provider-grok): close background shells when Grok 1.0.50 finishes them #17504

Closed3xcalibur-tech(GitHub profile, opens in a new tab)wants to merge 5 commits intomain fromrefs/pull/17504/headopened View on GitHub

Showing 6 changed files with 150 additions and 0 deletions (loading 4).

x
0 of 6 viewed, 6 left
101 additions and 0 deletionsapps/server/src/orchestration-v2/GrokOrchestratorV2.live.test.tsModified
View file
@@ -1,3 +1,6 @@
+import * as NodeFS from "node:fs";
+import * as NodeOS from "node:os";
+import * as NodePath from "node:path";
import * as ServerSecretStore from "../auth/ServerSecretStore.ts";
import * as SourceControlProviderRegistry from "../sourceControl/SourceControlProviderRegistry.ts";
import * as NodeServices from "@effect/platform-node/NodeServices";
@@ -35,6 +38,7 @@
import * as ServerSettings from "../serverSettings.ts";
import * as VcsDriverRegistry from "../vcs/VcsDriverRegistry.ts";
import * as VcsProcess from "../vcs/VcsProcess.ts";
+import * as EffectWorker from "./EffectWorker.ts";
import * as Orchestrator from "./Orchestrator.ts";
import * as ProviderTurnStartServiceTestkit from "./ProviderTurnStartService.testkit.ts";
import * as RuntimeLayer from "./runtimeLayer.ts";
@@ -238,4 +242,101 @@
}).pipe(Effect.provide(layerLive), Effect.scoped),
360_000,
+​
+ it.live(
+ "closes a background shell inside the server orchestrator",
+ () =>
+ Effect.gen(function* () {
+ const orchestrator = yield* Orchestrator.OrchestratorV2;
+ yield* EffectWorker.runDaemonWithOptions({ concurrency: 2 }).pipe(Effect.forkScoped);
+ const worktreePath = NodeFS.mkdtempSync(
+ NodePath.join(NodeOS.tmpdir(), "t3-grok-live-background-shell-"),
+ );