Skip to content

feat(search-events): Require validation before search and agent repair - #1113

Merged
wmak merged 3 commits into
mainfrom
wmak/feat/search-events-make-validation-mandatory
Jun 19, 2026
Merged

wmak merged 3 commits into
mainfrom
wmak/feat/search-events-make-validation-mandatory

Conversation

@wmak

@wmak wmak commented Jun 19, 2026

Copy link
Copy Markdown
Member

Block search_events until GET /events/validate/ passes. When validation fails with an embedded agent configured, run up to three repair attempts before returning formatted validation errors. Without an agent provider, reject invalid searches immediately.

Keep datasetAttributes as discovery-only, add validation telemetry spans, and cover repair success, repaired /events/ params, and retry limits in tests.

wmak and others added 2 commits June 19, 2026 15:07
Block search_events until GET /events/validate/ passes. When validation
fails with an embedded agent configured, run up to three repair attempts
before returning formatted validation errors. Without an agent provider,
reject invalid searches immediately.

Keep datasetAttributes as discovery-only, add validation telemetry spans,
and cover repair success, repaired /events/ params, and retry limits in tests.

Co-Authored-By: Composer <noreply@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

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 2 potential issues.

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

Comment thread packages/mcp-core/src/tools/catalog/search-events.ts Outdated
Comment thread packages/mcp-core/src/tools/catalog/search-events.ts
Comment thread packages/mcp-core/src/tools/catalog/search-events.test.ts Outdated
Comment thread packages/mcp-core/src/tools/catalog/search-events.ts
Preserve prior fields when repair returns an empty array, merge repaired
environment into the executed search query, and clear agent API keys with
empty strings so the no-agent rejection path is exercised in tests.

Refs GH-1113
Co-Authored-By: Composer <noreply@cursor.com>

Co-authored-by: Cursor <cursoragent@cursor.com>
@wmak
wmak merged commit f4f8f9a into main Jun 19, 2026
19 checks passed
@wmak
wmak deleted the wmak/feat/search-events-make-validation-mandatory branch June 19, 2026 20:56
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