Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): stop a second server from resending Claude turns #13295

Mergedcestercian(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/13295/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Showing 2 changed files with 91 additions and 1 deletion.

x
0 of 2 viewed, 2 left
83 additions and 0 deletionsapps/server/src/orchestration/Layers/OrchestrationEngine.test.tsModified
View file
@@ -1838,6 +1838,89 @@
await runtime.dispose();
+ it("does not republish another server's turn when a local dispatch fails", async () => {
+ const directory = await NodeFSP.mkdtemp(NodePath.join(NodeOS.tmpdir(), "t3-shared-db-"));
+ const databasePath = NodePath.join(directory, "state.sqlite");
+ const serverA = await createOrchestrationSystem(databasePath);
+ const serverB = await createOrchestrationSystem(databasePath);
+ const threadId = ThreadId.make("thread-shared");
+ const createdAt = now();
+ const sentinelCommandId = CommandId.make("cmd-shared-rename");
+ try {
+ await serverA.run(
+ serverA.engine.dispatch({
+ type: "project.create",
+ commandId: CommandId.make("cmd-shared-project-create"),
+ projectId: asProjectId("project-shared"),
+ title: "Shared Project",
+ workspaceRoot: "/tmp/project-shared",
+ createdAt,
+ }),
+ );
+ await serverA.run(
+ serverA.engine.dispatch({
+ type: "thread.create",
+ commandId: CommandId.make("cmd-shared-thread-create"),
+ threadId,
+ projectId: asProjectId("project-shared"),
+ title: "shared",