forked from Blendman974/faceclaw
Add opt-in authenticated HTTPS export of R1 health history
This commit is contained in:
10 files changed
+348
-1
No files matched your search
@@ -0,0 +1,31 @@
|
||||
# R1 health export
|
||||
|
||||
Android Settings → Health export uses the existing toggle and text/password
|
||||
editors. Export defaults off; URL and API key default empty. Only the API key
|
||||
uses AES-GCM with Android Keystore and an AtomicFile in noBackupFilesDir. Keys
|
||||
are masked on both glasses and phone. The URL/cursor use shared settings.
|
||||
|
||||
The matching API/manifests live in Infrastructure/FaceclawHealth and SQL dashboards
|
||||
in GrafanaDashboards/Health. Protocol v1 sends normalized HealthSample/SleepSession
|
||||
fields with original millisecond timestamps. Batches contain at most 200 records
|
||||
and 240 KB. HTTPS is mandatory, redirects are refused, and only HTTP 200 with
|
||||
accepted:true advances the cursor. No health content or keys are logged.
|
||||
|
||||
The exporter reads existing append journals, including revisions to old months,
|
||||
without extra BLE pulls. Partial trailing lines are retried. Unresolved sleep
|
||||
sessions and sample fixtures are excluded. Replayed data is upserted server-side.
|
||||
A new URL/key resets delivery history safely. One batch runs per minute while
|
||||
the Android process is alive; this adds no background service or wake lock and
|
||||
does not promise synchronization while the app is stopped. Disable preserves
|
||||
local history and existing server data. Watch/iOS export is outside this change.
|
||||
|
||||
Software validation: exporter tests for replay, revisions, failed/malformed
|
||||
acknowledgements, redirects, destination/credential edits, fixtures, partial
|
||||
records and overlapping requests; full JS suite, TypeScript and Android release
|
||||
compilation. API tests additionally cover PostgreSQL rollback and deduplication.
|
||||
|
||||
Hardware/end-to-end validation remains pending: enable ring health sync, configure
|
||||
the deployed URL/key, then compare measured timestamps/values and sleep durations
|
||||
with Grafana. Test offline/reconnect, app restart, disable/re-enable and rotated
|
||||
keys. Check key masking, log redaction and preservation of other preferences.
|
||||
No firmware modification is needed.
|
||||
Reference in new issue
Block a user