Skip to content

Add agentic onboarding progress polling - #121915

Draft
evanpurkhiser wants to merge 1 commit into
agentic-onboarding-endpointsfrom
agentic-onboarding-polling
Draft

Add agentic onboarding progress polling#121915
evanpurkhiser wants to merge 1 commit into
agentic-onboarding-endpointsfrom
agentic-onboarding-polling

Conversation

@evanpurkhiser

@evanpurkhiser evanpurkhiser commented Aug 13, 2026

Copy link
Copy Markdown
Member

Stack 4 of 5. Previous: #121914. Next: #121916

Add the browser fallback for reading a complete onboarding snapshot by run ID. The same endpoint lets the browser cancel an active run while preserving the final state for rendering.

Reads and cancellation enforce the original user and organization ownership boundary.

@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 polling Add agentic onboarding progress polling 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
0 0 0 0 451 0 ✅ Unchanged

⚙️ sentry-frontend Snapshot Settings

Add the browser fallback for reading a complete onboarding snapshot by run
ID. The same endpoint lets the browser cancel an active run while preserving
the final state for rendering.

Reads and cancellation enforce the original user and organization ownership
boundary.
Comment on lines +51 to +52
except ValueError:
return Response({"detail": CANNOT_CANCEL_RUN_DETAIL}, status=400)

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.

Delete endpoint catches broad ValueError from deserialization failures

The broad except ValueError in delete() catches InvalidOnboardingRun from corrupt or incompatible Redis snapshots and returns a misleading terminal-run message instead of the actual error.

Evidence
  • cancel() in OnboardingProgressService raises ValueError("Onboarding run is terminal") only when run_status is not ACTIVE.
  • _atomic_update() calls _deserialize() first, which invokes OnboardingRun.from_dict(). Any schema mismatch or corrupt data raises InvalidOnboardingRun, which inherits from ValueError.
  • The delete() handler catches all ValueError with CANNOT_CANCEL_RUN_DETAIL, so a deserialization failure is reported as "cannot be cancelled after it is terminal" instead of the actual data error.
  • The get() endpoint on the same service does not guard ValueError from _deserialize, causing a 500 on malformed snapshots.

Identified by Warden · sentry-backend-bugs · DRG-BH3

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.

1 participant