mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 12:32:43 +00:00
fix(analytics): replace NUL-byte map-key separators with a visible one
Two in-memory key builders joined their parts with a literal NUL
(`${a}\x00${b}`): the sleep writer-bucket key and the correlation
pair key. The embedded NUL made grep classify both files as binary, so a
plain `grep symbol src/**` skipped them silently.
Swap the separator for U+241F (␟, the unit separator). It cannot appear
in a `MeasurementSource` enum literal, a device-type tag, or a
correlation-channel name, so the key semantics are identical — the sleep
key still slices its source prefix unambiguously and the correlation Set
still excludes double-counts. Both keys are ephemeral (one pass, never
persisted), so the byte change is invisible to any stored state.
This commit is contained in:
1 parent
55186ccd3e
commit
3dc6c7436f
2 files changed
+13
-4
No files matched your search
@@ -309,10 +309,11 @@ const RECONSTRUCTED_TIMELINE_SOURCES: ReadonlySet<string> = new Set<string>([
|
||||
|
||||
/**
|
||||
* Separator between the source and device-type parts of a writer key.
|
||||
* ` | ||||