Skip to content

v0.8.1 — keep every sqlite file on the persistent volume

Choose a tag to compare

@jr551 jr551 released this 01 Aug 10:25

Patch on top of v0.8.0. Recommended for anyone running v0.8.0.

The AI cache shipped ephemeral

Its default path was a bare ./data/ai-cache.db. The deployed compose file lives outside this repo and only sets the paths it already knew about, so the new file landed in the container's working directory and was destroyed on the next docker compose up — silently, because sqlite just recreates it. A 12-hour cache that resets on every deploy isn't much of a cache.

Caught by checking the volume after deploying, not by reading the code.

imap-cache.db turned out to be worse: hardcoded to a relative path with no env override at all, so it has been discarded on every deploy since it was introduced — 3.7 MB of warm cache at the time of writing — no matter how the operator configured things.

Fix

Data file paths now default to the directory of CACHE_PATH. Landing on the persistent volume is what you get for free; putting a file somewhere else is what you opt into. Explicit env overrides still win, and IMAP_CACHE_PATH is now a real knob.

Covered by tests asserting that every sqlite path sits beside cache.db by default, that an override still wins, and that a relative CACHE_PATH keeps the rest alongside it.

308 tests, 307 passing, 1 skipped.