chore(memory): capitalize zoosteo rename + Docker pnpm pin — BLK-005, LRN-022, journal
- BLK-005: VPS Docker build crash on pnpm@latest pulling pnpm >=11.4 needing Node 22.13 (node:sqlite import) against node:20-alpine image. Resolved by pinning pnpm@11.1.3. - LRN-022: never use floating pnpm@latest (or any unpinned upstream tag) in Dockerfiles — pnpm minor bumps can silently raise Node floor. Fix paths: pin exact + mirror in packageManager field; audit CI too. - journal 2026-05-21: two lines for the rename commit and the Docker pin commit. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
7dccde72f8
commit
202110ddd2
3 files changed
+23
No files matched your search
@@ -171,3 +171,15 @@ Fix paths:
|
||||
|
||||
Catalog JSON went v1.2→v2.0 (semantic breaking change per author doc), but `findings.ts` Zod schema declared `requires_vet_referral` boolean + `description_fr` optional from B0 day-one. Result: v2.0 file dropped in, parses clean, 154/154 tests stay green, no schema edit, no consumer rewrite. Picker + PDF already keyed on boolean (no textual `description_fr.includes('vétérinaire')` fallback ever existed in our code), so the v2.0 "removed redundant text" change is a no-op at consumption site. Lesson: when authoring a Zod schema for external content, mark anything that "might or might not" appear as `.optional()` + make booleans authoritative early. The schema then forms a stable contract that absorbs author-side simplifications without code churn.
|
||||
Apply: any data contract sourced from non-engineering authors (clinical, legal, marketing). Decouple presence-of-field from semantic-of-field; let the boolean drive logic, let text be display-only ornamentation.
|
||||
|
||||
---
|
||||
|
||||
## LRN-022 | 2026-05-21 | Never floating `pnpm@latest` (or any unpinned tag) in Dockerfile — silent Node-version drift
|
||||
|
||||
`corepack prepare pnpm@latest --activate` re-resolves at every cold build. pnpm minor bumps can raise required Node floor without warning: pnpm 11.4 added `node:sqlite` import → Node 22.13+ required. Image stayed on `node:20-alpine` → `ERR_UNKNOWN_BUILTIN_MODULE: node:sqlite` at install start. Works on dev host because corepack caches older pnpm (11.1.3); breaks on fresh VPS cold build that re-resolves `@latest`. Same trap for any unpinned upstream ref: `node:lts`, `:alpine`, `nginx:alpine`, GitHub Actions `uses: foo@v1` (prefer SHA).
|
||||
Fix paths:
|
||||
- Pin exact in Dockerfile: `corepack prepare pnpm@<X.Y.Z> --activate`.
|
||||
- Mirror in `package.json`: `"packageManager": "pnpm@X.Y.Z"` — host + Docker stay synced via corepack.
|
||||
- Bump base image deliberately when pnpm major bump is intentional, never as side effect of `@latest`.
|
||||
**Why:** Floating tag = drift bomb between cached dev + fresh prod resolve. CI passes today, prod breaks tomorrow on same Dockerfile, no commit changed.
|
||||
**How to apply:** Audit every Dockerfile + docker-compose + CI `uses:` for floating refs before first prod deploy. Lockfile pins app deps; Dockerfile + workflow files must pin toolchain.
|
||||
Reference in new issue
Block a user