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(pipeline): split the closure_plan log line over the itoa ring capacity

Martin Vogeld8fffd046001
diff --git a/src/pipeline/pipeline_incremental.c b/src/pipeline/pipeline_incremental.c
index 9c791f373..1b4da1b68 100644
--- a/src/pipeline/pipeline_incremental.c
+++ b/src/pipeline/pipeline_incremental.c
@@ -1735,9 +1735,13 @@ static int closure_try_plan(cbm_pipeline_t *p, cbm_store_t *store, const char *p
}
plan->n_changed = n_changed;
plan->n_dependents = dependent_count;
+ /* Two calls, not one: itoa_buf recycles a four-slot ring, so six
+ * conversions in a single call print two corrupted fields (observed:
+ * surface_changed reporting the elapsed-ms value at kernel scale). */
cbm_log_info("incremental.closure_plan", "changed", itoa_buf(n_changed), "surface_changed",
itoa_buf(n_surface_changed), "deleted", itoa_buf(n_deleted), "dependents",
- itoa_buf(dependent_count), "closure", itoa_buf(plan->count), "elapsed_ms",
+ itoa_buf(dependent_count));
+ cbm_log_info("incremental.closure_plan_done", "closure", itoa_buf(plan->count), "elapsed_ms",
itoa_buf((int)elapsed_ms(t)));
done: