DocFast session 128: BUG-102 fixed (sanitized PDF options ignored), 473 tests

This commit is contained in:
Hoid 2026-03-05 08:07:34 +01:00
parent 0d1689b245
commit 237e9cc546
3 changed files with 27 additions and 3 deletions

View file

@ -1,3 +1,11 @@
## BUG-102: Convert/demo routes ignore sanitized PDF options from validator
- **Date:** 2026-03-05
- **Severity:** MEDIUM
- **Issue:** `validatePdfOptions()` returns `{ valid: true, sanitized: {...} }` with normalized values (e.g., format `"a4"``"A4"`). But all convert routes (html, markdown, url) and demo routes pass raw `body.*` values to `renderPdf()` instead of `validation.sanitized.*`. Format normalization never takes effect.
- **Impact:** Users sending lowercase format like `"a4"` get it passed raw to Puppeteer. Puppeteer may reject or silently handle it, but the validator's normalization is wasted work.
- **Fix:** Use `validation.sanitized` for PDF options in all convert and demo routes.
- **Status:** ✅ FIXED — commit ba2e542. All 5 routes (3 convert + 2 demo) now use `validation.sanitized` from `validatePdfOptions()`. 5 TDD tests added (convert-sanitized.test.ts). 473 tests total, all passing. Pushed to main (staging auto-deploy pending CI runner).
## BUG-101: Body size limits on demo and convert routes are ineffective — global parser runs first
- **Date:** 2026-03-04
- **Severity:** MEDIUM