Skip to content

fix(seer): Resolve UUID run_id in OrganizationSeerAgentUpdateEndpoint#118616

Merged
trevor-e merged 2 commits into
masterfrom
fix/seer-update-endpoint-uuid-run-id
Jun 27, 2026
Merged

fix(seer): Resolve UUID run_id in OrganizationSeerAgentUpdateEndpoint#118616
trevor-e merged 2 commits into
masterfrom
fix/seer-update-endpoint-uuid-run-id

Conversation

@trevor-e

Copy link
Copy Markdown
Member

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

The explorer-update endpoint forwarded run_id directly to Seer's
/v1/automation/explorer/update as-is. After #117265 and #117780, the
frontend sends a UUID (sentry_run_id) instead of the numeric
seer_run_state_id, causing Seer to reject the request with an
int_parsing error.

Apply resolve_seer_run() to translate numeric IDs or UUIDs to the
underlying seer_run_state_id before forwarding, mirroring the fix
already applied to the chat endpoint's GET and POST (continue) paths.

Refs #117265, #117780

Co-Authored-By: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Jun 27, 2026

@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 1 potential issue.

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 165140d. Configure here.

Comment thread src/sentry/seer/endpoints/organization_seer_agent_update.py
A mutating update should reject runs that aren't ready, not silently
return poll-style 200 session bodies. Mirrors the continue path in the
chat endpoint.

Addresses Cursor Bugbot review comment on #118616.

Co-Authored-By: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
@trevor-e trevor-e marked this pull request as ready for review June 27, 2026 01:49
@trevor-e trevor-e requested a review from a team as a code owner June 27, 2026 01:49
@trevor-e trevor-e merged commit 7f129bb into master Jun 27, 2026
64 checks passed
@trevor-e trevor-e deleted the fix/seer-update-endpoint-uuid-run-id branch June 27, 2026 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants