Skip to content

test(hub): check the Codex content-type repair against a real server - #173

Merged
TheGreatAxios merged 1 commit into
mainfrom
fix-main-codex-adapter-test-order
Nov 4, 2026
Merged

TheGreatAxios merged 1 commit into
mainfrom
fix-main-codex-adapter-test-order

Conversation

@TheGreatAxios

@TheGreatAxios TheGreatAxios commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Closes CL-12134

The Codex adapter test failed intermittently on main (runs 41895349766 and 41925131923, and branch runs) with a null Content-Type. It replaced the global fetch with a stub before importing the adapter, but since b99954e (#124) code-mode.test.ts also imports the adapter; when that file runs first in the same process, the repair wraps the original fetch and the test's stub bypasses it.

The test now imports the adapter normally and sends the request to a local Bun server that answers without a Content-Type, so it exercises the installed repair whatever order the files run in.

Verified: running code-mode.test.ts before codex-adapter.test.ts failed 4 of 4 times before the change and passes 3 of 3 after, in both orders. lint, format:check, typecheck and the full test suite pass.

The test stubbed the global fetch before importing the adapter, so it failed whenever code-mode.test.ts imported the adapter first in the same process, as it does on CI.
@TheGreatAxios
TheGreatAxios marked this pull request as ready for review November 4, 2026 22:38
@linear-code

linear-code Bot commented Nov 4, 2026

Copy link
Copy Markdown

CL-12134

@corbits-triage

corbits-triage Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Merged before Triage finished on e6be35f.

@TheGreatAxios
TheGreatAxios merged commit ce336c9 into main Nov 4, 2026
9 checks passed
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.

1 participant