mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 12:32:43 +00:00
Let a German verdict reach the classifier the merge gave it
The two halves of the ECG fix were built apart. One taught the parser Apple's full English verdict set; the other taught it the metadata keys and verdict wording a German watch writes. Each was correct alone, and each left "Sinusrhythmus" unresolved for a different reason. Together they meet: the alias table translates the wording onto Apple's own English, and the classifier decides what it means. One place still owns the meaning, which is what stops a per-language verdict table from drifting the first time Apple adds a case. The test that expected null was pinning the gap between the branches rather than a decision about German. It now expects NOT_DETECTED, and a French verdict takes over the null case, because four of the six languages genuinely have no observed key map yet.
This commit is contained in:
1 parent
f4695457b1
commit
1d733ef192
1 file changed
+9
-2
@@ -363,8 +363,15 @@ describe("Apple Health HKElectrocardiogram CSV parser", () => {
|
||||
// Apple's own "this device does not know this verdict". Deliberately NOT
|
||||
// INCONCLUSIVE — the device did not fail to classify the waveform.
|
||||
["Unrecognized", null],
|
||||
// A verdict from a German watch. Still null, and still the open half.
|
||||
["Sinusrhythmus", null],
|
||||
// A verdict from a German watch. This asserted `null` while the two
|
||||
// halves of the fix lived on separate branches: the classifier gained
|
||||
// Apple's full English set without knowing any German, so a German
|
||||
// verdict was still unreachable. Together they meet — the alias table
|
||||
// translates the wording, the classifier decides the meaning — and the
|
||||
// old expectation was pinning the gap rather than a decision.
|
||||
["Sinusrhythmus", "NOT_DETECTED"],
|
||||
// Four of the six languages are still unmapped, so this stays true.
|
||||
["Fibrillation auriculaire", null],
|
||||
["Some verdict this parser has never seen", null],
|
||||
])("passes through device classification %s only", async (raw, expected) => {
|
||||
await expect(
|
||||
|
||||
Reference in new issue
Block a user