Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): a later run on a remote delegated task's thread wakes the parent #31744

Openjuliusmarmingewants to merge 20 commits intomain fromfix/issue-31707opened View on GitHub

Showing 17 changed files with 13 additions and 2 deletions (loading 14).

x
0 of 17 viewed, 17 left
1 addition and 0 deletionsapps/server/src/mcp/OrchestratorMcpService.tsModified
View file
@@ -3178,6 +3178,7 @@
Math.max(1, input.timeoutMs ?? DEFAULT_WAIT_TIMEOUT_MS),
...(input.untilDelegatedWorkSettled === true ? { untilDelegatedWorkSettled: true } : {}),
+ ...(input.afterRunId === undefined ? {} : { afterRunId: input.afterRunId }),
.pipe(Effect.mapError(threadManagementFailure));
const status = result.run === null ? "idle" : runOutcome(result.run);
2 additions and 2 deletionsapps/server/src/mcp/OrchestratorMcpToolkit.integration.test.tsModified
View file
@@ -700,10 +700,10 @@
expect(
messageReads.filter((query) => query.includes("$.notification.source.kind")),
).toHaveLength(1);
- // The orchestrator's restart-continuation guard still reads its own records.
+ // The restart-continuation guard reuses the records the wait already read.
expect(
messageReads.filter((query) => !query.includes("$.notification.source.kind")),
- ).toHaveLength(1);
+ ).toHaveLength(0);
const parentlessRead = yield* invoke(
"t3_thread_read",
10 additions and 0 deletionsapps/server/src/orchestration-v2/CommandPolicy.tsModified
View file
@@ -10,6 +10,7 @@