Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): a Claude wake already answered in a user turn no longer blocks the thread's queue #26554

Closedjuliusmarmingewants to merge 3 commits intomain fromfix/issue-26537opened View on GitHub

Showing 2 changed files with 87 additions and 1 deletion.

x
0 of 2 viewed, 2 left
81 additions and 0 deletionsapps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.tsModified
View file
@@ -9261,6 +9261,87 @@
+ it.effect.each(["live in the user turn", "buffered before the user turn"] as const)(
+ "settles a continuation whose opened wake turn a user turn already answered: assistant %s",
+ (assistantFrame) =>
+ Effect.scoped(
+ Effect.gen(function* () {
+ const harness = yield* makeWakeHarness;
+ const now = yield* DateTime.now;
+​
+ yield* harness.runtime.startTurn(
+ makeClaudeTestTurnInput({
+ threadId: harness.threadId,
+ providerThread: harness.providerThread,
+ now,
+ attemptId: RunAttemptId.make("attempt-claude-wake-answered-1"),
+ text: "Run the build in the background.",
+ attachments: [],
+ }),
+ );
+ yield* Queue.offer(harness.sdkMessages, wakeTaskStarted);
+ yield* Queue.offer(harness.sdkMessages, turnOneResult);
+ yield* harness.awaitTerminal(1);
+ yield* harness.offerAndWait(wakeNotification);
+ yield* harness.offerAndWait(wakeTurnInit);
+ if (assistantFrame === "buffered before the user turn") {
+ yield* harness.offerAndWait(wakeAssistant);
+ }