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

Function cli_activation_scope_unconfirmed

src/cli/cli.c:587–611  ·  view source on GitHub ↗

Whose sessions does this activation have to stop? The rendezvous directory * is per OS account (service.h), so the host daemon of another HOME / * CBM_CACHE_DIR meets this activation at the very same endpoint; only the * cache fingerprint in the cohort identity separates the namespaces. An * `install` into a sandbox HOME used to drain the host daemon and every MCP * client behind it although

Source from the content-addressed store, hash-verified

585 * daemon. A busy group or an unreadable active cache used to fall through to
586 * "ours" and stop every session behind that daemon. */
587static cli_activation_scope_t cli_activation_scope_unconfirmed(
588 cli_activation_production_context_t *context, const char *scope, const char *reason) {
589 const char *action = cli_activation_action_text(context->action);
590 (void)snprintf(context->scope_detail, sizeof(context->scope_detail),
591 "active cohort ownership unconfirmed (%s); scope=%s; nothing stopped", reason,
592 scope);
593 cli_activation_log_guard_decision(context, "unconfirmed_cohort", NULL);
594 /* Name the daemon being left: a read-only status probe (no cohort, no
595 * HELLO, no admission) that works across build skew. */
596 cbm_daemon_runtime_status_t daemon;
597 if (cbm_daemon_runtime_request_status(context->endpoint, &context->identity,
598 CLI_ACTIVATION_CONTROL_TIMEOUT_MS, &daemon)) {
599 printf("Leaving the running CBM daemon untouched (pid %lu, version %s): this %s could "
600 "not confirm that it serves the cache this %s targets (%s).\n",
601 (unsigned long)daemon.daemon_pid, daemon.semantic_version, action, action, reason);
602 } else {
603 printf("Leaving active CBM sessions untouched: this %s could not confirm that they "
604 "serve the cache it targets (%s).\n",
605 action, reason);
606 }
607 printf("If it is yours, close its CBM sessions and run `codebase-memory-mcp daemon stop` "
608 "to stop it yourself.\n");
609 (void)fflush(stdout);
610 return CLI_ACTIVATION_SCOPE_UNCONFIRMED;
611}
612
613static cli_activation_scope_t cli_activation_resolve_scope(
614 cli_activation_production_context_t *context) {

Callers 1

Tested by

no test coverage detected