feat(search-events): teach the logs query agent regex message search - #1406
Draft
Conversation
JoshuaKGoldberg
force-pushed
the
joshgoldberg/logs-1014-teach-sentry-mcps-search-agent-regex-log-search
branch
from
October 5, 2026 15:56
ee5eae6 to
79f6832
Compare
JoshuaKGoldberg
changed the base branch from
main
to
joshgoldberg/logs-1013-add-sentry-mcp-evals-for-regex-log-search
October 5, 2026 15:56
JoshuaKGoldberg
added this pull request to stack #1411
October 5, 2026 15:58
JoshuaKGoldberg
force-pushed
the
joshgoldberg/logs-1014-teach-sentry-mcps-search-agent-regex-log-search
branch
from
October 5, 2026 18:17
f5c77bf to
5bbb4b0
Compare
JoshuaKGoldberg
force-pushed
the
joshgoldberg/logs-1014-teach-sentry-mcps-search-agent-regex-log-search
branch
from
October 5, 2026 19:27
8693a55 to
37b5f88
Compare
JoshuaKGoldberg
force-pushed
the
joshgoldberg/logs-1014-teach-sentry-mcps-search-agent-regex-log-search
branch
from
October 5, 2026 19:38
37b5f88 to
7edd98c
Compare
JoshuaKGoldberg
had a problem deploying
to
Actions
October 5, 2026 19:38 — with
GitHub Actions
Error
JoshuaKGoldberg
had a problem deploying
to
Actions
October 5, 2026 19:38 — with
GitHub Actions
Error
JoshuaKGoldberg
had a problem deploying
to
Actions
October 5, 2026 19:54 — with
GitHub Actions
Error
JoshuaKGoldberg
had a problem deploying
to
Actions
October 5, 2026 19:54 — with
GitHub Actions
Error
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>
JoshuaKGoldberg
force-pushed
the
joshgoldberg/logs-1014-teach-sentry-mcps-search-agent-regex-log-search
branch
from
October 5, 2026 20:13
7edd98c to
01ddebc
Compare
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>
JoshuaKGoldberg
had a problem deploying
to
Actions
October 5, 2026 20:38 — with
GitHub Actions
Error
…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>
mr-danya
pushed a commit
to mr-danya/sentry-mcp
that referenced
this pull request
Oct 6, 2026
## Summary Make `sentry init` accept a terminal workflow result as successful only when it explicitly reports `status: "success"` and `result.exitCode: 0`. Previously, a successful response with no `result` or no `exitCode` passed the truthiness check and could print the success handoff with process exit 0. The CLI now treats that as malformed, surfaces a specific `WizardError`, and exits nonzero. Existing nonzero workflow-to-CLI exit mappings are unchanged. This makes the process exit status a reliable black-box signal for the init smoke harness. ## Compatibility This intentionally stops accepting terminal success payloads that omit `exitCode`. The current wizard success output already returns `exitCode: 0`. The draft [getsentry#1406](getsentry/cli#1406) also touches `handleFinalResult`; merge order will require rebasing whichever PR lands second. ## Test plan - focused wizard runner tests: 74 passed - CLI typecheck - Biome on the three changed files - `git diff --check` - native `darwin-arm64` binary build - real Express init against the local candidate API: exit 0 - invalid OpenRouter credential: CLI exit 61 and smoke harness exit 1 ## Rollout The paired API-owned smoke is [getsentry/cli-init-api#249](getsentry/cli-init-api#249). Once this lands, bump its pinned CLI SHA so malformed successful workflow responses cannot produce a false-green smoke result.
mr-danya
pushed a commit
to mr-danya/sentry-mcp
that referenced
this pull request
Oct 6, 2026
## Summary Make `sentry init` accept a terminal workflow result as successful only when it explicitly reports `status: "success"` and `result.exitCode: 0`. Previously, a successful response with no `result` or no `exitCode` passed the truthiness check and could print the success handoff with process exit 0. The CLI now treats that as malformed, surfaces a specific `WizardError`, and exits nonzero. Existing nonzero workflow-to-CLI exit mappings are unchanged. This makes the process exit status a reliable black-box signal for the init smoke harness. ## Compatibility This intentionally stops accepting terminal success payloads that omit `exitCode`. The current wizard success output already returns `exitCode: 0`. The draft [getsentry#1406](getsentry/cli#1406) also touches `handleFinalResult`; merge order will require rebasing whichever PR lands second. ## Test plan - focused wizard runner tests: 74 passed - CLI typecheck - Biome on the three changed files - `git diff --check` - native `darwin-arm64` binary build - real Express init against the local candidate API: exit 0 - invalid OpenRouter credential: CLI exit 61 and smoke harness exit 1 ## Rollout The paired API-owned smoke is [getsentry/cli-init-api#249](getsentry/cli-init-api#249). Once this lands, bump its pinned CLI SHA so malformed successful workflow responses cannot produce a false-green smoke result.
mr-danya
pushed a commit
to mr-danya/sentry-mcp
that referenced
this pull request
Oct 6, 2026
## Summary Make `sentry init` accept a terminal workflow result as successful only when it explicitly reports `status: "success"` and `result.exitCode: 0`. Previously, a successful response with no `result` or no `exitCode` passed the truthiness check and could print the success handoff with process exit 0. The CLI now treats that as malformed, surfaces a specific `WizardError`, and exits nonzero. Existing nonzero workflow-to-CLI exit mappings are unchanged. This makes the process exit status a reliable black-box signal for the init smoke harness. ## Compatibility This intentionally stops accepting terminal success payloads that omit `exitCode`. The current wizard success output already returns `exitCode: 0`. The draft [getsentry#1406](getsentry/cli#1406) also touches `handleFinalResult`; merge order will require rebasing whichever PR lands second. ## Test plan - focused wizard runner tests: 74 passed - CLI typecheck - Biome on the three changed files - `git diff --check` - native `darwin-arm64` binary build - real Express init against the local candidate API: exit 0 - invalid OpenRouter credential: CLI exit 61 and smoke harness exit 1 ## Rollout The paired API-owned smoke is [getsentry/cli-init-api#249](getsentry/cli-init-api#249). Once this lands, bump its pinned CLI SHA so malformed successful workflow responses cannot produce a false-green smoke result.
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.
Teaches the embedded search agent to write
key://pattern//regex log filters when wildcards can't express a request, with logs few-shot examples to match.See #1405 for evals around this.
Closes LOGS-1014.