Repository navigation
fix(server): slow-starting Codex app-server no longer reports Unavailable #27262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
000fe03
0d7d647
fc6af35
0e65b16
88365fa
a6c7657
004f6a7
707ad77
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -481,6 +481,35 @@ it.layer( | |
| }), | ||
| ); | ||
|
|
||
| it.effect("returns ready when app-server answers slowly but correctly", () => | ||
| Effect.gen(function* () { | ||
| const fiber = yield* checkCodexProviderStatus(defaultCodexSettings, () => | ||
| Effect.sleep("25 seconds").pipe(Effect.as(makeCodexProbeSnapshot())), | ||
|
Comment on lines
+486
to
+487
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Test the real discovery deadline. This test replaces the entire probe, so it passes even if discovery still expires 20 seconds after spawn. Add a focused test that delays the actual As per coding guidelines: “Test behavior that can break,” including “the logic a bug fix changed.”
|
||
| ).pipe(Effect.forkChild); | ||
| yield* TestClock.adjust("25 seconds"); | ||
| const status = yield* Fiber.join(fiber); | ||
|
|
||
| assert.strictEqual(status.message, undefined); | ||
| assert.strictEqual(status.status, "ready"); | ||
| }), | ||
| ); | ||
|
|
||
| it.effect("times out when app-server never answers", () => | ||
| Effect.gen(function* () { | ||
| const fiber = yield* checkCodexProviderStatus(defaultCodexSettings, () => | ||
| Effect.never.pipe(Effect.as(makeCodexProbeSnapshot())), | ||
| ).pipe(Effect.forkChild); | ||
| yield* TestClock.adjust("60 seconds"); | ||
| const status = yield* Fiber.join(fiber); | ||
|
|
||
| assert.strictEqual(status.status, "error"); | ||
| assert.strictEqual( | ||
| status.message, | ||
| "Timed out while checking Codex app-server provider status.", | ||
| ); | ||
| }), | ||
| ); | ||
|
|
||
| it.effect("reads the version of a Codex CLI too old to run app-server (#20351)", () => | ||
| Effect.gen(function* () { | ||
| if ((yield* HostProcess.Platform) === "win32") return; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script executed:
Repository: pingdotgg/t3code
Length of output: 5123
Script executed:
Repository: pingdotgg/t3code
Length of output: 14986
Script executed:
Repository: pingdotgg/t3code
Length of output: 12959
Script executed:
Repository: pingdotgg/t3code
Length of output: 1477
Script executed:
Repository: pingdotgg/t3code
Length of output: 15475
Script executed:
Repository: pingdotgg/t3code
Length of output: 19365
Script executed:
Repository: pingdotgg/t3code
Length of output: 3849
Preserve the account result when optional discovery fails.
If initialization takes 10 seconds and
skills/listreturns an error at 23 seconds, the new deadline lets the error reachEffect.all. The probe can then report an error and discard successful account and model results. Previously, the skills request timed out at 19.75 seconds, so the provider could return ready without skills.Handle skills and model request failures without discarding the account result. Distinguish model failures from timeouts in the status message.