Skip to content

test(node): Batch OpenAI scenarios in shared processes - #26381

Closed
nicohrubec wants to merge 1 commit into
feat/batch-integration-runnerfrom
feat/benchmark-batch-node-scenarios
Closed

nicohrubec wants to merge 1 commit into
feat/batch-integration-runnerfrom
feat/benchmark-batch-node-scenarios

Conversation

@nicohrubec

@nicohrubec nicohrubec commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

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.

Runtime Baseline This PR Saved
Node 22 2:26 2:23 0:03
Node 24 2:03 2:05 −0:02
Node 26 1:59 2:07 −0:08
Node 27 alpha 2:02 2:10 −0:08
Bun 1.3.14 1:57 2:03 −0:06
Bun 1.4 1:53 1:51 0:02
Bun canary 3:24 3:06 0:18

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.

@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Compared: eab9c8e (PR test merge using feat/batch-integration-runner at 97918c6)

Against: ef89ae2 (feat/batch-integration-runner) · base run #67338

⚠️ Baseline mismatch: 1 feat/batch-integration-runner commit(s) in the PR build are missing from the baseline. Their size changes also affect this comparison. Compare commits. Re-run once feat/batch-integration-runner's baseline build for 97918c6 finishes.

Path Size % Change Change
@sentry/browser 30.23 kB - -
@sentry/browser - with treeshaking flags 28.43 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 28.33 kB - -
@sentry/browser (incl. Tracing) 52.81 kB - -
@sentry/browser (incl. Tracing Core) 40.33 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 52.81 kB - -
@sentry/browser (incl. Tracing, Profiling) 55.69 kB - -
@sentry/browser (incl. Tracing, Replay) 92.88 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 81.7 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 97.22 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 110.8 kB - -
@sentry/browser (incl. Feedback) 48.17 kB - -
@sentry/browser (incl. sendFeedback) 30.81 kB - -
@sentry/browser (incl. FeedbackAsync) 35.84 kB - -
@sentry/browser (incl. Metrics) 31.55 kB - -
@sentry/browser (incl. Logs) 31.83 kB - -
@sentry/browser (incl. Metrics & Logs) 32.49 kB - -
@sentry/react 32.24 kB - -
@sentry/react (incl. Tracing) 55.45 kB - -
@sentry/vue 38.45 kB - -
@sentry/vue (incl. Tracing) 55.75 kB - -
@sentry/svelte 30.24 kB - -
@sentry/remix (Remix 3 client bundle) 58.46 kB - -
CDN Bundle 32.16 kB - -
CDN Bundle (incl. Tracing) 53.19 kB - -
CDN Bundle (incl. Logs, Metrics) 34.95 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 55.76 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 76.02 kB - -
CDN Bundle (incl. Tracing, Replay) 91.1 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 93.71 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 96.51 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 99.07 kB - -
CDN Bundle - uncompressed 93.91 kB - -
CDN Bundle (incl. Tracing) - uncompressed 157.26 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 102.24 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 164.88 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 232.48 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 277.53 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 285.16 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 289.46 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 297.08 kB - -
@sentry/nextjs (client) 59.15 kB - -
@sentry/sveltekit (client) 54.06 kB - -
@sentry/core/server 45.28 kB - -
@sentry/core/browser 14.41 kB - -
@sentry/node 154.01 kB -0.01% -7 B 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection) 83.33 kB - -
@sentry/node - without tracing 88.81 kB - -
@sentry/node - without channel injection 142.98 kB -0.01% -6 B 🔽
@sentry/aws-serverless 99.4 kB -0.01% -4 B 🔽
@sentry/cloudflare (withSentry) - minified 208.5 kB - -
@sentry/cloudflare (withSentry) 483.88 kB - -
@sentry/cloudflare (withSentry, instrumented CommonJS package) - minified 1.02 MB - -
@sentry/nextjs/cloudflare (withSentry) - minified 233.74 kB - -

View base workflow run

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

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' } });

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

Reviewed by Cursor Bugbot for commit 37918b3. Configure here.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Optional E2E tests

Some optional checks were not successful. They do not block the merge. 3 not successful, 60 successful. See the run.

