GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(server): give Codex's provider probe its own longer timeout · pingdotgg/t3code@4ba0f51

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • apps/server/src/provider
    • CodexProvider.ts
    • ProviderRegistry.test.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎apps/server/src/provider/CodexProvider.ts‎

Copy file name to clipboardExpand all lines: apps/server/src/provider/CodexProvider.ts
+6-2Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ import {
3636
import { resolveSpawnCommand } from "@t3tools/shared/shell";
3737
import { codexAppServerArgs, resolveCodexLaunchArgs } from "./codexLaunchArgs.ts";
3838
import {
39-
AUTH_PROBE_TIMEOUT_MS,
4039
buildServerProvider,
4140
COMPACT_SLASH_COMMAND,
4241
providerModelsFromSettings,
@@ -72,6 +71,11 @@ const CODEX_APP_SERVER_PROBE_FORCE_KILL_AFTER = "2 seconds" as const;
7271
const CODEX_CATALOG_REFRESH_TIMEOUT = "3 seconds" as const;
7372
const CODEX_CATALOG_REFRESH_POLL = "100 millis" as const;
7473
const CODEX_CLIENT_NAME = "T3 Code";
74+
// Codex's probe does a full handshake plus account, models, and skills requests, which can
75+
// legitimately run past the shared 10s AUTH_PROBE_TIMEOUT_MS on a loaded or slow machine
76+
// (most often reported on Windows). Give Codex its own longer budget instead of raising the
77+
// timeout for every provider.
78+
const CODEX_AUTH_PROBE_TIMEOUT_MS = 20_000;
7579

7680
const CODEX_PRESENTATION = {
7781
displayName: "Codex",
@@ -690,7 +694,7 @@ export const checkCodexProviderStatus = Effect.fn("checkCodexProviderStatus")(fu
690694
...(managedAuth ? { skipNativeUsage: true } : {}),
691695
}).pipe(
692696
Effect.scoped,
693-
Effect.timeoutOption(Duration.millis(AUTH_PROBE_TIMEOUT_MS)),
697+
Effect.timeoutOption(Duration.millis(CODEX_AUTH_PROBE_TIMEOUT_MS)),
694698
Effect.result,
695699
);
696700

Collapse file

‎apps/server/src/provider/ProviderRegistry.test.ts‎

Copy file name to clipboardExpand all lines: apps/server/src/provider/ProviderRegistry.test.ts
+17-1Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,22 @@ it.layer(
596596
}),
597597
);
598598

599+
it.effect(
600+
"does not time out a healthy probe slower than the shared 10s auth-probe timeout (#7513)",
601+
() =>
602+
Effect.gen(function* () {
603+
const statusFiber = yield* checkCodexProviderStatus(defaultCodexSettings, () =>
604+
Effect.sleep("15 seconds").pipe(Effect.as(makeCodexProbeSnapshot())),
605+
).pipe(Effect.forkChild);
606+
607+
yield* Effect.yieldNow;
608+
yield* TestClock.adjust("15 seconds");
609+
610+
const status = yield* Fiber.join(statusFiber);
611+
assert.strictEqual(status.status, "ready");
612+
}),
613+
);
614+
599615
it.effect("closes the app-server probe scope when provider status times out", () =>
600616
Effect.gen(function* () {
601617
const killCalls = yield* Ref.make(0);
@@ -605,7 +621,7 @@ it.layer(
605621
);
606622

607623
yield* Effect.yieldNow;
608-
yield* TestClock.adjust("11 seconds");
624+
yield* TestClock.adjust("21 seconds");
609625
yield* Effect.yieldNow;
610626

611627
const status = yield* Fiber.join(statusFiber);

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.