Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): Antigravity 502s fail the turn with the real error #33596

Mergedjuliusmarmingemerged 12 commits intomain fromrefs/pull/33596/headmerged by juliusmarminge View on GitHub

Showing 4 changed files with 103 additions and 6 deletions (loading 1).

x
0 of 4 viewed, 4 left
46 additions and 0 deletionsapps/server/src/orchestration-v2/Adapters/AcpAdapterV2.test.tsModified
View file
@@ -626,6 +626,7 @@
const makePromptInactivityHarness = Effect.fnUntraced(function* (input: {
readonly environment: (runtimeOrdinal: number) => Readonly<Record<string, string>>;
readonly runtimeMode?: "full-access" | "approval-required";
+ readonly watchPromptOutcome?: AcpAdapterV2Flavor["watchPromptOutcome"];
readonly wrapPrompt?: (
prompt: AcpSessionRuntime.AcpSessionRuntime["Service"]["prompt"],
) => AcpSessionRuntime.AcpSessionRuntime["Service"]["prompt"];
@@ -642,6 +643,9 @@
driver: ACP_TEST_DRIVER,
capabilities: AcpProviderCapabilitiesV2,
promptInactivityTimeout: "15 minutes",
+ ...(input.watchPromptOutcome === undefined
+ ? {}
+ : { watchPromptOutcome: input.watchPromptOutcome }),
...(input.followAgentWorkState === true ? { followAgentWorkState: true } : {}),
makeRuntime: makeMockRuntime({
childProcessSpawner,
@@ -5845,6 +5849,48 @@
}).pipe(Effect.provide(layerTest)),
+ it.effect("fails a silent prompt with the failure its outcome check recorded", () =>
+ Effect.gen(function* () {
+ const badGateway = {
+ class: "provider_error",
+ message: "Bad Gateway: Failed to connect to backend API",
+ code: "502 Bad Gateway",