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@ccb5cc4

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
@@ -34,7 +34,6 @@ import {
3434
import { resolveSpawnCommand } from "@t3tools/shared/shell";
3535
import { codexAppServerArgs, resolveCodexLaunchArgs } from "./codexLaunchArgs.ts";
3636
import {
37-
AUTH_PROBE_TIMEOUT_MS,
3837
buildServerProvider,
3938
COMPACT_SLASH_COMMAND,
4039
type ServerProviderDraft,
@@ -63,6 +62,11 @@ type CodexRateLimitsProbe =
6362
| { readonly failure: string };
6463

6564
const CODEX_APP_SERVER_PROBE_FORCE_KILL_AFTER = "2 seconds" as const;
65+
// Codex's probe does a full handshake plus account, models, and skills requests, which can
66+
// legitimately run past the shared 10s AUTH_PROBE_TIMEOUT_MS on a loaded or slow machine
67+
// (most often reported on Windows). Give Codex its own longer budget instead of raising the
68+
// timeout for every provider.
69+
const CODEX_AUTH_PROBE_TIMEOUT_MS = 20_000;
6670

6771
const CODEX_PRESENTATION = {
6872
displayName: "Codex",
@@ -618,7 +622,7 @@ export const checkCodexProviderStatus = Effect.fn("checkCodexProviderStatus")(fu
618622
...(managedAuth ? { skipNativeUsage: true } : {}),
619623
}).pipe(
620624
Effect.scoped,
621-
Effect.timeoutOption(Duration.millis(AUTH_PROBE_TIMEOUT_MS)),
625+
Effect.timeoutOption(Duration.millis(CODEX_AUTH_PROBE_TIMEOUT_MS)),
622626
Effect.result,
623627
);
624628

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
@@ -578,6 +578,22 @@ it.layer(
578578
}),
579579
);
580580

581+
it.effect(
582+
"does not time out a healthy probe slower than the shared 10s auth-probe timeout (#7513)",
583+
() =>
584+
Effect.gen(function* () {
585+
const statusFiber = yield* checkCodexProviderStatus(defaultCodexSettings, () =>
586+
Effect.sleep("15 seconds").pipe(Effect.as(makeCodexProbeSnapshot())),
587+
).pipe(Effect.forkChild);
588+
589+
yield* Effect.yieldNow;
590+
yield* TestClock.adjust("15 seconds");
591+
592+
const status = yield* Fiber.join(statusFiber);
593+
assert.strictEqual(status.status, "ready");
594+
}),
595+
);
596+
581597
it.effect("closes the app-server probe scope when provider status times out", () =>
582598
Effect.gen(function* () {
583599
const killCalls = yield* Ref.make(0);
@@ -587,7 +603,7 @@ it.layer(
587603
);
588604

589605
yield* Effect.yieldNow;
590-
yield* TestClock.adjust("11 seconds");
606+
yield* TestClock.adjust("21 seconds");
591607
yield* Effect.yieldNow;
592608

593609
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.