-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LG-12979: Create new idv_level value of 'in_person' on Profile #10371
LG-12979: Create new idv_level value of 'in_person' on Profile #10371
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for putting this together on such short notice!
I need to pull this down and experiment, but at a glance this looks great. All of the comments I left are extremely trivial suggestions about formatting in the tests; the core logic here all looks great.
added multiple newline to separate cases, updated context for consistent communication around tmx Co-authored-by: Matt Wagner <mattwagner@navapbc.com>
app/services/idv/profile_maker.rb
Outdated
@@ -47,7 +47,9 @@ def save_profile( | |||
private | |||
|
|||
def set_idv_level(in_person_verification_needed:, selfie_check_performed:) | |||
if in_person_verification_needed | |||
if in_person_verification_needed && IdentityConfig.store.in_person_proofing_enforce_tmx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Slight refactor to help clarify what's going on with this check (feel free to ignore)
if in_person_verification_needed
if IdentityConfig.store.in_person_proofing_enforce_tmx
:in_person
else
:legacy_in_person
elsif ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I originally had it coded that way but refactored it. I believe elsif is more performant over a nested if. I am happy to change it if nested is preferred.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't feel strongly about any of this, but...
I had actually initially gotten hung up on line 52, because I think the && !IdentityConfig.store.in_person_proofing_enforce_tmx
bit is logically unnecessary—if it weren't false, it would have matched on line 50. But I think having it anyway makes it a tiny bit clearer what is going on (Jack's suggestion does the same), so I didn't comment.
I'm academically curious to experiment with how nested conditionals compare to inlined ones, but I wouldn't worry too much about that level of optimization here.
tl;dr, I don't have a strong opinion and will support whatever you think is most readable here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, for readability I am going with Jack's suggestion as that is how I originally wrote it as well. See commit c08407d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's an edge case, but I think we should probably also check that FeatureManagement.proofing_device_profiling_decisioning_enabled?
is returning true before marking as non-legacy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matthinz Just curious but what does that value represent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matthinz - Jack and I talked through your suggestion. We agree with it! I talked Jack into implement it in a different PR as we thought we had better inspect all instances of IdentityConfig.store.in_person_proofing_enforce_tmx
to evaluate if FeatureManagement.proofing_device_profiling_decisioning_enabled?
should also be considered. That task seemed out of scope for this ticket and we didn't want it to get overlooked here.
Thank you for reviewing this!
Manual testing
|
…79-create-new-idv-level-value-of-in-person
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally, works great. Looks good to me!
@@ -48,7 +48,11 @@ def save_profile( | |||
|
|||
def set_idv_level(in_person_verification_needed:, selfie_check_performed:) | |||
if in_person_verification_needed | |||
:legacy_in_person | |||
if IdentityConfig.store.in_person_proofing_enforce_tmx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noting here that I will add a check for FeatureManagement.proofing_device_profiling_decisioning_enabled?
in a separate pull request.
🎫 Ticket
LG-12979 Create new idv_level value of 'in_person'
🛠 Summary of changes
📜 Testing Plan
Testing locally...
in_person_proofing_enforce_tmx
to false in config.application.ymlrails c
e = InPersonEnrollment.last
. (Note the timestamp)p = e.profile
to confirm the value of idv_level is "legacy_in_person"in_person_proofing_enforce_tmx
to true in config.application.ymlrails c
e2 = InPersonEnrollment.last
(Confirm is was the enrollment you just created by checking timestamps.)p2 = e2.profile
to confirm the value of idv_level is "in_person"