MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / runtime_rendezvous_compare

Function runtime_rendezvous_compare

src/daemon/runtime.c:351–380  ·  view source on GitHub ↗

Reuse the service layer's canonical printable-version and lowercase-SHA256 * validation without importing detailed ABI values into rendezvous. Fixed * nonzero sentinels on both sides make only version/build ordering observable. */

Source from the content-addressed store, hash-verified

349 * validation without importing detailed ABI values into rendezvous. Fixed
350 * nonzero sentinels on both sides make only version/build ordering observable. */
351static cbm_daemon_hello_status_t runtime_rendezvous_compare(const char *active_version,
352 const char *active_build,
353 const char *requested_version,
354 const char *requested_build,
355 cbm_daemon_conflict_t *conflict_out) {
356 cbm_daemon_build_identity_t active = {
357 .semantic_version = active_version,
358 .build_fingerprint = active_build,
359 .protocol_abi = 1,
360 .store_abi = 1,
361 .feature_abi = 1,
362 };
363 cbm_daemon_build_identity_t requested = {
364 .semantic_version = requested_version,
365 .build_fingerprint = requested_build,
366 .protocol_abi = 1,
367 .store_abi = 1,
368 .feature_abi = 1,
369 };
370 cbm_daemon_hello_status_t status = cbm_daemon_hello_compare(&active, &requested, conflict_out);
371 if (status != CBM_DAEMON_HELLO_INVALID && status != CBM_DAEMON_HELLO_COMPATIBLE &&
372 status != CBM_DAEMON_HELLO_VERSION_CONFLICT && status != CBM_DAEMON_HELLO_BUILD_CONFLICT) {
373 if (conflict_out) {
374 memset(conflict_out, 0, sizeof(*conflict_out));
375 conflict_out->status = CBM_DAEMON_HELLO_INVALID;
376 }
377 return CBM_DAEMON_HELLO_INVALID;
378 }
379 return status;
380}
381
382bool cbm_daemon_runtime_hello_request_encode(uint8_t out[CBM_DAEMON_RENDEZVOUS_REQUEST_SIZE],
383 const cbm_daemon_build_identity_t *identity) {

Calls 1

cbm_daemon_hello_compareFunction · 0.85

Tested by

no test coverage detected