fix(onboarding): prevent replay after switching to BYOK - #343
Merged
hijzy merged 1 commit intoSep 2, 2026
Merged
Conversation
Collaborator
Author
|
Project Harness review handoff marker. Only reviews submitted strictly after this GitHub timestamp qualify. |
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.
Summary
Root cause
Account logout cleared the active account UUID before the later BYOK mode update tried to inherit onboarding. The renderer kept the old account completion in memory, so the first transition reached Home, but a new renderer bootstrap read the still-incomplete local BYOK row and replayed onboarding.
The supplied log proves two onboarding UI lifecycles; it does not prove the report-generation backend ran twice.
Regression coverage
The new SQLite-backed regression failed before the fix with local BYOK
completed=false,currentStep=scan_permission_required, andcompletedAt=null. It now covers persistence across close/reopen, source-account isolation, idempotence, incomplete-account no-op, cloud logout failure, and delayed logout concurrency. Full and pet renderer routes cover BYOK with and without an Agent model.Verification
3844c53bf59d62c9e2690960b455f2e60766769d0307c32bf01ce0459173cf0fBackport
Git three-way verification confirms this commit applies to
release/v1.1.2without conflicts. The release backport should be created after this main change is reviewed, using the requiredBackport-ofprovenance.