mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 20:42:43 +00:00
The write-smoke suite is `satisfies Record<MeasurementSource, SourceCase>`, so growing the enum is a compile error until a case exists; the new one goes through the ordinary single-entry POST, which is the production path. It carries the trap this suite sets for you written down: `beforeEach` seeds a session cookie and the caller resolver is cookie-first, so arming only the authorization header resolves as that session and quietly writes MANUAL — the case would then pass without testing anything. Both hardcoded totals move 14 → 15. In the bearer-scope suite the two rows that asserted MANUAL now assert EXTERNAL, and three cases join them: a body naming MANUAL is refused on each route (the widening from "names APPLE_HEALTH" to "names anything", which nothing else covered), and a bridge-written row is still value- editable by its owner through PUT. That last one guards the split between the write allowlist and the correctable set — folding the two constants back together value-locks every bridge row behind a 409, and this is what notices.