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(log): keep the library default at INFO; quiet is a process policy

Martin Vogelb79520302559
diff --git a/src/foundation/log.c b/src/foundation/log.c
index 73d4695c6..da8531aab 100644
--- a/src/foundation/log.c
+++ b/src/foundation/log.c
@@ -23,7 +23,7 @@
* Relaxed ordering is the right level: each is an independent scalar with no
* happens-before relationship to publish alongside it, and the log path must
* stay cheap enough that nobody is tempted to route around it. */
-static _Atomic CBMLogLevel g_log_level = CBM_LOG_WARN;
+static _Atomic CBMLogLevel g_log_level = CBM_LOG_INFO;
static _Atomic CBMLogFormat g_log_format = CBM_LOG_FORMAT_TEXT;
/* Cast, not bare NULL: NULL is ((void*)0) and the implicit void*-to-
* function-pointer conversion is not a compile-time constant, which
diff --git a/src/foundation/log.h b/src/foundation/log.h
index 9ed8532df..88e0d25fc 100644
--- a/src/foundation/log.h
+++ b/src/foundation/log.h
@@ -51,7 +51,7 @@ void cbm_log_init_from_env(void);
* lifecycle records and turn a healthy long index into a false hang. */
void cbm_log_init_for_process(bool quiet_by_default, bool require_info_liveness);
-/* Set minimum log level (raw process default: WARN; startup policy is role-aware). */
+/* Set minimum log level (library default: INFO; process startup policy is role-aware). */
void cbm_log_set_level(CBMLogLevel level);
/* Get current log level. */
diff --git a/src/main.c b/src/main.c
index 7345362e0..8a575c44f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -2559,10 +2559,12 @@ int main(int argc, char **argv) {
cbm_cli_set_version(CBM_VERSION);
cbm_profile_init();
- /* The raw logger starts WARN so allocator setup cannot pollute protocol or
- * CLI output before argv is classified. Detached daemons retain INFO
- * lifecycle records; physical workers require INFO because those records
- * are their supervisor's quiet-timeout heartbeat. */
+ /* The library default stays INFO (embedders and the test runner observe
+ * INFO records through the sink); the process policy is applied here, as
+ * early as argv can be classified: thin frontends go quiet, detached
+ * daemons retain INFO lifecycle records, and physical workers require
+ * INFO because those records are their supervisor's quiet-timeout
+ * heartbeat. */
bool quiet_log_default = role != CBM_DAEMON_PROCESS_DAEMON && role != CBM_DAEMON_PROCESS_WORKER;
cbm_log_init_for_process(quiet_log_default, role == CBM_DAEMON_PROCESS_WORKER);
if (role == CBM_DAEMON_PROCESS_LOCAL_CLI && main_cli_flag_present(argc, argv, "--quiet")) {
diff --git a/src/pipeline/pipeline.c b/src/pipeline/pipeline.c
index 39e5ce1ab..0ffb46c0b 100644
--- a/src/pipeline/pipeline.c
+++ b/src/pipeline/pipeline.c
@@ -1429,10 +1429,7 @@ static int try_incremental_or_delete_db(cbm_pipeline_t *p, cbm_file_info_t *file
cbm_store_close(fmt_store);
}
if (fmt != CBM_INDEX_FORMAT_VERSION) {
- /* WARN, like the other route deviations: a once-per-upgrade full
- * rebuild is what explains a long index and a cursor reset, so it must
- * stay visible under the quiet frontend default (#1104). */
- cbm_log_warn("pipeline.route", "path", "format_change_reindex", "stored_format",
+ cbm_log_info("pipeline.route", "path", "format_change_reindex", "stored_format",
itoa_buf(fmt));
p->format_migration = true;
int adr_rc = capture_existing_adr(p, db_path);