Repository navigation
test(node): Batch OpenAI scenarios in shared processes - #26381
nicohrubec wants to merge 1 commit into
Conversation
size-limit report 📦Compared: eab9c8e (PR test merge using feat/batch-integration-runner at 97918c6) Against: ef89ae2 (feat/batch-integration-runner) · base run #67338
|
| runner.makeRequest('get', '/test', { headers: { 'X-Forwarded-For': '203.0.113.7, 10.0.0.1' } }); | ||
| await runner.makeRequest('get', '/test?a=1&b=2#hash'); | ||
| await runner.makeRequest('post', '/test?a=1&b=2#hash', { data: 'test body' }); | ||
| await runner.makeRequest('get', '/test', { headers: { 'X-Forwarded-For': '203.0.113.7, 10.0.0.1' } }); |
There was a problem hiding this comment.
Batched requests assume envelope order
Medium Severity
The GET, POST, and forwarded cases now share one child process and three ordered transaction expects, without .unordered() or unique matchers. makeRequest only waits for the HTTP response, so the three envelopes can arrive in any order—especially on Bun and Deno—and the GET and forwarded cases are both GET /test. That makes this batched test likely to flake, unlike the other suites in this PR that match by unique attributes.
Triggered by project rule: PR Review Guidelines for Cursor Bot
Reviewed by Cursor Bugbot for commit 37918b3. Configure here.
Optional E2E testsSome optional checks were not successful. They do not block the merge. 3 not successful, 60 successful. See the run.
Successful checks
|
9eb2691 to
bd05f5c
Compare
8ae2d2f to
2e35c86
Compare
| }), | ||
| }); | ||
| } | ||
| await started.completed(); |
There was a problem hiding this comment.
Loops replace isolated test.each cases
Medium Severity
Existing test.each cases were folded into one test with a for loop. A shared runner can still back separate test.each cases, as sentry-trace/test.ts does, so a single failing payload no longer has its own test name or remaining coverage. This was flagged because the testing conventions in the review rules file call out loops over scenarios instead of test.each.
Additional Locations (2)
Triggered by project rule: PR Review Guidelines for Cursor Bot
Reviewed by Cursor Bugbot for commit 4d73526. Configure here.
6334625 to
899b943
Compare
899b943 to
8b9805b
Compare
8b9805b to
5ac5703
Compare
5ac5703 to
2d67f53
Compare
9a01fea to
16e37e1
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 3 total unresolved issues (including 2 from previous reviews).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 2d67f53. Configure here.
| await runner.start().completed(); | ||
| return { spans: await Promise.all(collectors) }; | ||
| } | ||
| const getScenarios = () => (scenarios ??= runScenarios()); |
There was a problem hiding this comment.
Batched tests risk timeout flakes
Medium Severity
The first test in each batched callback waits until every scenario in defaultScenarios finishes, including ones that callback never asserts on. completed() only resolves after all collectors match, so chat tests still wait through later conversation-id scenarios and their leftover Sentry.flush(2000) calls. loggingTransport.flush always waits 1s, and the suite testTimeout is 15s, so this can time out under CI load.
Additional Locations (2)
Triggered by project rule: PR Review Guidelines for Cursor Bot
Reviewed by Cursor Bugbot for commit 2d67f53. Configure here.
Co-Authored-By: OpenAI Codex <codex@openai.com>
2d67f53 to
44cf042
Compare
16e37e1 to
97918c6
Compare


What
Group compatible OpenAI scenarios into one Node process per SDK configuration and module format.
Why
The SDK was started again for each short chat, embedding or conversation scenario. Start it once for the group, give each scenario a fresh isolation scope, and keep its existing assertions.
Depends on #26493.
Current-develop benchmark (Nov 20; single runs). Times are the slowest integration test step across six shards, excluding setup and queues.
Baseline: shared runner only → this PR. Each provider PR is measured independently. Small differences include run-to-run variation; these are shard timings, not full-CI savings. Node 20 is excluded because the baseline Mistral abort/timeout test failed its 15-second timeout.