Skip to content

LG-11012: redo document capture bug fixes#9256

Merged
amirbey merged 41 commits intomainfrom
amirbey/sonia-hybrid-mobile-redo-document-capture
Oct 4, 2023
Merged

LG-11012: redo document capture bug fixes#9256
amirbey merged 41 commits intomainfrom
amirbey/sonia-hybrid-mobile-redo-document-capture

Conversation

@amirbey
Copy link
Contributor

@amirbey amirbey commented Sep 24, 2023

🎫 Ticket

LG-11012

🛠 Summary of changes

  • reset redo_document_capture in idv_session upon successful doc auth in the hybrid flow -- same as in the standard flow
  • allow a user to perform hybrid document capture during a document capture redo
  • doc capture polling to return new doc auth result (not original result) during a document capture redo
  • confirm ocr_pending_confirmation after a user confirms/submits a succesful doc auth
  • add a timestamp to the DocumentCaptureSessionResult

📜 Testing Plan

Scenario1: Standard doc auth + hybrid redo doc auth

  1. Complete IdV until hybrid handoff is reached
  2. Select desktop and submit images (that trigger barcode attention) and continue
  3. continue IdV until verify info page is reached
  4. On verify info page, click the "upload new photos" link in the warning banner at top of page
  5. Select hybrid/send link and submit images successfully
  6. return to original window and complete IdV

Scenario2: hybrid doc auth + hybrid redo doc auth

  1. Complete IdV until hybrid handoff is reached
  2. Select hybrid/sendlink and fetch link at example.com/test/telephony
  3. Open mobile link in incognito/private window and submit images (that trigger barcode attention) and continue
  4. return to original window and continue IdV until verify info page is reached
  5. On verify info page, click the "upload new photos" link in the warning banner at top of page
  6. Select hybrid/send link and fetch link at example.com/test/telephony
  7. Open mobile link in incognito/private window and submit images (that trigger barcode attention) and continue
  8. return to original window and complete IdV

@amirbey amirbey changed the title Amirbey/sonia hybrid mobile redo document capture LG-11012: redo document capture bug fixes Sep 26, 2023
@amirbey amirbey force-pushed the amirbey/sonia-hybrid-mobile-redo-document-capture branch from 7786219 to 57c3528 Compare September 27, 2023 16:00
@amirbey amirbey self-assigned this Sep 27, 2023
@amirbey amirbey marked this pull request as ready for review September 27, 2023 17:00
@amirbey amirbey force-pushed the amirbey/sonia-hybrid-mobile-redo-document-capture branch from 14bf3e3 to 1ee42e3 Compare September 28, 2023 14:12
@amirbey amirbey requested review from a team and soniaconnolly September 28, 2023 15:01
Copy link
Contributor

@soniaconnolly soniaconnolly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks great. Thanks for digging into all this! Several comments, but the only blocking one is investigating whether memoization of @session_result is causing problems.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not have thought of resetting that here! And I would have assumed that it would be too early, but if tests are passing my assumption would clearly be wrong.

Copy link
Contributor Author

@amirbey amirbey Oct 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fair point. this is relatively consistent with resetting the redo flag in the standard flow. We also don't have use for this redo_document_capture after the link sent step in the hybrid flow

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you were correct ... moved appropriately to link_sent#update ... thanks! 👍🏿

Copy link
Contributor

@soniaconnolly soniaconnolly Sep 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this definition, very practical. "Have we done this already?" I think it will be resilient as we enable the back button, too.

Would it make sense to define it as DocumentCaptureSession#redo?(captured_at:) to avoid repeating the definition in DocumentCaptureController ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes i wanted to do that. however, this line is the blocker ... do you knowi is this load_async still necessary? 🤔

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know off-hand. @aduth might know if it's part of the doc auth async code. Happy to dig in with you if that would be helpful.

Copy link
Contributor

@aduth aduth Oct 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think the load_doc_auth_async_result is related to the now-defunct (as of #8377) async document capture code. So it would probably be safe to remove all of that.

Copy link
Contributor Author

@amirbey amirbey Oct 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @aduth ... after briefly testing out the removal of load_doc_auth_async_result .. i think it'd be best to remove it in a follow up PR

@amirbey amirbey force-pushed the amirbey/sonia-hybrid-mobile-redo-document-capture branch 2 times, most recently from b5a1026 to 4f5452b Compare October 2, 2023 22:59
@amirbey amirbey requested a review from soniaconnolly October 2, 2023 23:21
Copy link
Contributor

@soniaconnolly soniaconnolly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally, and when I upload a yml file with a different name on the second DocumentCapture (used first standard, then hybrid), it doesn't update the name in VerifyInfo. It also still shows the warning at the top, even if I refresh the page.

Using standard and standard, VerifyInfo changes as expected.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know off-hand. @aduth might know if it's part of the doc auth async code. Happy to dig in with you if that would be helpful.

@amirbey amirbey force-pushed the amirbey/sonia-hybrid-mobile-redo-document-capture branch from 4f5452b to 4f0ba64 Compare October 3, 2023 19:58
@amirbey amirbey force-pushed the amirbey/sonia-hybrid-mobile-redo-document-capture branch from f8496f2 to bf1f93a Compare October 4, 2023 02:11
Copy link
Contributor

@soniaconnolly soniaconnolly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for digging in to all this and sorting it out! LGTM, with a couple more small comments.

I tested standard/standard, standard/hybrid, and hybrid/hybrid, and they all work as expected.

Noticed that if someone enters a Puerto Rico address on a redo, they don't get prompted to edit their address (since the SSN step is skipped the second time), so entered LG-11201 for that.

Comment on lines +102 to +107
def new_session_result
DocumentCaptureSessionResult.new(
id: generate_result_id,
captured_at: Time.zone.now,
)
end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like you didn't end up using this method.

:attention_with_barcode,
:failed_front_image_fingerprints,
:failed_back_image_fingerprints,
:captured_at,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any issue with existing document_capture_sessions in redis not having this attribute?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great catch ... added dig(:captured_at) to check if it exists before evaluating 👍🏿

@amirbey amirbey merged commit 6e9cca8 into main Oct 4, 2023
@amirbey amirbey deleted the amirbey/sonia-hybrid-mobile-redo-document-capture branch October 4, 2023 21:15
@jmhooper jmhooper mentioned this pull request Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants