mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-11 22:02:16 +00:00
Adds the `EXTERNAL_SOURCE` leaf beside `scopes.ts` and mirrors the value in `measurementSourceEnum` so the read shapes and the sync decoder see it. It stays out of `WRITABLE_MEASUREMENT_SOURCES`: a source a client could assert would prove nothing about where a reading came from, and that constant is published to clients as `ingest.writeAllowlist`. The value-edit gate in `PUT /api/measurements/[id]` needs the other question answered, though — whether the number is the user's own to fix — so it now reads a separate `USER_CORRECTABLE_MEASUREMENT_SOURCES`. The 409 that protects a Withings row exists because the value is the provider's reading; the hardware behind an ingest token is the user's own scale, and locking those rows would contradict what the settings card and the Home Assistant guide promise. That is the only site reading the wider set.