You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a Strong Verification attempt fails because the passport data doesn't match the user's profile, we show a single combined message that mentions both date of birth and gender:
Your Strong Verification attempt has failed because the date of birth or gender on your profile does not match the date of birth or sex on your passport. Please contact the support team to update your date of birth or gender, or if your passport sex does not match your gender identity.
Because this message can't tell the user which field actually mismatched, some users contact support confused about why their verification failed (raised in the email copy review in #9150, on app/backend/src/couchers/email/locales/en.json).
Why it's a catch-all today
In app/backend/src/couchers/jobs/handlers.py we only check the combined predicate has_strong_verification(user) and, on failure, emit a single reason:
The model already exposes the granular checks matches_birthdate(user) and matches_gender(user) (in couchers/models/verification.py), so we can distinguish the cause without new data:
In the failure branch, evaluate matches_birthdate / matches_gender separately and pick a more specific SV_FAIL_REASON_* (e.g. wrong birthdate vs. wrong gender; possibly keep the combined reason only for the both-wrong case).
Add the corresponding reason enum value(s) to the VerificationSVFail proto.
@aapeliv has the most context on the Strong Verification flow and whether there are edge cases (e.g. passport_sex == unspecified, the has_passport_sex_gender_exception escape hatch) that should still fall back to the combined message.
This affects more than just the email — push notifications and any other surface using SV_FAIL_REASON_WRONG_BIRTHDATE_OR_GENDER would need updating too.
Problem
When a Strong Verification attempt fails because the passport data doesn't match the user's profile, we show a single combined message that mentions both date of birth and gender:
Because this message can't tell the user which field actually mismatched, some users contact support confused about why their verification failed (raised in the email copy review in #9150, on
app/backend/src/couchers/email/locales/en.json).Why it's a catch-all today
In
app/backend/src/couchers/jobs/handlers.pywe only check the combined predicatehas_strong_verification(user)and, on failure, emit a single reason:couchers/app/backend/src/couchers/jobs/handlers.py
Lines 1013 to 1022 in cdeff25
has_strong_verificationis defined as the AND of the birthdate and gender checks, so by the time we reach theelsewe've thrown away which one failed:Good news
The model already exposes the granular checks
matches_birthdate(user)andmatches_gender(user)(incouchers/models/verification.py), so we can distinguish the cause without new data:Proposed fix
matches_birthdate/matches_genderseparately and pick a more specificSV_FAIL_REASON_*(e.g. wrong birthdate vs. wrong gender; possibly keep the combined reason only for the both-wrong case).VerificationSVFailproto.Notes / open questions
passport_sex == unspecified, thehas_passport_sex_gender_exceptionescape hatch) that should still fall back to the combined message.SV_FAIL_REASON_WRONG_BIRTHDATE_OR_GENDERwould need updating too.Filed from a review discussion in #9150.