Skip to content

Local code intelligence for developers and AI agents. Connect code, docs and infrastructure in a persistent graph, with CBM Lens, MCP tools, agent integrations and change-aware test selection.

fix(test): surface why a benchmark daemon did not start

Martin Vogelb9851700a431
diff --git a/scripts/benchmark-index.sh b/scripts/benchmark-index.sh
index 5ab4353bb..a8db36828 100755
--- a/scripts/benchmark-index.sh
+++ b/scripts/benchmark-index.sh
@@ -52,6 +52,7 @@ trap bench_finish EXIT
# it the failure below could name only its symptom.
BENCH_TMP=$(mktemp -d)
INDEX_ERR="$BENCH_TMP/index-stderr.log"
+DAEMON_START_LOG="$BENCH_TMP/daemon-start.log"
# Resolve symlinks
REPO=$(cd "$REPO" && pwd -P)
@@ -90,8 +91,14 @@ echo "$LOC" > "$OUT/loc.txt"
# total-time.txt is their sum — the figure comparable with earlier runs, which
# paid activation inside the index timing whenever no daemon was already warm.
SETUP_START_MS=$(bench_now_ms)
-if ! "$BINARY" daemon start >/dev/null 2>&1; then
+# Its output is kept for the failure path: the product names why a daemon did
+# not start, and that is the part an operator needs.
+if ! "$BINARY" daemon start >"$DAEMON_START_LOG" 2>&1; then
echo " $LANG: private daemon did not start" >&2
+ if [ -s "$DAEMON_START_LOG" ]; then
+ echo "--- daemon start output ---" >&2
+ cat "$DAEMON_START_LOG" >&2
+ fi
exit 1
fi
diff --git a/scripts/benchmark-search-graph.sh b/scripts/benchmark-search-graph.sh
index 6296d31fb..dad4f6ec4 100755
--- a/scripts/benchmark-search-graph.sh
+++ b/scripts/benchmark-search-graph.sh
@@ -26,9 +26,16 @@ BENCH_TMP=""
trap 'cbm_test_runtime_cleanup "$BINARY"; [ -z "$BENCH_TMP" ] || rm -rf -- "$BENCH_TMP"' EXIT
BENCH_TMP=$(mktemp -d)
INDEX_ERR="$BENCH_TMP/index-stderr.log"
+DAEMON_START_LOG="$BENCH_TMP/daemon-start.log"
-if ! "$BINARY" daemon start >/dev/null 2>&1; then
+# Its output is kept for the failure path: the product names why a daemon did
+# not start, and that is the part an operator needs.
+if ! "$BINARY" daemon start >"$DAEMON_START_LOG" 2>&1; then
echo "private daemon did not start" >&2
+ if [ -s "$DAEMON_START_LOG" ]; then
+ echo "--- daemon start output ---" >&2
+ cat "$DAEMON_START_LOG" >&2
+ fi
exit 1
fi
# One pre-escaped spelling of the path, the way the soak harness builds its