mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-13 06:32:03 +00:00
fix(integrations): a provider with no history is "unknown"
The ledger's synthetic "no row" snapshot returned `state: "connected"`, so the field's default meant the opposite of its name: every account that had never connected a provider published `connected` on the status envelope. Settings survived it by never reading `state`; the setup flow's connect step did read it, and told brand-new accounts their wearable was connected. The snapshot now reads `unknown`. `syncHealth.verdict` is unchanged and stays the only liveness truth; the managed-record projection maps `unknown` onto `disconnected` the way it already maps a missing connection.
This commit is contained in:
1 parent
274923a060
commit
0bdbf009f6
8 files changed
+126
-23
No files matched your search
+18
-9
@@ -64323,9 +64323,12 @@ components:
|
||||
- error_reauth
|
||||
- disconnected
|
||||
- parked
|
||||
description: Last recorded ledger state for this provider. `connected` is also the value a user who has never synced
|
||||
sees — the ledger row is created on the first attempt, and its absence reads as `connected`, not as an
|
||||
error.
|
||||
- unknown
|
||||
description: "Last recorded ledger state for this provider. `unknown` (added v1.38.19) is what a user who has never
|
||||
synced sees: the ledger row is created on the first attempt, and its absence is no claim about the
|
||||
connection in either direction — it used to read as `connected`, which is why a client must never treat this
|
||||
field as liveness. Read `syncHealth.verdict` for that, and treat `unknown` as `disconnected` anywhere a
|
||||
ledger state is painted."
|
||||
lastSuccessAt:
|
||||
anyOf:
|
||||
- type: string
|
||||
@@ -65318,9 +65321,12 @@ components:
|
||||
- error_reauth
|
||||
- disconnected
|
||||
- parked
|
||||
description: Last recorded ledger state for this provider. `connected` is also the value a user who has never synced
|
||||
sees — the ledger row is created on the first attempt, and its absence reads as `connected`, not as an
|
||||
error.
|
||||
- unknown
|
||||
description: "Last recorded ledger state for this provider. `unknown` (added v1.38.19) is what a user who has never
|
||||
synced sees: the ledger row is created on the first attempt, and its absence is no claim about the
|
||||
connection in either direction — it used to read as `connected`, which is why a client must never treat this
|
||||
field as liveness. Read `syncHealth.verdict` for that, and treat `unknown` as `disconnected` anywhere a
|
||||
ledger state is painted."
|
||||
lastSuccessAt:
|
||||
anyOf:
|
||||
- type: string
|
||||
@@ -65724,9 +65730,12 @@ components:
|
||||
- error_reauth
|
||||
- disconnected
|
||||
- parked
|
||||
description: Last recorded ledger state for this provider. `connected` is also the value a user who has never synced
|
||||
sees — the ledger row is created on the first attempt, and its absence reads as `connected`, not as an
|
||||
error.
|
||||
- unknown
|
||||
description: "Last recorded ledger state for this provider. `unknown` (added v1.38.19) is what a user who has never
|
||||
synced sees: the ledger row is created on the first attempt, and its absence is no claim about the
|
||||
connection in either direction — it used to read as `connected`, which is why a client must never treat this
|
||||
field as liveness. Read `syncHealth.verdict` for that, and treat `unknown` as `disconnected` anywhere a
|
||||
ledger state is painted."
|
||||
lastSuccessAt:
|
||||
anyOf:
|
||||
- type: string
|
||||
|
||||
Reference in new issue
Block a user