Skip to content

Local code intelligence for developers and AI agents. Connect code, docs and infrastructure in a persistent graph, with CBM Lens, MCP tools, agent integrations and change-aware test selection.

fix(store.c): improve root path integrity check with range-based validation

Georged83553a1ba51
diff --git a/src/store/store.c b/src/store/store.c
index 14f9e4353..14bf9528d 100644
--- a/src/store/store.c
+++ b/src/store/store.c
@@ -657,7 +657,8 @@ bool cbm_store_check_integrity(cbm_store_t *s) {
rc = sqlite3_prepare_v2(
s->db,
"SELECT root_path FROM projects WHERE root_path != '' "
- "AND substr(root_path, 1, 1) NOT IN ('/', 'A','B','C','D','E','F','G','H') LIMIT 1;",
+ "AND NOT (substr(root_path, 1, 1) = '/' "
+ "OR (substr(root_path, 1, 1) BETWEEN 'A' AND 'Z')) LIMIT 1;",
CBM_NOT_FOUND, &stmt, NULL);
if (rc == SQLITE_OK) {
if (sqlite3_step(stmt) == SQLITE_ROW) {