Check Status
❌ CI: Optional E2E Tests / E2E nextjs-16-cacheComponents (cloudflare) Test (optional) Failing after 10m Details
❌ CI: Optional E2E Tests / E2E cloudflare-flue-send-to-sentry Test (optional) Failing after 3m Details
❌ CI: Optional E2E Tests / E2E cloudflare-workers-send-to-sentry Test (optional) Failing after 4m Details
Successful checks
Check Status
✅ CI: Optional E2E Tests / E2E cloudflare-mastra Test (optional) Successful in 41s Details
✅ CI: Optional E2E Tests / E2E node-flue (latest) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E deno (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-pi-durable Test (optional) Successful in 44s Details
✅ CI: Optional E2E Tests / E2E node-express-mcp-v1 Test (optional) Successful in 33s Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (vinext, bun) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nextjs-16-tunnel (cloudflare) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E gen-ai-libraries (latest) Test (optional) Successful in 48s Details
✅ CI: Optional E2E Tests / E2E nextjs-15 (turbo) Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E node-eve (orchestrion) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-fastify-6 Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E astro-7 Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-orpc Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-express-mcp-v2 Test (optional) Successful in 54s Details
✅ CI: Optional E2E Tests / E2E cloudflare-think (ai v6) Test (optional) Successful in 56s Details
✅ CI: Optional E2E Tests / E2E node-mastra Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-mastra (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E gen-ai-libraries (cloudflare) Test (optional) Successful in 58s Details
✅ CI: Optional E2E Tests / E2E cloudflare-workers-without-tracing-send-to-sentry Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nestjs-12 (deno) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react-cloudflare Test (optional) Successful in 53s Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (vinext) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nestjs-12 (latest) Test (optional) Successful in 48s Details
✅ CI: Optional E2E Tests / E2E node-eve Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (cloudflare, latest) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nextjs-14 (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-openai-decisions (latest) Test (optional) Successful in 37s Details
✅ CI: Optional E2E Tests / E2E solidstart-2 Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 (development) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-express-send-to-sentry-static Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-cloudflare Test (optional) Successful in 31s Details
✅ CI: Optional E2E Tests / E2E node-express-send-to-sentry Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E cloudflare-pi-durable Test (optional) Successful in 57s Details
✅ CI: Optional E2E Tests / E2E debug-id-sourcemaps Test (optional) Successful in 55s Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (client source maps kept) Test (optional) Successful in 36s Details
✅ CI: Optional E2E Tests / E2E astro-7-static Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E react-send-to-sentry Test (optional) Successful in 4m Details
✅ CI: Optional E2E Tests / E2E cloudflare-pi-durable (latest) Test (optional) Successful in 59s Details
✅ CI: Optional E2E Tests / E2E nuxt-5 Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E node-flue Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E supabase-nextjs Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps Test (optional) Successful in 35s Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-eve (content off, latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react-sourcemaps Test (optional) Successful in 41s Details
✅ CI: Optional E2E Tests / E2E nuxt-5-tunnel Test (optional) Successful in 39s Details
✅ CI: Optional E2E Tests / E2E solidstart-2-tunnel Test (optional) Successful in 49s Details
✅ CI: Optional E2E Tests / E2E node-openai-decisions Test (optional) Successful in 37s Details
✅ CI: Optional E2E Tests / E2E nestjs-12 (cloudflare) Test (optional) Successful in 32s Details
✅ CI: Optional E2E Tests / E2E cloudflare-agent Test (optional) Successful in 57s Details
✅ CI: Optional E2E Tests / E2E node-eve (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E react-router-7-framework-instrumentation Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nestjs-12 (bun) Test (optional) Successful in 47s Details
✅ CI: Optional E2E Tests / E2E node-pi-durable (latest) Test (optional) Successful in 33s Details
✅ CI: Optional E2E Tests / E2E gen-ai-libraries Test (optional) Successful in 57s Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (static / nuxt generate) Test (optional) Successful in 36s Details
✅ CI: Optional E2E Tests / E2E nuxt-5 (kv-cache) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-15 (latest) Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E cloudflare-think Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E vue-3 (no Options API) Test (optional) Successful in 1m Details

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

@nicohrubec
nicohrubec added this pull request to stack #26383 November 16, 2026 08:08
[
"import * as Sentry from '@sentry/node';",
...imports,
`async function run() { ${runs.join('\n')} await Sentry.flush(2000); }`,
@nicohrubec
nicohrubec force-pushed the feat/benchmark-batch-node-scenarios branch from 9eb2691 to bd05f5c Compare November 16, 2026 10:24
@nicohrubec
nicohrubec force-pushed the feat/benchmark-inline-bundles branch from 8ae2d2f to 2e35c86 Compare November 16, 2026 10:24
@nicohrubec
nicohrubec removed this pull request from stack #26383 November 16, 2026 10:28

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Base automatically changed from feat/benchmark-inline-bundles to develop November 16, 2026 10:38

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

}),
});
}
await started.completed();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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)
Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

Reviewed by Cursor Bugbot for commit 4d73526. Configure here.

@nicohrubec
nicohrubec force-pushed the feat/benchmark-batch-node-scenarios branch from 6334625 to 899b943 Compare November 17, 2026 14:14
@nicohrubec nicohrubec changed the title test(ci): Benchmark batching integration scenarios test(node): Batch OpenAI scenarios in shared processes Nov 17, 2026
@nicohrubec
nicohrubec force-pushed the feat/benchmark-batch-node-scenarios branch from 899b943 to 8b9805b Compare November 17, 2026 14:19
@nicohrubec
nicohrubec changed the base branch from develop to feat/batch-integration-runner November 17, 2026 14:26
@nicohrubec
nicohrubec force-pushed the feat/benchmark-batch-node-scenarios branch from 8b9805b to 5ac5703 Compare November 17, 2026 15:09
@nicohrubec
nicohrubec force-pushed the feat/benchmark-batch-node-scenarios branch from 5ac5703 to 2d67f53 Compare November 20, 2026 09:28
@nicohrubec
nicohrubec force-pushed the feat/batch-integration-runner branch from 9a01fea to 16e37e1 Compare November 20, 2026 09:28

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 3 total unresolved issues (including 2 from previous reviews).

Fix All in Cursor

❌ 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());

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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)
Fix in Cursor Fix in Web

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>
@nicohrubec
nicohrubec force-pushed the feat/benchmark-batch-node-scenarios branch from 2d67f53 to 44cf042 Compare November 20, 2026 19:02
@nicohrubec
nicohrubec force-pushed the feat/batch-integration-runner branch from 16e37e1 to 97918c6 Compare November 20, 2026 19:02
@nicohrubec nicohrubec closed this Nov 23, 2026
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