mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 12:32:43 +00:00
The reverse-coverage guard asserts that every key in the bundle is reachable from a call site. It had stopped doing that for most of the bundle. A template whose only static anchor was a namespace root registered that root as a subtree base, so a single per-provider OAuth key marked every key under `settings.*` reachable, and the same shape did it for `measurementReminders.*`. A cache-key string that happens to start with a namespace word had quietly done it for `insights.*` too. The guard stayed green throughout, which is the part worth noticing: a pair guard degrades into a one-end guard without any signal. Extract the matcher into a helper with its own unit tests, and change what it accepts. A template carrying both a literal prefix and a literal suffix now records the pair and requires both ends to match, so the OAuth template covers the provider keys and nothing else. A template with no suffix whose anchor is a bare namespace no longer whitelists anything — it fails the guard by name, with the two honest remedies in the message. The same door is used by the template, assignment and concatenation arms, so none of them can reopen it. Template bodies are read by scanning forward from a known opening backtick rather than by pairing backticks across the tree, which was drifting and dropping whole files out of the scan. Three call sites build their keys whole instead of interpolating onto a namespace root: the two measurement-reminder due helpers, the mental-health option labels, and the OAuth error copy, which now names its per-provider base. Two audit-log action names that merely look like keys carry a written exemption; the API error catalog is a runtime lookup and is allowlisted with its reason. With the matcher honest, 149 keys had no call site left. They belong to an explainer popover, a hypnogram, a passkey table and an insights hero that were all rebuilt or removed, and they are deleted from all six locales. The explainer guard stops pinning its title leaves, which no surface has rendered since the popover went.