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

Function runtime_rendezvous_compare

src/daemon/runtime.c:466–495  ·  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

464 * validation without importing detailed ABI values into rendezvous. Fixed
465 * nonzero sentinels on both sides make only version/build ordering observable. */
466static cbm_daemon_hello_status_t runtime_rendezvous_compare(const char *active_version,
467 const char *active_build,
468 const char *requested_version,
469 const char *requested_build,
470 cbm_daemon_conflict_t *conflict_out) {
471 cbm_daemon_build_identity_t active = {
472 .semantic_version = active_version,
473 .build_fingerprint = active_build,
474 .protocol_abi = 1,
475 .store_abi = 1,
476 .feature_abi = 1,
477 };
478 cbm_daemon_build_identity_t requested = {
479 .semantic_version = requested_version,
480 .build_fingerprint = requested_build,
481 .protocol_abi = 1,
482 .store_abi = 1,
483 .feature_abi = 1,
484 };
485 cbm_daemon_hello_status_t status = cbm_daemon_hello_compare(&active, &requested, conflict_out);
486 if (status != CBM_DAEMON_HELLO_INVALID && status != CBM_DAEMON_HELLO_COMPATIBLE &&
487 status != CBM_DAEMON_HELLO_VERSION_CONFLICT && status != CBM_DAEMON_HELLO_BUILD_CONFLICT) {
488 if (conflict_out) {
489 memset(conflict_out, 0, sizeof(*conflict_out));
490 conflict_out->status = CBM_DAEMON_HELLO_INVALID;
491 }
492 return CBM_DAEMON_HELLO_INVALID;
493 }
494 return status;
495}
496
497bool cbm_daemon_runtime_hello_request_encode(uint8_t out[CBM_DAEMON_RENDEZVOUS_REQUEST_SIZE],
498 const cbm_daemon_build_identity_t *identity) {

Calls 1

cbm_daemon_hello_compareFunction · 0.85

Tested by

no test coverage detected