docs(quick-261012-s3g): decision note naming DOMPurify and Vitest browser mode for the admin

This commit is contained in:
2026-10-12 20:31:34 +02:00
parent b30317b2fb
commit fba15c9378
2 changed files with 71 additions and 0 deletions

View File

@@ -56,6 +56,16 @@ This extends `.planning/research/go-ecosystem.md` (2026-09-16 GitHub-API-verifie
| testcontainers-go | integration tests against real Postgres | Gate these behind a build tag or `-short` skip so unit tests stay fast; the phase-ending "unit tests" plan (per this repo's lean-mode rule) should still run everywhere, with testcontainers tests as a separate, slower suite. |
| golden-file API parity tests | diff Go backend responses against recorded PHP responses | Not a library — a pattern: record Płytarium's actual JSON responses per route as fixtures (`testdata/parity/<route>.golden.json`), replay the same requests against the Go backend in `httptest.Server`, diff with `testify/assert.JSONEq` or a small custom normalizer for non-deterministic fields (timestamps, IDs). This is the literal implementation of the PROJECT.md requirement "an API parity test suite replays the Nuxt app's and MCP server's requests against both backends and diffs responses." |
### Admin SPA (npm) additions
Added 2026-10-12 (quick task 261012-s3g). Exact pins in `admin/package.json`, committed lockfile, installed with `npm ci`.
| Library | Version | Purpose | Notes |
|---------|---------|---------|-------|
| dompurify | 3.4.16 | Sanitizes the richeditor read-only display (`displayHtml`, T-10-16 / T-17-10) | Runtime dependency. Dedicated instance, EDITOR_TAGS / href-only config, fail-closed canary. 3.4.17 pending a 7-day cooldown (bump after 2026-10-19). See `.planning/notes/2026-10-12-admin-display-sanitizer-dompurify.md`. |
| @vitest/browser | 3.2.7 (dev) | Vitest browser mode for tests that need a real engine (`npm --prefix admin run test:browser`) | Must match vitest 3.2.7 exactly. See the decision note. |
| playwright | 1.60.0 (dev) | Chromium provider for Vitest browser mode | Not the deferred Phase 10 e2e suite (D-23). Needs the chromium build on the machine. See the decision note. |
## Installation
```bash