Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): auto-settle on merge waits for a pending Claude wake turn #26108

Closedjuliusmarmingewants to merge 7 commits intomain fromfix/issue-26083opened View on GitHub

Showing 5 changed files with 220 additions and 0 deletions (loading 4).

x
0 of 5 viewed, 5 left
220 additions and 0 deletionsapps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.tsModified
View file
@@ -8926,6 +8926,226 @@
+ const bufferWakeNotification = Effect.fn("bufferWakeNotification")(function* (options: {
+ readonly devServer: boolean;
+ }) {
+ const harness = yield* makeWakeHarness;
+ const hasPendingWakeForThread = harness.runtime.hasPendingWakeForThread;
+ if (hasPendingWakeForThread === undefined) {
+ return yield* Effect.die("Claude adapter runtime must expose hasPendingWakeForThread.");
+ }
+ const hasPendingWake = () => hasPendingWakeForThread(harness.providerThread);
+ const now = yield* DateTime.now;
+​
+ yield* harness.runtime.startTurn(
+ makeClaudeTestTurnInput({
+ threadId: harness.threadId,
+ providerThread: harness.providerThread,
+ now,
+ attemptId: RunAttemptId.make("attempt-claude-wake-gap"),
+ text: "Run the build in the background.",
+ attachments: [],
+ }),
+ );
+ yield* Queue.offer(harness.sdkMessages, wakeTaskStarted);
+ if (options.devServer) {
+ yield* Queue.offer(
+ harness.sdkMessages,
+ claudeSdkFrame({