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

Function runtime_rendezvous_compare

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

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

Calls 1

cbm_daemon_hello_compareFunction · 0.85

Tested by

no test coverage detected