Repository navigation
fix: make startVerification single-flight so a repeated call cannot start a second verification - #93
Merged
arosasg merged 1 commit intoNov 17, 2026
Conversation
…tart a second verification
A second startVerification or startVerificationWithWorkflow call while one
was running started a second native verification. On Android this opened
two screens and gave the two promises different results; on iOS the result
was dropped, neither promise settled and the app stopped taking touches.
An identical repeat call now joins the running verification and gets the
same result. A different call resolves as failed ("A verification is
already in progress.") without starting anything.
Closes didit-protocol#92
Nishant-96
force-pushed
the
fix/single-flight-start-verification
branch
from
November 17, 2026 15:28
35e86a2 to
dd2a5e3
Compare
Collaborator
|
Codex review ( 💡 Code reviewReviewed commit: No blocking findings in commit Verdict: APPROVE |
Merged
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
Calling
startVerification/startVerificationWithWorkflowwhile a verification was running started a second native verification. On Android that opened two screens and the promises disagreed (completedvscancelled). On iOS the bridge dropped the result, neither promise settled and the app stopped taking touches. Details in #92.Both entry points are now single-flight in
src/index.tsx:failed/unknownwith "A verification is already in progress." and starts nothing.The second call never reaches native, so this covers both platforms without native changes. No public API or type changes.
Trade-off: if a running native call never settles (a separate bug), later calls stay blocked until the JS context reloads. Before this change only that one promise hung. Happy to switch to a dedicated error type, or move the guard into the native modules, if you prefer.
Closes #92
Verification
yarn lint,yarn typecheck,yarn test(212 passing; 6 new inverification-single-flight.test.ts, 4 of which fail without this change),yarn preparecompletedafter finishing the flowfailedin 0 ms, one screen, the firstcancelledon exitcancelledon exit, the app keeps responding to touchesfailedin 0 ms, the firstcancelledon exitPrivacy check
attachments contain no customer/prospect or organization names, contact
details, account/session identifiers, private tracker keys, support
details, or private repository/internal-tool links.
identifying context remains only in the private tracker.