From 307b01e8a12bd779e2921683c54e0e0fba3238b1 Mon Sep 17 00:00:00 2001 From: Vuong Hoang Date: Wed, 20 May 2026 21:57:51 -0700 Subject: [PATCH] snapshot: capture skaldsong env-var-name footgun (CD wiping state) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Same lesson family as the /app/web/dist mismatch — encoding container-internal contract (paths OR env var names) in compose needs to be verified against the Dockerfile + app, not against design-doc shorthand. Wrong env var names silently no-op; app falls back to Dockerfile defaults which orthogonally miss the bind mount, and state goes to ephemeral layer until next recreate. --- persistent-memory.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/persistent-memory.md b/persistent-memory.md index 382611c..9b7a9df 100644 --- a/persistent-memory.md +++ b/persistent-memory.md @@ -273,6 +273,20 @@ _As of 2026-05-20:_ Lesson: when encoding container-internal paths in compose, verify against the Dockerfile, not the design-doc. +- `[2026-05-20]` `SKALDSONG_DB_PATH` + `SKALDSONG_RUNS_DIR` in + compose env block — names skaldsong's app doesn't read. App reads + `SKALDSONG_HOST_SQLITE_PATH` + `SKALDSONG_HOST_RUNS_ROOT` (per + Dockerfile ENV defaults). Wrong names = silently no-op; app fell + back to Dockerfile defaults pointing at `/app/data/...` which the + compose's bind mount did NOT cover (mount target was + `/app/state/...`). Result: every `--force-recreate` wiped the + SQLite DB along with the ephemeral container layer. Caught by + skaldsong-dev after operator noticed stories vanishing on each + CD push (althing thread `01KS4DPF6SXTBP4Q360JZVWPNT`). Fix in + `52e98fa` — rename env vars, bind targets unchanged. Same lesson + as the `/app/web/dist` footgun: verify env var NAMES against the + Dockerfile/app, not against design-doc shorthand. + - `[2026-05-19]` Playbook verify step `docker ps | grep healthy` racing the container's `start_period` (30s in compose's healthcheck). Verify ran 0.09s after `compose up -d --force-recreate`