Skip to content

Add agentic onboarding progress endpoints - #121914

Draft
evanpurkhiser wants to merge 1 commit into
agentic-onboarding-storagefrom
agentic-onboarding-endpoints
Draft

Add agentic onboarding progress endpoints#121914
evanpurkhiser wants to merge 1 commit into
agentic-onboarding-storagefrom
agentic-onboarding-endpoints

Conversation

@evanpurkhiser

@evanpurkhiser evanpurkhiser commented Aug 13, 2026

Copy link
Copy Markdown
Member

Stack 3 of 5. Previous: #121913. Next: #121915

Expose private organization endpoints for registering a browser run and accepting stage updates from the MCP tool. Requests require org:read access and bind every run to both the authenticated user and organization.

The API returns the complete normalized snapshot after each update so callers can observe accepted state and stop after a terminal run.

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Aug 13, 2026
@evanpurkhiser evanpurkhiser changed the title agentic onboarding endpoints Add agentic onboarding progress endpoints Aug 13, 2026
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Aug 13, 2026
@sentry

sentry Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Sentry Snapshot Testing

Name Added Removed Changed Renamed Unchanged Skipped Status
sentry-frontend
sentry-frontend
- - - - - - ⏳ Processing

⚙️ sentry-frontend Snapshot Settings

Comment thread src/sentry/api/endpoints/organization_agentic_onboarding.py Fixed
Expose private organization endpoints for registering a browser run and
accepting stage updates from the MCP tool. Requests require org:read access
and bind every run to both the authenticated user and organization.

The API returns the complete normalized snapshot after each update so callers
can observe accepted state and stop after a terminal run.
serializer = AgenticOnboardingRunRequestSerializer(data=request.data)
serializer.is_valid(raise_exception=True)
user_id = request.user.id
assert user_id is not None

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.

Bare assert used to validate authenticated user presence

Replace assert user_id is not None with an explicit guard that returns a 401/400 for requests that lack a user (e.g. org auth tokens), since OrganizationPermission allows token-based authentication where request.user.id can be None.

Evidence
  • AgenticOnboardingPermission inherits OrganizationPermission, whose determine_access method grants access for token auth (e.g. org auth tokens) even when request.user is anonymous.
  • convert_args in OrganizationEndpoint already calls organization_service.get_organization_by_id(..., user_id=None) for such requests, confirming the base class tolerates a missing user.
  • The assert user_id is not None in the view method will therefore raise AssertionError (500) instead of a proper client error when a valid org auth token with org:read hits this endpoint.
Also found at 1 additional location
  • src/sentry/api/endpoints/organization_agentic_onboarding.py:132

Identified by Warden · sentry-backend-bugs · V5T-YSR

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 Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants