Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): a session released mid-turn no longer leaves tool calls running #17306

Closedkristianbonnici(GitHub profile, opens in a new tab)wants to merge 6 commits intomain fromrefs/pull/17306/headopened View on GitHub

Showing 3 changed files with 163 additions and 3 deletions (loading 2).

x
0 of 3 viewed, 3 left
163 additions and 3 deletionsapps/server/src/orchestration-v2/testkit/ProviderSwitch.integration.test.tsModified
View file
@@ -8,6 +8,7 @@
MessageId,
type ModelSelection,
type OrchestrationV2Command,
+ type OrchestrationV2DomainEvent,
type OrchestrationV2ProviderCapabilities,
type OrchestrationV2ProviderSession,
type OrchestrationV2ProviderThread,
@@ -21,6 +22,7 @@
TurnItemId,
ProviderDriverKind,
} from "@t3tools/contracts";
+import { derivePendingBackgroundWork } from "@t3tools/shared/orchestrationV2PendingBackgroundWork";
import * as DateTime from "effect/DateTime";
import * as Deferred from "effect/Deferred";
import * as Effect from "effect/Effect";
@@ -118,6 +120,8 @@
readonly holdRunOrdinal?: number;
readonly holdFirstTurn?: Deferred.Deferred<void>;
readonly releaseFirstTurn?: Deferred.Deferred<void>;
+ /** A tool call the held turn reports running before it holds. */
+ readonly heldRunningToolCall?: TurnItemId;
}): ProviderAdapter.ProviderAdapterV2["Service"] {
return {
instanceId: input.instanceId,
@@ -252,18 +256,59 @@
: { nativeThreadHasTurns: turnInput.nativeThreadHasTurns }),