test(eve): Add e2e test for node-eve - #24228
Conversation
size-limit report 📦
|
Registration-only orchestrion configs (native-channel libraries — ai v7, ioredis, @redis/client, mysql2, mongoose) carry a custom transform wired into the bundler plugins only. The runtime loader (`@sentry/server-runtime-injection` `register`) has no custom transforms, so transforming these modules threw `TypeError: transform is not a function`, which the diagnostics callback misreported as the always-on "`@sentry/server-runtime-injection` was bundled ... loads uninstrumented" warning — even though the libraries are correctly instrumented via their native channel (`setupOnce` / `waitForTracingChannelBinding`). Exclude registration-only configs from the runtime instrumentation set (`SENTRY_RUNTIME_INSTRUMENTATIONS`). This is lossless: at runtime the snippet would only trigger a no-op subscription to `orchestrion:*` channels these versions never publish. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…time loader" This reverts commit fe004a2.
f011d0e to
157f3bb
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 157f3bb. Configure here.
| const { sessionId } = (await createRes.json()) as { sessionId: string }; | ||
|
|
||
| const controller = new AbortController(); | ||
| const timer = setTimeout(() => controller.abort(), 25_000); |
There was a problem hiding this comment.
Stream abort undercuts test timeout
Medium Severity
runAgentTurn aborts the session stream after 25s, which is tighter than the 90s Playwright timeout added because a slow OpenRouter tool-calling turn does not fit in 30s. A slow two-call turn can hit this abort and fail even though the suite still has time left. Flagged because the review rules call out timeout-based e2e flakes.
Triggered by project rule: PR Review Guidelines for Cursor Bot
Reviewed by Cursor Bugbot for commit 157f3bb. Configure here.
| // e2e test needs only a single OpenRouter key. eve resolves this authored | ||
| // `LanguageModel` at runtime. | ||
| const openrouter = createOpenRouter({ | ||
| apiKey: process.env.E2E_OPENROUTER_API_KEY, |
There was a problem hiding this comment.
super-l: Might be worth throwing if the key is absent
| // loader instruments regardless (so the "bundled ... uninstrumented" | ||
| // warning is a false positive), and externalizing it makes eve's dev | ||
| // host fail to resolve its `/register` subpath (`eve dev` only). | ||
| externalDependencies: ['dataloader'], |
There was a problem hiding this comment.
q: Do we expect users to do this too?
There was a problem hiding this comment.
Ah just saw the comment in the pr descr 👍
|
|
||
| // clean up (although this is tmp, still nice to do) | ||
| await rm(tmpDirPath, { recursive: true }); | ||
| await rm(tmpDirPath, { recursive: true, force: true, maxRetries: 5, retryDelay: 300 }); |


Adds an e2e test app
node-evethat runs three optional scenarios:--import @sentry/node/import) - instruments other orchestrion libraries tooThe setup:
1. Plain eve setup
This is enough to get basic tracing for ai itself + http/fetch as well as error monitoring working. Nothing else needs to be configured.
2. With orchestrion
When using orchestrion (e.g. you want instrumentation of other dependencies, e.g. mysql or pg or whatever), you need these additional steps:
a. Run eve with
NODE_OPTIONS='--import=@sentry/node/import'to ensure orchestrion is preloadedb. Add packages you want to instrument to
externalDependencies:In a follow up, we'll try to provide a helper to simplify this.
ref #24015