session 112: demo route validation + session log
This commit is contained in:
parent
9fc0bd6c99
commit
f2ddc611d4
4 changed files with 50 additions and 2 deletions
|
|
@ -1,5 +1,17 @@
|
|||
# Session Log
|
||||
|
||||
## Session 112 — 2026-03-01 07:00 UTC (Sunday Morning)
|
||||
- **Focus:** Proactive improvement — demo route input validation
|
||||
- **Problem found:** Demo route (`/v1/demo/html`, `/v1/demo/markdown`) was missing PDF options validation. The convert route was fixed in session 109 but demo was missed. Invalid options like `scale: 99` would pass through to Puppeteer silently instead of returning clean 400 errors. Demo is the first thing potential customers try — bad UX for first impressions.
|
||||
- **Secondary fix:** Demo route had a duplicate `sanitizeFilename` function (didn't handle single quotes or truncation). Replaced with shared utility from `src/utils/sanitize.ts`.
|
||||
- **TDD process:** 6 new tests written first (RED), then validation added (GREEN). Tests: 395 → 401.
|
||||
- **Commit:** `ecc7b96` — `feat: add PDF options validation to demo route (TDD)`
|
||||
- **Files changed:** `src/routes/demo.ts` (added validatePdfOptions, replaced local sanitizeFilename), `src/__tests__/demo.test.ts` (+54 lines, 6 new tests)
|
||||
- **Deployment:** Manual build on k3s-w2 (CI still down), image loaded into containerd, staging patched with nodeSelector=k3s-w2 + imagePullPolicy=IfNotPresent
|
||||
- **Verified on staging:** `scale:99` → 400 "scale must be between 0.1 and 2.0", `format:"INVALID"` → 400 with valid formats list, valid options → 200 PDF
|
||||
- **Note:** Sonnet 4.1 model unavailable for sub-agents (instant failures). Used Opus for sub-agent.
|
||||
- **Staging note:** nodeSelector pinned to k3s-w2 (where image was built). Revert when CI fixed.
|
||||
|
||||
## Session 111 — 2026-02-28 19:00 UTC (Saturday Evening)
|
||||
- **Production:** v0.5.1 ✅ healthy, 2 replicas, 0 restarts, ~59h uptime
|
||||
- **Staging:** ✅ healthy, running commit 597be6b image (17 commits ahead of prod in git: a91b4c5)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue