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

Function cli_activation_request_quiescence

src/cli/cli.c:438–460  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

436}
437
438static cbm_version_cohort_quiesce_result_t cli_activation_request_quiescence(void *opaque) {
439 cli_activation_production_context_t *context = opaque;
440 if (!context || !context->endpoint) {
441 return CBM_VERSION_COHORT_QUIESCE_ERROR;
442 }
443
444 /* Never acquire startup while maintenance+admission are held EX. A
445 * bootstrap participant can already hold both its lifetime SH and startup
446 * while it discovers maintenance; waiting here would invert its teardown
447 * order and time out both sides. OP8 is safe to attempt directly. An
448 * absent endpoint or lost ACK is not mutation authority: the finite
449 * lifetime-EX wait below remains the authoritative drain proof. */
450 uint64_t control = cli_activation_deadline_after(CLI_ACTIVATION_CONTROL_TIMEOUT_MS);
451 context->control_deadline_ms = control < context->deadline_ms ? control : context->deadline_ms;
452 cbm_daemon_runtime_activation_result_t result = {0};
453 if (cbm_daemon_runtime_request_activation_shutdown(
454 context->endpoint, &context->identity, context->action,
455 cli_activation_remaining_timeout(context), &result)) {
456 cli_activation_merge_daemon_result(context, &result);
457 }
458 context->shutdown_requested = true;
459 return CBM_VERSION_COHORT_QUIESCE_REQUESTED;
460}
461
462static void cli_activation_release_cleanup_lease(cli_activation_production_context_t *context,
463 cbm_version_cohort_lease_t **lease_io) {

Callers

nothing calls this directly

Tested by

no test coverage detected