Describe the bug
Medic ID never generated if a report is created before sentinel ID is generated
To Reproduce
Steps to reproduce the behavior:
messages.generic.registration_not_foundExpected behavior
Ideally, the ID should still be generated and report associated to that contact with no errors
Screenshots
If applicable, add screenshots to help explain your problem.


Environment
What config is being used here? Based on the symptom, I would guess Standard, in which case this is expected and not a major concern. It is also not something new so shouldn't block the release.
This scenario will occur if the config relies on the medic ID instead of the UUID, as is the case when CHWs use SMS flows. In SMS flows the second report cannot happen before the registration is completed and the person's ID is sent to the CHW.
Can you check that the Medic ID is still eventually created? If it is, then we can move this to fixing the given config.
@ngaruko if you're creating contacts and submitting reports as an offline user, in order for the device to get the updated contact with the patient_id, you might need to sync twice, once to upload the contact document to the sever and the second time to download the updated contact, that includes the patient_id, after Sentinel has processed the doc.
To make sure you sync the 2nd time after Sentinel has added the patient_id, you can check the same contact as an admin user (who should get the updates in real time).
On the other hand, @ngaruko is probably right that we are adding messages.generic.registration_not_found when the report has a patient_uuid and no patient_id, so assigning myself to fix that.
Ready for AT on 6205-no-errors-for-patient-uuid - this branch should fix reports getting an incorrect registration_not_found error.
LTGM.