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

Function runtime_rendezvous_compare

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

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

Calls 1

cbm_daemon_hello_compareFunction · 0.85

Tested by

no test coverage detected