Das Problemen mit den verzögerten Benachrichtigungen scheint schon länger bekannt und diskutiert zu sein.
Scheinbar hängt das technisch auch an Google und Apple, und interessanterweise auch am RKI.
opened 03:56PM - 13 Jun 20 UTC
closed 08:36AM - 15 Dec 20 UTC
mirrored-to-jira
<!--
Thanks for contributing to the project 🙌 ❤️
Before opening a new issue,… please make sure that we do not have any duplicates already open. You can ensure this by searching the issue list for this repository. If there is a duplicate, please close your issue and add a comment to the existing issue instead. Also, please, have a look at our FAQs and existing questions before opening a new question.
-->
Current API allows for querying days on which Diagnosis Keys became available:
```bash
$ date +%Y-%m-%d
2020-06-13
$ curl https://svc90.main.px.t-online.de/version/v1/diagnosis-keys/country/DE/date
["2020-06-09","2020-06-10","2020-06-11","2020-06-12"]
```
Apps use this endpoint to [check if these dates are already in cache](https://github.com/corona-warn-app/cwa-app-android/blob/98218c7c01feb1cb0644e3032841157c59dcab40/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/util/CachedKeyFileHolder.kt#L97), and if not to download Diagnosis Keys for missing days using endpoint:
```bash
$ curl https://svc90.main.px.t-online.de/version/v1/diagnosis-keys/country/DE/date/2020-06-12 --output diagnosis_keys_2020-06-12.zip
```
Let's assume a scenario where someone had contact with infected person. Infected person uploads Diagnosis Keys on 2020-06-12, but these Diagnosis Keys are bundled into package that is only available to download on 2020-06-13. This introduces a day of delay, during which a person who had contact with diagnosed person is unaware of this contact and is not able to self-isolate, potentially endangering people around.
Interestingly it seems to be possible to get Diagnosis Keys uploaded on current day, but only using hour API endpoint:
```bash
$ curl https://svc90.main.px.t-online.de/version/v1/diagnosis-keys/country/DE/date/2020-06-13
$ curl https://svc90.main.px.t-online.de/version/v1/diagnosis-keys/country/DE/date/2020-06-13/hour
[3,8,10,12]
$ curl https://svc90.main.px.t-online.de/version/v1/diagnosis-keys/country/DE/date/2020-06-13/hour/12 --output diagnosis_keys_2020-06-13_12.zip
```
This endpoint seems to be only used in a function which is [marked to be dropped before release](https://github.com/corona-warn-app/cwa-app-android/blob/98218c7c01feb1cb0644e3032841157c59dcab40/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/util/CachedKeyFileHolder.kt#L142). Functionality to fetch hours for current day existed, but it was removed in [this pull request](https://github.com/corona-warn-app/cwa-app-android/pull/185).
**Is there a reason not to continuously download Diagnosis Keys which are being made available during current day, and instead wait until package for complete day is ready?**
As far as I understand this would not introduce any privacy issues since they are already handled by upload mechanism [documented here](https://github.com/corona-warn-app/cwa-documentation/blob/master/solution_architecture.md#upload-schedule-for-diagnosis-keys), and would just let people know faster that they were exposed. Privacy of this solution can also be confirmed by looking at latest Diagnosis Key in each bundle, e.g. in a bundle from current day (2020-06-13, hour 12) latest Diagnosis Key has interval number 2653200, meaning it was generating RPIs yesterday:
```bash
$ TZ="utc" date -d@$((2653200 * 600)) +"%Y-%m-%d %H:%M"
2020-06-12 00:00
```
---
Internal Tracking ID: EXPOSUREAPP-1567
Positiv muss man hier die Transparenz hervorheben, das hier die technischen Herausforderungen auch offen vom SAP Team kommentiert werden. Vielleicht lässt sich Mal ein Interview mit den Architekten der App machen um diese Sicht auch reinzubekommen.