feat(onboarding): Store agentic setup progress - #121913
Draft
evanpurkhiser wants to merge 1 commit into
Draft
Conversation
evanpurkhiser
force-pushed
the
agentic-onboarding-storage
branch
from
August 13, 2026 01:09
52b4e29 to
9d2f7fd
Compare
Contributor
Sentry Snapshot Testing
|
evanpurkhiser
force-pushed
the
agentic-onboarding-storage
branch
from
August 13, 2026 01:23
9d2f7fd to
e46bf6b
Compare
Persist onboarding runs in Redis with a 24-hour lifetime and opaque, hashed handoff tokens. The service owns registration, resumption, updates, cancellation, ownership checks, and snapshot serialization. Client-run claiming and state updates use optimistic concurrency so retries remain idempotent and concurrent page loads converge on one run.
evanpurkhiser
force-pushed
the
agentic-onboarding-storage
branch
from
August 13, 2026 01:26
e46bf6b to
a510924
Compare
Comment on lines
+157
to
+158
|
|
||
| def replace_token(current: OnboardingRun) -> OnboardingRun: |
Contributor
There was a problem hiding this comment.
Stored onboarding state parsed without JSON error handling
_deserialize calls json.loads without catching JSONDecodeError, causing unhandled crashes when Redis holds empty or corrupted run state. _load only guards against None, so an empty string or corrupted bytes from Redis reaches _deserialize and crashes instead of being treated as a missing run.
Evidence
_deserializeat line 273 callsjson.loads(raw)directly without try/except._loadat lines 275-277 passes the raw Redis value into_deserializeafter only checkingraw is not None; empty strings (""orb"") pass this guard and triggerJSONDecodeError.get,_claim_client_run, and_atomic_updateall consume_loador_deserialize.- A corrupted state value causes an unhandled 500 instead of returning
None/RunNotFoundas callers expect for missing runs.
Identified by Warden · sentry-backend-bugs · GD5-MNF
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.
Stack 2 of 5. Previous: #121912. Next: #121914
Persist onboarding runs in Redis with a 24-hour lifetime and opaque, hashed handoff tokens. The service owns registration, resumption, updates, cancellation, ownership checks, and snapshot serialization.
Client-run claiming and state updates use optimistic concurrency so retries remain idempotent and concurrent page loads converge on one run.