Skip to content

Port provider tests to typescript#8237

Merged
jamadeo merged 13 commits intomainfrom
port-provider-test-to-ts
Apr 24, 2026
Merged

Port provider tests to typescript#8237
jamadeo merged 13 commits intomainfrom
port-provider-test-to-ts

Conversation

@jamadeo
Copy link
Copy Markdown
Member

@jamadeo jamadeo commented Apr 1, 2026

test_providers.sh has evolved beyond the simplicity of a shell script.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3d5bea8b42

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread ui/desktop/vitest.config.ts Outdated
include: ['src/**/*.{test,spec}.{js,jsx,ts,tsx}'],
include: [
'src/**/*.{test,spec}.{js,jsx,ts,tsx}',
'tests/integration/**/*.{test,spec}.{js,jsx,ts,tsx}',
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Remove integration glob from default Vitest include

Adding tests/integration/** to the default vitest.config.ts causes pnpm run test:run to pick up live provider smoke tests that were meant for test:integration only. I checked .github/workflows/ci.yml and the desktop-lint job’s “Run Tests” step executes pnpm run test:run, so this change makes that path sensitive to provider credentials/CLI availability and can trigger expensive cargo build setup from the new integration files, turning a deterministic unit-test lane into a flaky external-integration lane.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3db9eb5fb5

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread ui/desktop/tests/integration/test_providers_lib.ts Outdated
Comment thread ui/desktop/tests/integration/test_providers_lib.ts Outdated
jamadeo and others added 3 commits April 1, 2026 11:27
…eout

- loadDotenv() now resolves .env from the repository root via __dirname
  instead of process.cwd(), matching the old shell script behavior when
  run from ui/desktop
- Strip surrounding quotes from dotenv values so KEY="value" works
- Give flaky tests a 120s timeout so the try/catch handler runs before
  vitest kills the test

Signed-off-by: Douwe Osinga <douwe@squareup.com>
Copy link
Copy Markdown
Collaborator

@DOsinga DOsinga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean port from bash to TypeScript. Pushed a fix commit to:

  • Resolve .env from the repo root via __dirname instead of process.cwd(), matching the old shell script behavior when running from ui/desktop
  • Strip surrounding quotes from dotenv values so KEY="value" works correctly
  • Give flaky tests a 120s timeout so the try/catch handler runs before vitest kills the test externally

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 33aee214e2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +86 to +88
test.each(available)('$provider / $model', async (tc) => {
await runNormalTest(tc);
});
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Raise timeout for live provider cases

test.each(available) inherits the integration config timeout (60s in ui/desktop/vitest.integration.config.ts), but these tests make real network/provider calls and can exceed 60 seconds under normal latency, causing false CI failures even when providers are healthy. The flaky branch already bumps timeout to 120s, so the non-flaky branch should also set an explicit higher timeout (or suite-level override) to avoid regressions versus the old script, which had no per-case 60s cutoff.

Useful? React with 👍 / 👎.

@jamadeo jamadeo added this pull request to the merge queue Apr 24, 2026
Merged via the queue into main with commit c6755d3 Apr 24, 2026
21 of 23 checks passed
@jamadeo jamadeo deleted the port-provider-test-to-ts branch April 24, 2026 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants