Skip to content

test(e2e): Add Mastra Jev classifier test to node-mastra - #25115

Merged
andreiborza merged 3 commits into
ab/mastra-classifier-evaluate-spansfrom
ab/mastra-classifier-e2e
Oct 8, 2026
Merged

andreiborza merged 3 commits into
ab/mastra-classifier-evaluate-spansfrom
ab/mastra-classifier-e2e

Conversation

@andreiborza

@andreiborza andreiborza commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

What

Adds a node-mastra e2e test that runs a real Jev evaluation through a Mastra Classifier (via OpenRouter) and checks the gen_ai.evaluate span.

Why

Covers the classifier instrumentation from #25044 against the real provider, not only a mock model.

@andreiborza
andreiborza added this pull request to stack #25116 October 7, 2026 08:16
@andreiborza andreiborza changed the title ab/mastra classifier e2e test(e2e): Add Mastra Jev classifier test to node-mastra Oct 7, 2026

@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.

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 d3c4b79. Configure here.

Comment thread dev-packages/e2e-tests/test-applications/node-mastra/package.json
@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 29.8 kB - -
@sentry/browser - with treeshaking flags 27.92 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 27.84 kB - -
@sentry/browser (incl. Tracing) 51.85 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 51.87 kB - -
@sentry/browser (incl. Tracing, Profiling) 54.8 kB - -
@sentry/browser (incl. Tracing, Replay) 91.58 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 80.45 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 96.29 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 109.27 kB - -
@sentry/browser (incl. Feedback) 47.32 kB - -
@sentry/browser (incl. sendFeedback) 34.84 kB - -
@sentry/browser (incl. FeedbackAsync) 39.95 kB - -
@sentry/browser (incl. Metrics) 30.82 kB - -
@sentry/browser (incl. Logs) 31.11 kB - -
@sentry/browser (incl. Metrics & Logs) 31.75 kB - -
@sentry/react 31.63 kB - -
@sentry/react (incl. Tracing) 54.17 kB - -
@sentry/vue 37.84 kB - -
@sentry/vue (incl. Tracing) 54.78 kB - -
@sentry/svelte 29.83 kB - -
@sentry/remix (Remix 3 client bundle) 56.83 kB - -
CDN Bundle 31.53 kB - -
CDN Bundle (incl. Tracing) 52.34 kB - -
CDN Bundle (incl. Logs, Metrics) 33.72 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 54.3 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 74.65 kB - -
CDN Bundle (incl. Tracing, Replay) 90.01 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 91.96 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 96.17 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 98.15 kB - -
CDN Bundle - uncompressed 92.92 kB - -
CDN Bundle (incl. Tracing) - uncompressed 155.46 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 99.46 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 161.41 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 229.5 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 275.63 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 281.57 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 289.33 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 295.26 kB - -
@sentry/nextjs (client) 56.53 kB - -
@sentry/sveltekit (client) 52.23 kB - -
@sentry/core/server 40.86 kB - -
@sentry/core/browser 13.71 kB - -
@sentry/node 146.94 kB +0.34% +492 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 83.41 kB +0.04% +31 B 🔺
@sentry/node - without tracing 93.79 kB +0.06% +47 B 🔺
@sentry/node - without channel injection 125.11 kB +0.4% +491 B 🔺
@sentry/aws-serverless 102 kB +0.04% +38 B 🔺
@sentry/cloudflare (withSentry) - minified 209.77 kB +0.04% +64 B 🔺
@sentry/cloudflare (withSentry) 520.1 kB +0.04% +156 B 🔺
@sentry/nextjs/cloudflare (withSentry) - minified 227.44 kB +0.03% +64 B 🔺

View base workflow run

@andreiborza
andreiborza marked this pull request as ready for review October 7, 2026 08:58
@andreiborza
andreiborza force-pushed the ab/mastra-classifier-e2e branch 2 times, most recently from 3b82bae to 8fd928f Compare October 7, 2026 09:40
Comment thread dev-packages/e2e-tests/test-applications/node-mastra/package.json

@nicohrubec nicohrubec left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nice

@@ -0,0 +1,10 @@
import { createOpenRouter } from '@openrouter/ai-sdk-provider';

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

l: I think other scenarios also use openrouter. could this be used there as well?

@andreiborza andreiborza Oct 7, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

They do now in this pr, I moved the weather agent to the same shared helper.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I meant for instance node-eve has the same logic and that could also be replaced

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Right, I'll do that in follow-up tasks as it doesn't quite fit into here.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sure sounds good

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Filed JS-3894 for this.

const APP = 'node-mastra';
const TICKET = 'My checkout page shows a blank screen after I click Pay.';

const attrValue = (span: SerializedStreamedSpan, key: string): unknown => span.attributes?.[key]?.value;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit but this seems like an unnecessary indirection 😅

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

yea agreed

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Removed in f7c126f

@andreiborza
andreiborza force-pushed the ab/mastra-classifier-e2e branch from 52100dc to fe21450 Compare October 8, 2026 12:16
@andreiborza
andreiborza merged commit 2fdcb23 into develop Oct 8, 2026
47 of 76 checks passed
@andreiborza
andreiborza deleted the ab/mastra-classifier-e2e branch October 8, 2026 12:50
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.

4 participants