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.

diag(daemon): name the cohort path that admits a mismatched build

Martin Vogel455e9e5b624a
diff --git a/src/daemon/version_cohort.c b/src/daemon/version_cohort.c
index aaa521ff1..f642001db 100644
--- a/src/daemon/version_cohort.c
+++ b/src/daemon/version_cohort.c
@@ -457,6 +457,14 @@ cbm_version_cohort_status_t cbm_version_cohort_acquire(cbm_version_cohort_manage
CBM_PRIVATE_FILE_LOCK_EX, &lease->lifetime);
cbm_version_cohort_status_t status = version_cohort_status_from_lock(lock_status);
if (status == CBM_VERSION_COHORT_OK) {
+ /* No live holder: this participant CLAIMS the cohort and NO identity
+ * comparison happens — a mismatched build is admitted, not refused.
+ * That is correct when nothing is running, and it is the only path by
+ * which a mismatched client can join. Name it: "was the lifetime lock
+ * held?" is exactly what separates a local run (conflict raised) from
+ * a CI run (client admitted), and it was not observable in any log. */
+ cbm_log_info("version_cohort.claimed_unheld", "build",
+ identity->build_fingerprint ? identity->build_fingerprint : "<null>");
status = version_cohort_claim_new(lease, identity, deadline_ms);
} else if (status == CBM_VERSION_COHORT_BUSY) {
lock_status =