Skip to content

fix: degrade invalid CrUX URLs to no-data#34

Draft
cursor[bot] wants to merge 2 commits intomainfrom
cursor/sentry-issue-regression-65f4
Draft

fix: degrade invalid CrUX URLs to no-data#34
cursor[bot] wants to merge 2 commits intomainfrom
cursor/sentry-issue-regression-65f4

Conversation

@cursor
Copy link
Copy Markdown

@cursor cursor Bot commented Apr 14, 2026

Description

Fixes a regression in WEBVITALS-2S.

  • Root cause: ai/tools/real-world-performance.ts treated CrUX HTTP 400 responses as hard workflow failures. Google returns 400 for URLs with query params and for origins/pages without CrUX coverage, but the product already has a hasData: false empty-state for that condition.
  • Regression vector: No specific reintroducing commit was identified. The hard-fail path dates back to e93dc0f, and the deployed release on main (3dad06a481817bc715ba83934de828125c64fb2c) still contained that behavior when the issue resurfaced on new traffic.
  • Fix: Mark CrUX 400 responses as recoverable in the fetch aggregator, skip exception capture for those responses, and only throw when a non-recoverable CrUX failure leaves all requested devices without data.

Sentry Context

  • Issue: https://sentry.sentry.io/issues/7272850020/
  • Regressed in release: 3dad06a481817bc715ba83934de828125c64fb2c
  • Previously resolved by: not identifiable from the Sentry MCP activity data exposed in this environment

Type of Change

  • Bug fix
  • New feature
  • Documentation
  • Refactoring

Checklist

  • Tested locally
  • Types pass (pnpm check-types)
  • Linting passes (pnpm lint)

Verification

Focused verification only:

  • pnpm exec vitest run ".tmp-crux-400-regression.test.ts" --config vitest.config.ts
  • pnpm check-types
  • pnpm exec biome check "ai/tools/real-world-performance.ts"

Limitations:

  • Full pnpm lint still fails on pre-existing repo-wide issues unrelated to this change (for example ai/tools/tech-detection.ts, app/api/chat/[id]/stream/route.ts, and app/globals.css).
  • Browser/screenshot verification could not be completed because this environment does not expose a browser session or screenshot tool.
Open in Web View Automation 

cursoragent and others added 2 commits April 14, 2026 19:30
Treat CrUX 400 responses for unsupported or uncovered URLs as\nrecoverable so the analysis workflow returns the existing empty-state\noutput instead of capturing an application exception.\n\nKeep non-recoverable CrUX failures blocking so infrastructure and auth\nproblems still surface for investigation.\n\nFixes WEBVITALS-2S\nCo-Authored-By: Claude <noreply@anthropic.com>

Co-authored-by: Sergiy Dybskiy <s@serg.tech>
Align the CrUX 400 fallback change with the repository formatter so\nreviewers can isolate the behavior change from unrelated lint noise.\n\nRefs WEBVITALS-2S\nCo-Authored-By: Claude <noreply@anthropic.com>

Co-authored-by: Sergiy Dybskiy <s@serg.tech>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
webvitals-com Ready Ready Preview, Comment Apr 14, 2026 7:34pm
webvitals.com Ready Ready Preview, Comment Apr 14, 2026 7:34pm

Request Review

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.

1 participant