Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(antigravity): keep swarm workers alive after the prompt ends #39905

Closedfriedman-max(GitHub profile, opens in a new tab)wants to merge 8 commits intomain fromrefs/pull/39905/headopened View on GitHub

Showing 5 changed files with 143 additions and 0 deletions (loading 2).

x
0 of 5 viewed, 5 left
69 additions and 0 deletionsapps/server/src/orchestration-v2/Adapters/AntigravityAdapterV2.test.tsModified
View file
@@ -1248,6 +1248,75 @@
describe("AntigravityAdapterV2 work after the prompt ends", () => {
+ // A swarm launch completes at once; only the board and the worker's transcript show the work.
+ it.effect("keeps the run open for swarm workers after the launch tool completes", () =>
+ Effect.gen(function* () {
+ const fs = yield* FileSystem.FileSystem;
+ const path = yield* Path.Path;
+ const profile = yield* fs.makeTempDirectoryScoped({ prefix: "t3-antigravity-swarm-" });
+ const brain = path.join(profile, "antigravity-acp", "brain");
+ const swarm = path.join(brain, "mock-session-1", ".system_generated", "swarm");
+ const logs = path.join(brain, "worker-1", ".system_generated", "logs");
+ const transcript = path.join(logs, "transcript.jsonl");
+ yield* fs.makeDirectory(swarm, { recursive: true });
+ yield* fs.makeDirectory(logs, { recursive: true });
+ yield* fs.writeFileString(
+ path.join(swarm, "members.json"),
+ JSON.stringify({
+ members: {
+ coordinator: { conversation_id: "mock-session-1", wake_mode: "working" },
+ worker: { conversation_id: "worker-1", wake_mode: "working" },
+ },
+ }),
+ );
+ yield* fs.writeFileString(
+ transcript,
+ JSON.stringify({ step_index: 0, type: "SYSTEM_MESSAGE", status: "DONE" }) + "\n",
+ );
+ const { offers, send, startTurn, throughPromptSettled, throughTerminal, usage } =