Commit Graph

7 Commits

Author SHA1 Message Date
marcuspaico
e81d07975a fix(labs): strict numeric parsing, atomic confirm guard, test integrity
- normalize.ts num(): parseFloat truncated at the first comma, so "1,200"
  silently became 1 (1000x error) and "5,5" became 5. Now strictly matches
  either US thousands-grouping or a plain number spanning the whole string;
  anything else (incl. ambiguous "5,5") returns null instead of a wrong value.
- labs.ts confirm handler: the pending-status check ran before the request
  body was read, so two concurrent confirms could both pass it and
  double-insert. Added a guarded UPDATE ... WHERE status = 'pending' as the
  first statement inside the existing synchronous transaction; zero rows
  affected throws and the route returns 409, with the fast-path check kept
  for the common case.
- Added missing `await` on two rejects.toThrow assertions (llm.test.ts,
  extract.test.ts) that were previously resolving before the assertion
  settled.
- Bumped the 11th-failed-login rate-limit test to a 30s timeout — 10
  sequential argon2id verifies can exceed bun:test's 5s default under load.
2026-08-17 16:17:03 -07:00
marcuspaico
7e70bd1940 feat(labs): draw list/detail, marker history, PDF file serving 2026-08-17 15:57:24 -07:00
marcuspaico
8e9f3d5894 feat(labs): PDF upload, text extraction, LLM draft pipeline 2026-08-17 15:41:02 -07:00
marcuspaico
89394732fd feat(llm): OpenAI-compatible chatJSON helper with injectable fetch
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-17 15:33:53 -07:00
marcuspaico
e0bb888115 fix(labs): remove BUN aliases from urea, correct DHEA-S molar mass 2026-08-17 15:28:13 -07:00
marcuspaico
a08544db7d feat(labs): unit conversion, analyte registry, marker normalization 2026-08-17 15:23:34 -07:00
marcuspaico
3c796da649 feat(crypto): boot-generated key + AES-256-GCM sealed values 2026-08-17 14:07:50 -07:00