Skip to content

test(cloudflare): Add Workers AI E2E test for Clairic - #25625

Draft
andreiborza wants to merge 1 commit into
ab/workers-ai-clairicfrom
ab/workers-ai-clairic-tests
Draft

andreiborza wants to merge 1 commit into
ab/workers-ai-clairicfrom
ab/workers-ai-clairic-tests

Conversation

@andreiborza

@andreiborza andreiborza commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

What

Adds a real Worker E2E test that calls Clairic and checks the gen_ai.extract span in Sentry.

Why

The E2E test calls the real model, so it confirms the response shape that the binding returns.

Closes: #25615

@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 4b85e32. Configure here.

'gen_ai.response.model': expect.stringContaining('clairic'),
'gen_ai.input.messages': expect.stringContaining('Northwind Supply'),
'gen_ai.output.messages': expect.stringContaining('INV-2291'),
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

E2E test uses hardcoded attribute names

Low Severity

The new Clairic E2E assertions hard-code span attribute keys such as gen_ai.operation.name, gen_ai.request.model, gen_ai.response.model, gen_ai.input.messages, and gen_ai.output.messages. Testing conventions require those keys to come from @sentry/conventions constants rather than string literals.

Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

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

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Compared: 0907510 (PR test merge using develop at 6e6e13f)

Against: 6fb6b07 (develop) · base run #62924

⚠️ Baseline mismatch: 3 develop commit(s) in the PR build are missing from the baseline. Their size changes also affect this comparison. Compare commits. Re-run once develop's baseline build for 6e6e13f finishes.

Path Size % Change Change
@sentry/browser 29.91 kB - -
@sentry/browser - with treeshaking flags 28.05 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 27.95 kB - -
@sentry/browser (incl. Tracing) 52.1 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 52.1 kB - -
@sentry/browser (incl. Tracing, Profiling) 55.05 kB - -
@sentry/browser (incl. Tracing, Replay) 91.85 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 80.72 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 96.58 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 109.52 kB - -
@sentry/browser (incl. Feedback) 47.42 kB - -
@sentry/browser (incl. sendFeedback) 34.97 kB - -
@sentry/browser (incl. FeedbackAsync) 40.07 kB - -
@sentry/browser (incl. Metrics) 30.93 kB - -
@sentry/browser (incl. Logs) 31.21 kB - -
@sentry/browser (incl. Metrics & Logs) 31.84 kB - -
@sentry/react 31.74 kB - -
@sentry/react (incl. Tracing) 54.42 kB - -
@sentry/vue 38.07 kB - -
@sentry/vue (incl. Tracing) 55.03 kB - -
@sentry/svelte 29.93 kB - -
@sentry/remix (Remix 3 client bundle) 57.11 kB - -
CDN Bundle 31.67 kB - -
CDN Bundle (incl. Tracing) 52.61 kB - -
CDN Bundle (incl. Logs, Metrics) 33.87 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 54.55 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 74.79 kB - -
CDN Bundle (incl. Tracing, Replay) 90.28 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 92.21 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 96.42 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 98.37 kB - -
CDN Bundle - uncompressed 93.29 kB - -
CDN Bundle (incl. Tracing) - uncompressed 156.14 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 99.84 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 162.11 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 229.88 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 276.31 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 282.26 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 290.01 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 295.96 kB - -
@sentry/nextjs (client) 57.31 kB - -
@sentry/sveltekit (client) 52.48 kB - -
@sentry/core/server 41.8 kB - -
@sentry/core/browser 13.81 kB - -
@sentry/node 155.41 kB - -
@sentry/node/import (ESM hook with diagnostics-channel injection) 84.17 kB - -
@sentry/node - without tracing 97.04 kB +0.01% +1 B 🔺
@sentry/node - without channel injection 133.3 kB - -
@sentry/aws-serverless 105.22 kB - -
@sentry/cloudflare (withSentry) - minified 211.74 kB +0.3% +627 B 🔺
@sentry/cloudflare (withSentry) 525.15 kB +0.26% +1.32 kB 🔺
@sentry/nextjs/cloudflare (withSentry) - minified 231.36 kB +0.28% +627 B 🔺

View base workflow run

@andreiborza
andreiborza added this pull request to stack #25627 October 21, 2026 14:11
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@andreiborza
andreiborza force-pushed the ab/workers-ai-clairic-tests branch from 4b85e32 to 67c87cb Compare October 21, 2026 14:24
@andreiborza andreiborza changed the title test(cloudflare): Add Workers AI tracing tests for Clairic test(cloudflare): Add Workers AI E2E test for Clairic Oct 21, 2026

This branch has not been deployed

No deployments
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.

Instrument Cloudflare Clairic as gen_ai.extract spans

1 participant