fix(clawdie): set COLIBRI_DB_PATH so the service does not crash-loop at boot #16
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/clawdie-db-path"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Without this, clawdie panics on start (exit 101, Permission denied on /var/db/colibri) and daemon(8) restart-loops at boot. Blocks FEATURE_CLAWDIE=YES builds.
clawdie.in exported COLIBRI_DAEMON_DATA_DIR/SOCKET/HOST but not COLIBRI_DB_PATH. On FreeBSD, default_db_path() then falls back to /var/db/colibri/colibri.sqlite — the full Colibri daemon's DB, owned colibri:colibri (0750). clawdie runs as the clawdie user, so Store::open() hits EACCES; DaemonState::new() panics (daemon.rs:35) and daemon(8) -r restart-loops forever. The service would never serve, despite a correct-looking rc.d. Fix: add a clawdie_db_path var (default ${clawdie_data_dir}/clawdie.sqlite) and export COLIBRI_DB_PATH from prestart, keeping clawdie's DB in its own clawdie-owned dir. No collision with the colibri daemon's DB. Reproduced + verified on Linux: - COLIBRI_DB_PATH unwritable → panic "failed to open coordination store … Permission denied", exit 101 - COLIBRI_DB_PATH in data dir → sqlite created, runs clean Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>