Skip to content

fix: disable plugins in SDK integration tests#16036

Merged
bolinfest merged 1 commit intomainfrom
pr16036
Mar 27, 2026
Merged

fix: disable plugins in SDK integration tests#16036
bolinfest merged 1 commit intomainfrom
pr16036

Conversation

@bolinfest
Copy link
Copy Markdown
Collaborator

@bolinfest bolinfest commented Mar 27, 2026

Why

The TypeScript SDK tests create a fresh CODEX_HOME for each Jest case and delete it during teardown. That cleanup has been flaking because the real codex binary can still be doing background curated-plugin startup sync under .tmp/plugins-clone-*, which races the test harness's recursive delete and leaves ENOTEMPTY failures behind.

This path is unrelated to what the SDK tests are exercising, so letting plugin startup run during these tests only adds nondeterministic filesystem activity. This showed up recently in the sdk CI lane for #16031.

What Changed

  • updated sdk/typescript/tests/testCodex.ts to merge test config through a single helper
  • disabled features.plugins unconditionally for SDK integration tests so the CLI does not start curated-plugin sync in the temporary CODEX_HOME
  • preserved other explicit feature overrides from individual tests while forcing plugins back to false
  • kept the existing mock-provider override behavior intact for SSE-backed tests

Verification

  • pnpm test --runInBand
  • pnpm lint
@bolinfest bolinfest requested a review from pakrym-oai March 27, 2026 19:50
Copy link
Copy Markdown
Contributor

@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: 717f401772

ℹ️ 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".

// sync does not race temp CODEX_HOME cleanup.
features:
featureOverrides && typeof featureOverrides === "object" && !Array.isArray(featureOverrides)
? { plugins: false, ...featureOverrides }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Badge Keep plugins disabled after merging feature overrides

The new mergeTestConfig helper is meant to disable plugin syncing for all SDK integration tests, but { plugins: false, ...featureOverrides } lets a caller-provided features.plugins value overwrite the safeguard. In tests that pass config.features.plugins = true (or undefined), plugin startup sync is re-enabled and the temp CODEX_HOME cleanup race this change is addressing can still occur. Apply user feature overrides first, then force plugins: false last so the disable is unconditional.

Useful? React with 👍 / 👎.

@bolinfest
Copy link
Copy Markdown
Collaborator Author

@codex review the latest version of this PR

@chatgpt-codex-connector
Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. 👍

ℹ️ 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".

@bolinfest bolinfest merged commit 95845cf into main Mar 27, 2026
34 of 40 checks passed
@bolinfest bolinfest deleted the pr16036 branch March 27, 2026 20:04
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants