Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): keep follow-up tasks pending until nested work finishes #21877

ClosedScottN-PV(GitHub profile, opens in a new tab)wants to merge 7 commits intomain fromrefs/pull/21877/headopened View on GitHub

Showing 4 changed files with 55 additions and 18 deletions (loading 2).

x
0 of 4 viewed, 4 left
43 additions and 15 deletionsapps/server/src/mcp/OrchestratorMcpService.test.tsModified
View file
@@ -78,8 +78,13 @@
);
​
describe("OrchestratorMcpService", () => {
- it.effect("retries terminal acknowledgement with a fresh command id", () =>
+ const acknowledgementTest =
+ "retries terminal acknowledgement with a fresh command id (follow-up: %s)";
+ const cases = [false, true, "never-started", "queued"] as const;
+ it.effect.each(cases)(acknowledgementTest, (followup) =>
Effect.gen(function* () {
+ const failedBeforeStart = followup === "never-started";
+ const queued = followup === "queued";
const parentThreadId = ThreadId.make("thread:mcp-ack-parent");
const childThreadId = ThreadId.make("thread:mcp-ack-child");
const childRunId = RunId.make("run:mcp-ack-child");
@@ -107,7 +112,7 @@
childThreadId,
driver: "codex",
model: "gpt-5.6-terra",
- result: "terminal result",
+ result: failedBeforeStart || queued ? null : "terminal result",
completionDelivery: { state: "pending" },
@@ -117,9 +122,13 @@
runs: [
id: childRunId,