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

Function cli_activation_request_quiescence

src/cli/cli.c:508–530  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

506}
507
508static cbm_version_cohort_quiesce_result_t cli_activation_request_quiescence(void *opaque) {
509 cli_activation_production_context_t *context = opaque;
510 if (!context || !context->endpoint) {
511 return CBM_VERSION_COHORT_QUIESCE_ERROR;
512 }
513
514 /* Never acquire startup while maintenance+admission are held EX. A
515 * bootstrap participant can already hold both its lifetime SH and startup
516 * while it discovers maintenance; waiting here would invert its teardown
517 * order and time out both sides. OP8 is safe to attempt directly. An
518 * absent endpoint or lost ACK is not mutation authority: the finite
519 * lifetime-EX wait below remains the authoritative drain proof. */
520 uint64_t control = cli_activation_deadline_after(CLI_ACTIVATION_CONTROL_TIMEOUT_MS);
521 context->control_deadline_ms = control < context->deadline_ms ? control : context->deadline_ms;
522 cbm_daemon_runtime_activation_result_t result = {0};
523 if (cbm_daemon_runtime_request_activation_shutdown(
524 context->endpoint, &context->identity, context->action,
525 cli_activation_remaining_timeout(context), &result)) {
526 cli_activation_merge_daemon_result(context, &result);
527 }
528 context->shutdown_requested = true;
529 return CBM_VERSION_COHORT_QUIESCE_REQUESTED;
530}
531
532static void cli_activation_release_cleanup_lease(cli_activation_production_context_t *context,
533 cbm_version_cohort_lease_t **lease_io) {

Callers

nothing calls this directly

Tested by

no test coverage detected