Repository navigation
fix(search): Pass regex log queries through as written - #1409
Open
JoshuaKGoldberg wants to merge 17 commits into
Open
JoshuaKGoldberg wants to merge 17 commits into
JoshuaKGoldberg wants to merge 17 commits into
Conversation
JoshuaKGoldberg
changed the base branch from
main
to
joshgoldberg/logs-1014-teach-sentry-mcps-search-agent-regex-log-search
October 5, 2026 16:32
JoshuaKGoldberg
force-pushed
the
joshgoldberg/logs-1015-pass-regex-log-queries-through-sentry-mcps-search-tools-as
branch
from
October 5, 2026 16:32
f62e4c8 to
7277c79
Compare
JoshuaKGoldberg
force-pushed
the
joshgoldberg/logs-1015-pass-regex-log-queries-through-sentry-mcps-search-tools-as
branch
from
October 5, 2026 16:42
7277c79 to
80ba22e
Compare
JoshuaKGoldberg
force-pushed
the
joshgoldberg/logs-1015-pass-regex-log-queries-through-sentry-mcps-search-tools-as
branch
from
October 5, 2026 18:17
80ba22e to
d801aab
Compare
JoshuaKGoldberg
force-pushed
the
joshgoldberg/logs-1015-pass-regex-log-queries-through-sentry-mcps-search-tools-as
branch
from
October 5, 2026 19:11
d801aab to
85f016a
Compare
JoshuaKGoldberg
force-pushed
the
joshgoldberg/logs-1015-pass-regex-log-queries-through-sentry-mcps-search-tools-as
branch
from
October 5, 2026 19:27
85f016a to
d33ede4
Compare
JoshuaKGoldberg
had a problem deploying
to
Actions
October 5, 2026 19:27 — with
GitHub Actions
Failure
JoshuaKGoldberg
force-pushed
the
joshgoldberg/logs-1015-pass-regex-log-queries-through-sentry-mcps-search-tools-as
branch
from
October 5, 2026 19:38
d33ede4 to
d1be5cb
Compare
JoshuaKGoldberg
had a problem deploying
to
Actions
October 5, 2026 19:38 — with
GitHub Actions
Error
JoshuaKGoldberg
force-pushed
the
joshgoldberg/logs-1015-pass-regex-log-queries-through-sentry-mcps-search-tools-as
branch
from
October 5, 2026 20:13
d1be5cb to
a0082d7
Compare
JoshuaKGoldberg
had a problem deploying
to
Actions
October 5, 2026 20:13 — with
GitHub Actions
Error
JoshuaKGoldberg
force-pushed
the
joshgoldberg/logs-1015-pass-regex-log-queries-through-sentry-mcps-search-tools-as
branch
from
October 5, 2026 20:36
a0082d7 to
863cfb1
Compare
JoshuaKGoldberg
had a problem deploying
to
Actions
October 5, 2026 20:36 — with
GitHub Actions
Error
JoshuaKGoldberg
had a problem deploying
to
Actions
October 5, 2026 20:36 — with
GitHub Actions
Error
JoshuaKGoldberg
force-pushed
the
joshgoldberg/logs-1015-pass-regex-log-queries-through-sentry-mcps-search-tools-as
branch
from
October 7, 2026 16:21
9bbcdeb to
821bccb
Compare
Add logs text-matching guidance to the embedded query-translation agent prompt so it uses `key://pattern//` regex filters when wildcards cannot express the request, and add regex few-shot examples for the logs dataset. Refs LOGS-1014 Co-Authored-By: Claude Code <noreply@anthropic.com>
…ldcards Teach prefix, suffix, and wildcard-list matching so plain alternatives and anchors don't reach for a regex, keep exact value sets as key:[a,b], and swap examples that overlapped the regex evals or needed no regex. Refs LOGS-1014 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… regex A value with its own attribute, like a response status, should filter that attribute rather than a regex over message text. Refs LOGS-1014 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…id example Wildcards are case sensitive, so ignoring case is a regex trigger; the trace id few-shot is replaced since trace has its own attribute, and array attributes are noted as regex-capable. Refs LOGS-1014 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Array regex needs the tags[name,array][*] key form, so naming arrays without it invites a plain key regex that silently matches nothing. Refs LOGS-1014 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r limit An unneeded \b or (?i) pushed a UUID pattern past Sentry's limit in an eval run, so the length rule now says to leave them out unless needed. Refs LOGS-1014 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The agent still wrote key://pattern// for errors in some eval runs, so the rule now names the other datasets and says to use wildcards there. Refs LOGS-1014 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…gex limit An eval run spelled a UUID with [0-9a-fA-F], landing at 75 characters, so the length rule now says to match either case with (?i) and a lowercase class, which fits a UUID in 64. Refs LOGS-1014 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Recognize `key://pattern//` regex filters as Sentry search syntax so regex-only log queries are no longer treated as natural language and replaced by Seer or embedded-agent rewrites. Treat a regex rewritten into a plain or wildcard filter as a downgrade, keep regex values with spaces or apostrophes as one token, and mention regex syntax in search_logs. Refs LOGS-1015 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sentry only runs key://pattern// as a regex on logs; other datasets match the literal text, so a regex sent to search_spans or search_errors now lets the agent's rewrite through instead of forcing an empty search. Refs LOGS-1015 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…shapes A regex right after ( or on a typed, colon, quoted, or [*] key now counts as a regex filter, and changing the pattern (including its case) counts as a downgrade. Refs LOGS-1015 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Colon and uppercase bracket keys now take the regex path, wildcard rewrites are caught on every regex key shape, a regex may follow ) or a quote, and key detection no longer rescans the whole query prefix. Refs LOGS-1015 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs LOGS-1015 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A natural-language log query with a URL ending in `//` matched the key://pattern// shape, so it skipped the search agent and blocked valid rewrites as downgrades. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
JoshuaKGoldberg
force-pushed
the
joshgoldberg/logs-1015-pass-regex-log-queries-through-sentry-mcps-search-tools-as
branch
from
October 13, 2026 13:50
7c9abff to
d85afd6
Compare
Base automatically changed from
joshgoldberg/logs-1014-teach-sentry-mcps-search-agent-regex-log-search
to
main
October 13, 2026 15:27
…s-through-sentry-mcps-search-tools-as # Conflicts: # packages/mcp-core/src/tools/support/search-events/config.ts # packages/mcp-core/src/tools/support/search-events/utils.ts
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 55756fd. Configure here.
Structured filters rewritten into key://pattern// were missed outside logs, and when the pattern's casing differed from the original value. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DominikB2014
self-requested a review
October 13, 2026 17:01
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

The search tools now recognize
key://pattern//regex log filters as Sentry search syntax, so a regex query runs as written instead of being treated as natural language and rewritten. Rewriting a regex into a wildcard now counts as a filter downgrade, and thesearch_logsdescription mentions the syntax.Closes LOGS-1015