fix(clawdie): set COLIBRI_DB_PATH so the service does not crash-loop at boot #16

Merged
clawdie merged 1 commit from fix/clawdie-db-path into main 2026-06-02 17:58:27 +02:00

1 commit

Author SHA1 Message Date
Sam & Claude
98b232cc0a fix(clawdie): set COLIBRI_DB_PATH so the service doesn't crash-loop at boot (Sam & Claude)
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>
2026-06-02 14:56:41 +02:00