chore(chore): capitalize step 0-1 learnings, eval and journal
This commit is contained in:
1 parent
e84cbaf884
commit
e9047a99d2
3 files changed
+28
No files matched your search
@@ -244,3 +244,18 @@ nginx:alpine default = master root, workers nginx. Listen port >=1024 → USER n
|
||||
vite + @vitejs/plugin-react-swc + @tailwindcss/vite sat in dependencies → `pnpm audit --prod` reported their CVEs as prod findings. Build-time-only packages belong in devDependencies; SPA runtime imports none of them.
|
||||
**Why:** tour 2026-07-12 cso posture audit — all 3 "prod" advisories were build-toolchain. Moved 187dfb5; build+tests green, prod audit clean.
|
||||
**How to apply:** scaffold check: anything imported only by vite.config / build pipeline → devDependencies. Then `pnpm audit --prod` reflects real runtime surface. Docker multi-stage unaffected (builder installs all).
|
||||
|
||||
---
|
||||
|
||||
## LRN-032 | 2026-10-08 | pnpm via corepack prepare, not ~/.local/bin
|
||||
|
||||
Dev host: no pnpm on PATH, no node_modules, Node 24.21 (CLAUDE.md said Node 20 + `~/.local/bin/pnpm`, both stale). `corepack prepare pnpm@10.13.1 --activate` + `corepack pnpm <cmd>` works, zero global install, same pin as Dockerfile (BLK-005). Suite 271/271 on Node 24.
|
||||
Apply: never `export PATH=…` in Bash tool (denied); call `corepack pnpm`. Pin `packageManager` in package.json so corepack picks version alone.
|
||||
|
||||
---
|
||||
|
||||
## LRN-033 | 2026-10-08 | Characterise legacy via DOM + prototype spies, no refactor
|
||||
|
||||
Untestable seams (click chain inside route, PDF text) pinned without touching src: render route in MemoryRouter + mock `@/anatomy/svgLoader` to parse real files, dispatch bubbling click on `[data-anno-id]`; `vi.spyOn(PDFPage.prototype,'drawText')` captures every drawn string (pdf-lib has no extractor); attachment dicts via `doc.context.enumerateIndirectObjects()` + `String(obj)` (object streams hide names from raw bytes). Standalone HTML tool: slice functions by text markers, `new Function(src)` → parity test.
|
||||
Trap: store set outside React then click = stale closure; drive state through UI (collapse card) and `waitFor`.
|
||||
Apply: any "tests before migration" step on untested legacy code.
|
||||
Reference in new issue
Block a user