Skip to content

Commit 4cbecb6

Browse files
committed
fix(cli): name the rule that refused CLI coordination, not just the stage
'secure CLI coordination could not be created (endpoint)' is what four separate reporters were left with in DeusData#1533 and DeusData#1574. On those machines every mode fails, config list included, so the product cannot be reconfigured out of the failure, and CBM_LOG_LEVEL=debug adds nothing. One reporter had to build an instrumented binary to discover the cause was a single ACE on an ancestor of %LOCALAPPDATA%. cbm_daemon_ipc_validation_detail() already holds exactly what they needed - the refusing directory, the offending SID and the right it granted - and the daemon-endpoint path has printed it since DeusData#1582. This path never did, so the same refusal was actionable through one entry point and opaque through the other. Quoting one of them: printing the refusing ancestor and the offending SID in the default error would turn a multi-hour investigation into a one-line fix. Fixes nothing by itself; it is the difference between a report we can act on and a report that costs a reporter an evening. Builds clean. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
1 parent c0bd4bb commit 4cbecb6

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

‎src/main.c‎

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2482,9 +2482,22 @@ int main(int argc, char **argv) {
24822482
coordination_failure = main_build_identity_status_name(local_identity_status);
24832483
}
24842484
if (coordination_failure) {
2485+
/* Name the rule that refused, not just the stage that failed.
2486+
*
2487+
* "(endpoint)" alone is what four separate reporters in #1533 and
2488+
* #1574 were left with: every mode fails, `config list` included,
2489+
* so the product cannot even be reconfigured out of it, and
2490+
* CBM_LOG_LEVEL=debug adds nothing. One of them had to build an
2491+
* instrumented binary to discover that a single ACE on an ancestor
2492+
* of %LOCALAPPDATA% was the cause. The validation detail already
2493+
* holds that — it names the directory, the offending SID and the
2494+
* right it granted — and the daemon-endpoint path a few hundred
2495+
* lines below has printed it since #1582. This path did not. */
2496+
const char *why = cbm_daemon_ipc_validation_detail();
24852497
(void)fprintf(
2486-
stderr, "codebase-memory-mcp: secure CLI coordination could not be created (%s)\n",
2487-
coordination_failure);
2498+
stderr,
2499+
"codebase-memory-mcp: secure CLI coordination could not be created (%s)%s%s\n",
2500+
coordination_failure, (why && why[0]) ? ": " : "", (why && why[0]) ? why : "");
24882501
goto local_cli_cleanup;
24892502
}
24902503
cbm_http_server_set_binary_path(local_executable);

0 commit comments

Comments
 (0)