Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(antigravity): handle native sign-in URLs on stderr #9514

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/9514/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Showing 6 changed files with 45 additions and 11 deletions (loading 3).

x
0 of 6 viewed, 6 left
23 additions and 0 deletionsapps/server/src/provider/acp/AcpJsonRpcConnection.test.tsModified
View file
@@ -18,6 +18,7 @@
​
import * as AcpSessionRuntime from "./AcpSessionRuntime.ts";
import type * as EffectAcpProtocol from "effect-acp/protocol";
+import * as EffectAcpErrors from "effect-acp/errors";
​
const __dirname = NodePath.dirname(NodeURL.fileURLToPath(import.meta.url));
const mockAgentPath = NodePath.join(__dirname, "../../../scripts/acp-mock-agent.ts");
@@ -327,6 +328,28 @@
}).pipe(Effect.scoped, Effect.provide(NodeServices.layer)),
​
+ it.effect("fails a pending request when the stderr handler rejects the runtime", () =>
+ Effect.gen(function* () {
+ const failure = new EffectAcpErrors.AcpTransportError({
+ detail: "Sign in before continuing.",
+ cause: undefined,
+ });
+ const runtime = yield* AcpSessionRuntime.make({
+ ...mockRuntimeOptions,
+ spawn: { ...mockRuntimeOptions.spawn, env: { T3_ACP_FLOOD_STDERR: "1" } },
+ onStderr: () => Effect.fail(failure),
+ });
+ expect(yield* runtime.start().pipe(Effect.flip)).toBe(failure);
+ const events = yield* runtime.getEvents().pipe(
+ Stream.filter((event) => event._tag === "ConnectionTerminated"),
+ Stream.take(1),
+ Stream.runCollect,
+ );