Skip to content

fix(search-events): Say when Sentry skipped validateSearch - #2242

Draft
sentry-junior[bot] wants to merge 1 commit into
mainfrom
fix/validate-search-skipped-dataset
Draft

sentry-junior[bot] wants to merge 1 commit into
mainfrom
fix/validate-search-skipped-dataset

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

This fixes the open validateSearch half of #2173.

organization_events_validate.py in getsentry/sentry checks only datasets in RPC_DATASETS. For errors, it returns early with valid: true and the dataset note "This dataset is not compatible with the validate endpoint, your request may still be valid". The embedded agent's validateSearch tool reported that as "Search validation passed.", so the agent used queries that no one had checked, and the real /events/?dataset=errors call returned 400.

User feedback MCP-SERVER-GPS shows two search_errors failures that got through this way:

  • The agent turned service names and an issue short ID into a project: filter. The call failed with Project(s) … do not exist or are not actively selected. The reporter says this happened even with projectSlug set.
  • The agent used latest(id) as a field. The call failed with latest is not a valid function.

Changes:

  • When the validate response carries that dataset note, validateSearch now says validation was skipped and that fields, functions, and filters, including project:, were not checked. It still returns valid: true, because otherwise the agent could never finish an errors query.
  • One prompt rule: use project: only for a Sentry project the user calls a project. Service, app, and host names, and issue short IDs, are not projects. A project scope passed with the request is already applied.

A regression test covers the skipped-validation response.

Open decision: the prompt rule has no eval case yet. Should one be added before merge? The deeper fix is for /events/validate/ to support the errors dataset. That belongs to the Explore/Discover owners in getsentry/sentry, not to this repo.

via Sentry.

--

View Session [Sentry]

Sentry's events/validate endpoint only checks RPC datasets. For errors it
returns valid with a "not compatible" dataset note and checks nothing,
but the embedded agent's validateSearch tool reported "Search validation
passed." The agent then trusted queries with invented project: filters
or unsupported functions such as latest(id), and the real /events/ call
returned 400.

Report the skip, and name what went unchecked. Also tell the agent that
service, app, and host names and issue short IDs are not projects, and
that a project scope from the request is already applied.

Refs #2173

Co-Authored-By: Claude <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 13, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
sentry-local Skipped Skipped Nov 13, 2026 4:25pm UTC

Request Review

This branch was successfully deployed

1 active and 1 inactive deployments
Actions — 2423a59e Deployed Nov 13, 2026 by sentry-junior[bot] via eval #1866
Preview — 2423a59e Deployed Nov 13, 2026 by vercel[bot]
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.

0 participants