Repository navigation
fix(update-issue): align ignore operations with Sentry - #903
Merged
Merged
Conversation
Map ignored issue updates to Sentry's real issue schema instead of the old statusDetails shortcut. Default ignored issues to until escalating and expose explicit ignore modes for forever, duration, occurrence count, and user count. Add handler tests, eval coverage, and mock support for the new ignore modes. Trim the tool description so the generated definition stays within the tool description limit. Fixes #878 Fixes #873 Co-Authored-By: Codex <codex@openai.com>
dcramer
marked this pull request as ready for review
April 15, 2026 17:08
Read ignored issue behavior from persisted statusDetails so condition-based snoozes keep their real rule in update output. Reject unsupported cross-family ignored-to-ignored mode switches instead of claiming they succeeded, and avoid redundant ignored updates that can mutate existing snoozes. Add regression coverage for assignment-only updates on ignored issues, allowed condition-to-condition changes, rejected cross-family switches, and the already-ignored no-op path. Refs #878 Co-Authored-By: Codex <codex@openai.com>
Avoid treating assignedTo as a change signal when the requested assignee is already set. This keeps update_issue idempotent for existing assignees, skips redundant API calls when the request can be proven to be a no-op, and stops the change summary from implying an assignment change that never happened. Add regression coverage for the same-assignee no-op path alongside the existing ignore-mode tests. Refs #878 Co-Authored-By: Codex <codex@openai.com>
Handle update_issue as a state-matching tool instead of assuming every requested status or ignore payload implies a real mutation. Short-circuit requests that already match the persisted issue state, including resolvedInNextRelease and condition-based ignore rules, and report status transitions using the serialized state Sentry actually returns. Add regression coverage for same-status no-ops, resolvedInNextRelease transitions, and repeated condition-based ignore requests so we do not regress on the same class of review findings. Refs #878 Co-Authored-By: Codex <codex@openai.com>
Extract the shared issue update mock response builder so the four PUT handlers stay in sync as update_issue evolves. Also fix the ignored default to match Sentry's until-escalating behavior and model resolvedInNextRelease the way the real API serializes it. Refs #878 Co-Authored-By: Codex <codex@openai.com>
Drop the unreachable already-ignored branch that tried to short-circuit non-condition ignore updates after the identical-behavior no-op check had already handled them. This keeps the transition logic smaller without changing behavior. Refs #878 Co-Authored-By: Codex <codex@openai.com>
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 2493105. Configure here.
Treat archived_forever as authoritative the same way we already treat until-escalating ignores. This prevents stale condition fields in serialized statusDetails from being misread as a condition-based snooze and keeps forever no-op updates idempotent. Co-Authored-By: Codex <codex@openai.com>
Member
Author
|
This is exposing more copmlexity than I'd like to LLMs, but for now we'll move forward |
This branch was previously 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.

Align
update_issueignore operations with the Sentry issue update schema so ignored issues use the same substatus and condition fields as the product. The MCP tool now defaults ignored issues to "until escalating", exposes explicit ignore modes for forever, duration, occurrence count, and user count, and reports the resulting ignore behavior back in the tool response.This replaces the earlier
statusDetails.ignoreUntilEscalatingshortcut, which did not match the server-side schema and made ignored updates ambiguous for the model. The schema, API client, mocks, tests, and eval coverage now all use the same structured ignore inputs so the LLM can choose the right operation without inferring undocumented payload shapes.I also trimmed the tool description so the generated definitions stay under the tool description limit while still steering the model toward the new ignore fields.
Validation:
pnpm run tscandpnpm run lintpassed.pnpm run teststill fails only inpackages/mcp-core/src/internal/agents/openai-provider.integration.test.ts, where the current local env resolves an invalid OpenAI API key; theupdate_issuetests,tools.test.ts, andpnpm --filter @sentry/mcp-server-evals exec tsc -ball passed.Fixes #878
Fixes #873