Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(codex): allow slow provider probes to finish #9303

ClosedMichel-Liao(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/9303/headopened View on GitHub

Problem

The Codex provider health check performs a full app-server handshake plus account, model, and skill discovery under the shared 10-second auth-probe timeout. On Windows, healthy probes have been measured above that limit during startup, causing an installed and authenticated provider to appear broken until a later refresh.

Closes #7513.

Fix

Give the multi-step Codex probe a 20-second budget while leaving other provider probe timeouts unchanged. A focused virtual-clock regression test verifies that a 15-second healthy probe succeeds, and the existing timeout cleanup test now covers the new boundary.

Testing

  • node_modules/.bin/vp test run apps/server/src/provider/Layers/ProviderRegistry.test.ts (42 passed)
  • targeted lint and formatting checks

Model: GPT-5.6 Sol Harness: Codex in T3 Code


Note

Low Risk Scoped to Codex health-check timing and tests; no auth or data-path changes.

Overview Raises the Codex provider status probe timeout from the shared 10s to a Codex-specific 20s, because the app-server handshake plus account, model, and skill discovery can exceed 10s on Windows without indicating a real failure.

Other providers keep using AUTH_PROBE_TIMEOUT_MS from providerSnapshot.ts. Tests add a case where a 15s healthy probe still reports ready, and the hanging-probe timeout test advances the clock 21s to match the new limit.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 176928e7abb8dbec299988a388adf41c8dd4c23f. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

Summary by CodeRabbit

  • Bug Fixes
    • Improved Codex provider detection by allowing longer startup checks to complete successfully.
    • Reduced false timeout results for Codex checks on slower systems or during concurrent startup activity.
    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    2. Approvability

      Verdict: Not approved

      Macroscope's review found this PR not approvable — This narrowly scoped change raises the default Codex provider-probe timeout from 10 to 20 seconds for all enabled users, altering existing product behavior even though it includes focused regression coverage. The default-policy change warrants explicit human review.

      Not approved because:

      • Monthly spending limit reached (workspace setting). Approvability relies on correctness review in order to determine eligibility
      Review your spending limits in [Billing settings](https://app.macroscope.com/pingdotgg/settings/billing). You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    3. Note: GPT-6 on behalf of shivam (@shivamhwp).

      Please rebase the Codex timeout change onto current main. The import hunk conflicts with the newer custom-model and usage-limit work; keep readCustomModelEntries, COMPACT_SLASH_COMMAND, and the current rate-limit helpers while replacing only the auth-probe timeout.

    4. Bugbot is paused — on-demand spend limit reached

      Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

      A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

    5. Rebased onto current main (68c2277f5) and resolved the import conflict by retaining readCustomModelEntries, COMPACT_SLASH_COMMAND, and the current usage/rate-limit helpers. The behavioral diff still only gives the Codex auth probe its 20-second budget; other provider probe timeouts remain unchanged.

      Verification on 6931f69cf:

      • ProviderRegistry.test.ts: 51 passed
      • server typecheck passed
      • changed-file lint, formatting, and git diff --check passed
    6. Review Change StackReview Change Stack

      No actionable comments were generated in the recent review. 🎉

      ℹ️ Recent review info
      ⚙️ Run configuration

      Configuration used: Path: .coderabbit.yaml

      Review profile: CHILL

      Plan: Advanced

      Run ID: 66792e61-5ab2-4793-a837-e101942367d0

      📥 Commits

      Reviewing files that changed from the base of the PR and between 2db675aeffd9cb1e8b5ad76ddd018433b45b02e9 and 6931f69cf49a278e5cfa0d47248fab718a0e12b1.

      📒 Files selected for processing (2)
      • apps/server/src/provider/Layers/CodexProvider.ts
      • apps/server/src/provider/Layers/ProviderRegistry.test.ts

      Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.


      📝 Walkthrough

      Walkthrough

      The Codex provider probe timeout increases from 10 to 20 seconds. Tests verify that a 15-second probe succeeds and that timeout cleanup remains covered.

      Changes

      Codex probe timeout

      Layer / File(s)Summary
      Codex timeout implementation
      apps/server/src/provider/Layers/CodexProvider.ts
      Adds a file-local 20-second timeout for the Codex app-server probe and uses it in checkCodexProviderStatus.
      Probe timeout validation
      apps/server/src/provider/Layers/ProviderRegistry.test.ts
      Adds coverage for a 15-second successful probe and updates timeout cleanup timing to 21 seconds.

      Priority: ➖ Normal

      Estimated code review effort: 2 (Simple) | ~10 minutes

      Change: Bug fix · Severity of issue fixed: Medium

      Suggested reviewers: maria-rcks

      Merge Risk: ⚪ Minimal · up to 6931f

      The change is limited to allowing slower Codex startup probes to complete; no unresolved merge-blocking risk remains.

      🚥 Pre-merge checks | ✅ 5
      ✅ Passed checks (5 passed)
      Check nameStatusExplanation
      Title check✅ PassedThe title clearly and concisely describes the main change: allowing slow Codex provider probes to complete.
      Description check✅ PassedThe description explains the problem, the fix, scope, linked issue, and testing. It does not use the template headings exactly and omits the checklist, but it provides the required change rationale an…
      Linked Issues check✅ PassedIssue #7513 requires Codex probes to avoid premature timeout during slow Windows startup without changing other provider behavior. CodexProvider.ts removes the shared 10-second timeout use, adds `CO…
      Out of Scope Changes check✅ PassedThe pull request changes only the Codex probe timeout and related regression tests. The changes directly support issue #7513 and do not modify unrelated provider behavior.
      Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
      ✨ Finishing Touches
      🧪 Generate unit tests (beta)
      • Create PR with unit tests

      Comment `@coderabbitai help` to get the list of available commands.
    7. Thanks for the PR. We're not taking changes to the orchestration and provider layers right now: that part of the server is being rewritten for V2, and merging into the current code would either conflict with or be thrown away by that work.

      Closing for now. If this is still an issue once V2 lands, please reopen (or open a fresh PR against the new code) and we'll take a proper look.

    8. juliusmarminge closed this

Sign in to join this conversation.