Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): provider failures say why a turn could not start #16303

Mergedsaphid(GitHub profile, opens in a new tab)merged 13 commits intomain fromrefs/pull/16303/headmerged by juliusmarminge View on GitHub

Showing 12 changed files with 27 additions and 21 deletions (loading 9).

x
0 of 12 viewed, 12 left
14 additions and 14 deletionsapps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.tsModified
View file
@@ -8056,12 +8056,10 @@
yield* userTurn("attempt-failed-start-1", 1);
- yield* Queue.offer(harness.sdkMessages, wakeTaskStarted);
- yield* Queue.offer(harness.sdkMessages, turnOneResult);
- yield* awaitUntil(() => harness.terminalEvents().length === 1, "first turn terminal");
- yield* Queue.offer(harness.sdkMessages, wakeNotification);
- let notificationYields = 0;
- yield* awaitUntil(() => notificationYields++ >= 50, "notification to be recorded");
+ yield* harness.offerAndWait(wakeTaskStarted);
+ yield* harness.offerAndWait(turnOneResult);
+ yield* Queue.take(harness.terminalReceipts);
+ yield* harness.offerAndWait(wakeNotification);
assert.isFalse(yield* harness.hasPendingBackgroundWork);
const missing = ChatImageAttachment.make({
@@ -8071,20 +8069,22 @@
mimeType: "image/png",
sizeBytes: 4,
- const failed = yield* Effect.exit(userTurn("attempt-failed-start-2", 2, [missing]));
- assert.isTrue(Exit.isFailure(failed));
+ const failed = yield* userTurn("attempt-failed-start-2", 2, [missing]).pipe(Effect.flip);
+ assert.equal(
+ makeProviderFailure({ cause: failed }).message,
+ "The provider could not start this turn: an attachment could not be read. Retry the turn; if it keeps failing, check the provider setup and server logs.",
+ );