-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
feat(search agent): Start and poll the agent state #106324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
aayush-se
commented
Jan 14, 2026
- endpoints to start agent translation and poll the state for frontend
|
🚨 Warning: This pull request contains Frontend and Backend changes! It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently. Have questions? Please ask in the |
| return Response( | ||
| {"detail": "Invalid run_id"}, | ||
| status=status.HTTP_400_BAD_REQUEST, | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing SEER_AUTOFIX_URL configuration check in state endpoint
Medium Severity
The SearchAgentStateEndpoint is missing a check for settings.SEER_AUTOFIX_URL before calling fetch_search_agent_state(). The companion SearchAgentStartEndpoint correctly checks this configuration at line 155, and other similar Seer endpoints follow the same pattern. Without this check, if SEER_AUTOFIX_URL is not configured, the request will fail with a misleading "Failed to fetch run state" error instead of the expected "Seer is not properly configured" message.
| }, | ||
| ) | ||
| response.raise_for_status() | ||
| return response.json() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
State endpoint missing organization context in Seer request
High Severity
The fetch_search_agent_state function sends only run_id to Seer without including organization_id. The existing similar function fetch_run_status in client_utils.py includes organization_id in its request body to allow Seer to validate organization ownership. Without this, a user from Organization A could potentially poll for the state of a run created by Organization B if they can guess or enumerate run IDs.
The frontend changes are due to the Sentry bot |