Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(antigravity): a mid-turn 404 shows its error and is retryable #39869

Mergedjuliusmarmingemerged 4 commits intomain fromrefs/pull/39869/headmerged by juliusmarminge View on GitHub

Showing 4 changed files with 149 additions and 0 deletions (loading 2).

x
0 of 4 viewed, 4 left
111 additions and 0 deletionsapps/server/src/orchestration-v2/Adapters/AcpAdapterV2.test.tsModified
View file
@@ -1527,6 +1527,117 @@
}).pipe(Effect.provide(layerTest)),
+ it.live("resends a resumable outcome failure's prompt once before failing the turn", () =>
+ Effect.gen(function* () {
+ const instanceId = ProviderInstanceId.make("acp-test-prompt-resume");
+ const threadId = ThreadId.make("thread-acp-prompt-resume");
+ const notFound = {
+ class: "provider_error",
+ message: "Requested entity was not found.",
+ code: "NOT_FOUND",
+ retryable: true,
+ } as const;
+ const promptTexts: Array<string> = [];
+ // Checks 1, 3 and 4 fail: turn 1 resumes and completes, turn 2 fails after one resume.
+ let checks = 0;
+ const adapter = yield* makeAcpAdapterV2({
+ instanceId,
+ selfInvocation: yield* resolveSelfInvocation(),
+ flavor: {
+ driver: ACP_TEST_DRIVER,
+ capabilities: AcpProviderCapabilitiesV2,
+ steersWithPrompt: () => true,
+ watchPromptOutcome: () =>
+ Effect.sync(() => {
+ checks += 1;
+ const outcome =
+ checks === 2
+ ? undefined