Skip to content

LG-6293 Add more DOCUMENT_FAIL conditions to verification failures report#6382

Merged
stevegsa merged 6 commits intomainfrom
stevegsa-add-more-doc-failures-to-verification-failures-reports.rb
May 20, 2022
Merged

LG-6293 Add more DOCUMENT_FAIL conditions to verification failures report#6382
stevegsa merged 6 commits intomainfrom
stevegsa-add-more-doc-failures-to-verification-failures-reports.rb

Conversation

@stevegsa
Copy link
Contributor

@stevegsa stevegsa commented May 19, 2022

Why: Right now DOCUMENT_FAIL conditions are triggered when the entire image set is rejected by the back end vendor. We are going to add to that users that at least attempted to submit a back image to make it behave more like the drop offs report. Technically they will not be the same because the drop offs report just looks at counts and a welcome timestamp in range (so technically it's reporting the furthest the user ever got) and not the daily errors. I'm also adding in a little buffer to allow for users that submit for the day but then restart the process either within the same session or within the buffer of 23 hours since the report currently runs every 24 hours. (ie welcome step will actually have a greater timestamp then the failed submit). Also renaming the report verification-failures-report and putting all the vendor reports in one directory.
How: Add timestamps for last back image submits for mobile, desktop, hybrid.

@stevegsa stevegsa changed the title LG-6293 Add more conditions considered DOCUMENT_FAIL to verification … LG-6293 Add more DOCUMENT_FAIL conditions to verification failures report May 19, 2022
@stevegsa stevegsa marked this pull request as ready for review May 19, 2022 17:05
Comment on lines +77 to +80
csv = CSV.parse(reports[0])
expect(csv.length).to eq(2)
expect(csv.first).to eq(['uuid', 'welcome_view_at', 'error_code'])
expect(csv[1]).to eq([uuid, now.to_time.utc.iso8601, 'DOCUMENT_FAIL'])
Copy link
Contributor

Choose a reason for hiding this comment

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

If we parse the CSV with headers: true we can get some nice fields to check:

Suggested change
csv = CSV.parse(reports[0])
expect(csv.length).to eq(2)
expect(csv.first).to eq(['uuid', 'welcome_view_at', 'error_code'])
expect(csv[1]).to eq([uuid, now.to_time.utc.iso8601, 'DOCUMENT_FAIL'])
csv = CSV.parse(reports.first, headers: true)
expect(csv.length).to eq(1)
expect(csv.first['uuid']).to eq(uuid)
expect(csv.first['welcome_view_at']).to eq(now.to_time.utc.iso8601)
expect(csv.first['error_code']).to eq('DOCUMENT_FAIL')

Copy link
Contributor

@zachmargolis zachmargolis left a comment

Choose a reason for hiding this comment

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

LGTM

@stevegsa stevegsa merged commit 0c067f9 into main May 20, 2022
@stevegsa stevegsa deleted the stevegsa-add-more-doc-failures-to-verification-failures-reports.rb branch May 20, 2022 19:45
t.integer "verify_phone_submit_count", default: 0
t.datetime "verify_phone_submit_at"
t.datetime "document_capture_submit_at"
t.index ["issuer"], name: "index_doc_auth_logs_on_issuer"
Copy link
Contributor

Choose a reason for hiding this comment

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

Was it intended to remove this line? When running the migration locally, the line was added back.

aduth added a commit that referenced this pull request May 24, 2022
**Why**: So that there aren't local changes after a developer runs migrations.

Context: #6382 (comment)

[skip changelog]
@aduth aduth mentioned this pull request May 24, 2022
aduth added a commit that referenced this pull request May 25, 2022
**Why**: So that there aren't local changes after a developer runs migrations.

Context: #6382 (comment)

[skip changelog]
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