Skip to content

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

Merged
DeusData merged 1 commit into
mainfrom
diag/cohort-unheld-claim
Aug 7, 2026
Merged

diag(daemon): name the cohort path that admits a mismatched build#1474
DeusData merged 1 commit into
mainfrom
diag/cohort-unheld-claim

Conversation

@DeusData

@DeusData DeusData commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Observability only — no admission behaviour changes.

Why

A forced client/daemon build mismatch raises a cohort conflict locally but is admitted on every CI leg, which is why the #1388 conflict regression could never bind there (it is now a documented local-only test).

Reading cbm_version_cohort_acquire explains how that is possible: identity comparison happens only in the BUSY branch — when another process already holds the cohort lifetime lock. When the EX acquire succeeds (no live holder), the participant claims the cohort and no comparison runs at all, so a mismatched build joins.

That is correct when nothing is running. What was missing is the ability to tell the two situations apart afterwards: "was the lifetime lock held?" is exactly what separates the local run from the CI run, and no log line answered it.

What this adds

One version_cohort.claimed_unheld info line on the claim path, carrying the build fingerprint.

The next CI run that exercises this will say which branch it took, which decides whether the CI daemon simply is not holding the lease (an environment fact, and the test stays local-only) or the lease is released early (a real bug worth its own fix). Shipping a behaviour change to a security-relevant admission path on a guess would be the wrong move.

Verification

version_cohort + daemon_version: 24 passed. lint-ci clean.

A forced client/daemon build mismatch raises a cohort conflict locally but is
ADMITTED on every CI leg, which made the #1388 conflict regression untestable
there. Reading the code explains how that is possible: identity comparison
happens ONLY in the BUSY branch, i.e. when another process already holds the
cohort lifetime lock. When the EX acquire succeeds - no live holder - the
participant claims the cohort and NO comparison runs at all, so a mismatched
build joins.

That is correct behaviour when nothing is running. What is missing is the
ability to tell the two apart after the fact: "was the lifetime lock held?" is
exactly the question that separates the local run from the CI run, and no log
line answered it.

This is deliberately observability only - no admission behaviour changes. The
next CI run that exercises the path will say which branch it took, and that
decides whether the CI daemon simply is not holding the lease (an environment
fact) or the lease is being released early (a real bug).

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
@DeusData
DeusData enabled auto-merge August 6, 2026 14:51
@DeusData
DeusData merged commit 6ca9ea8 into main Aug 7, 2026
57 of 63 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant