feat(seer): Poll Seer Explorer by UUID#117780
Merged
Merged
Conversation
f068327 to
0084669
Compare
0084669 to
68127f8
Compare
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 68127f8. Configure here.
Base automatically changed from
telkins/feat-seer-explorer-chat-get-return-uuid
to
master
June 16, 2026 13:21
Adopt the run's UUID (sentry_run_id) for Seer Explorer polling instead of the numeric run id, mirroring the search agent. The run id widens to number | string and new runs take sentry_run_id ?? run_id. Existing numeric-keyed runs keep working unchanged (the endpoint resolves both forms). The persisted run id and explorerRunId deep links accept UUIDs too.
68127f8 to
0c8031a
Compare
Remove the numeric run_id from SeerExplorerResponse's session to discourage its use now that polling keys off sentry_run_id (the UUID). The field was unread; the canonical id is the top-level sentry_run_id.
…xplorer-poll-by-uuid # Conflicts: # static/app/views/seerExplorer/useSeerExplorerContext.tsx
…rsal A crafted `explorerRunId` deep link can set runId to an arbitrary string (the param now accepts non-numeric values for UUID support). The three explorer-update mutations interpolated it into a same-origin authenticated POST without encoding, so `..`-style values could traverse to other org-scoped paths. Route all three through a shared helper that encodeURIComponents the run id, matching the polling path which already encodes via getApiUrl. No-op for numeric/UUID/opaque-string ids.
…xplorer-poll-by-uuid # Conflicts: # static/app/views/seerExplorer/hooks/useSeerExplorer.tsx
…xplorer-poll-by-uuid # Conflicts: # static/app/views/seerExplorer/useSeerExplorerContext.tsx # static/app/views/seerExplorer/utils.tsx
Constrain the attacker-controllable explorerRunId deep-link param to a legacy numeric ID or a UUID (reusing isUUID) so a crafted link no longer fires a request for arbitrary garbage, and key the session-history dropdown off sentry_run_id when present so a run is tracked consistently whether it is opened fresh or selected from history. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add useSeerExplorerDeepLink tests for the share-link consume path (UUID and legacy numeric runs open and strip the param, malformed values are ignored, the enabled gate is respected), and clarify the explorer-update URL-encoding test name now that the deep-link param is validated separately. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
trevor-e
added a commit
that referenced
this pull request
Jun 27, 2026
…#118616) ## What After #117265 and #117780, the Seer Explorer frontend started sending `sentry_run_id` (a UUID) instead of the numeric `seer_run_state_id` for run identification. The chat endpoint's GET (poll) and POST (continue) paths were updated to resolve either form via `resolve_seer_run()`. The update endpoint (`/seer/explorer-update/{run_id}/`) was missed, so Seer's Pydantic model rejects UUID run IDs with: ``` {"detail":[{"type":"int_parsing","loc":["body","run_id"],"msg":"Input should be a valid integer, unable to parse string as an integer","input":"cac2b2c1-4fd7-4003-acc2-e0f1ca0a5640"}]} ``` ## Fix Apply `resolve_seer_run()` to `OrganizationSeerAgentUpdateEndpoint.post()`, translating UUIDs (or numeric IDs) to `seer_run_state_id` before forwarding to Seer's `/v1/automation/explorer/update`. Mirrors the fix already applied to the chat endpoint. - `run_id` type hint widened to `str` (the URL pattern already captured it as `[^/]+`) - `resolved.seer_run_state_id` (int) used in the Seer request body - Added `test_explorer_update_with_uuid_run_id` covering the UUID path end-to-end - Updated existing `run_id` assertion from `"123"` → `123` (now correctly an int after resolution) Reported by Sofia Rest. Refs #117265, #117780. --- [View Session in Sentry](https://sentry.sentry.io/traces/?project=4510944073809921&query=gen_ai.conversation.id%3A%22slack%3AC0B0PFS5069%3A1782524325.765739%22) --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
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.


Adopts the run's UUID (
sentry_run_id) for Seer Explorer polling instead of the numeric run id, mirroring the search agent (#115307).runIdwidens tonumber | stringand new runs takesentry_run_id ?? run_id. Existing numeric-keyed runs keep working unchanged (the endpoint resolves both forms). Persisted run ids andexplorerRunIddeep/share links accept UUIDs.Backwards compatible: falls back to the numeric
run_idwhensentry_run_idis absent.I manually tested as many places/features as I could find: Ask Seer, refreshing the page w/ a session open, manual autofix, thumbs up/down, and assisted query.