snapshot: capture skaldsong env-var-name footgun (CD wiping state)

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.
This commit is contained in:
vh
2026-05-20 21:57:51 -07:00
parent 52e98fa2d0
commit 307b01e8a1
+14
View File
@@ -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`