Skip to content

The cross-harness, self-improving memory layer for AI agents. Join our community: https://discord.com/invite/zdNChS2fBu

Install Falcon Vector before hook repair

shukieshah53bb80849718
diff --git a/packaging/macos/jamf/scripts/repair-falcon-claude-hooks-vector.sh b/packaging/macos/jamf/scripts/repair-falcon-claude-hooks-vector.sh
index 5010d6ef..05b285e2 100755
--- a/packaging/macos/jamf/scripts/repair-falcon-claude-hooks-vector.sh
+++ b/packaging/macos/jamf/scripts/repair-falcon-claude-hooks-vector.sh
@@ -22,8 +22,8 @@ if [ ! -x "$FORWARDER_SCRIPT" ]; then
exit 1
fi
-echo "Repairing endpoint and Claude hooks without collector-based Falcon forwarding..."
-"$REPAIR_SCRIPT" _ _ _ "" "" "" "" "$OTLP_GRPC_PORT" "$OTLP_HTTP_PORT" ""
-
echo "Installing Falcon Vector runtime-log forwarder..."
"$FORWARDER_SCRIPT" _ _ _ "$FALCON_HEC_ENDPOINT" "$FALCON_HEC_TOKEN" "$FALCON_SOURCE" "$FALCON_SOURCETYPE" "$FALCON_INDEX"
+
+echo "Repairing endpoint and Claude hooks without collector-based Falcon forwarding..."
+"$REPAIR_SCRIPT" _ _ _ "" "" "" "" "$OTLP_GRPC_PORT" "$OTLP_HTTP_PORT" ""
diff --git a/packaging/macos/test-endpoint-scripts.sh b/packaging/macos/test-endpoint-scripts.sh
index 20f0055a..1bd33c03 100644
--- a/packaging/macos/test-endpoint-scripts.sh
+++ b/packaging/macos/test-endpoint-scripts.sh
@@ -328,3 +328,30 @@ case "$FALCON_VECTOR_STATE" in
exit 1
;;
esac
+
+FAKE_REPAIR="$TMP_DIR/fake-repair-fails.sh"
+FAKE_FORWARDER="$TMP_DIR/fake-forwarder-runs.sh"
+FORWARDER_MARKER="$TMP_DIR/forwarder-ran"
+cat >"$FAKE_REPAIR" <<'STUB'
+#!/bin/sh
+exit 7
+STUB
+cat >"$FAKE_FORWARDER" <<'STUB'
+#!/bin/sh
+printf '%s\n' "$*" > "$FORWARDER_MARKER"
+STUB
+chmod +x "$FAKE_REPAIR" "$FAKE_FORWARDER"
+
+BEACON_REPAIR_HOOKS_SCRIPT="$FAKE_REPAIR" \
+BEACON_FALCON_VECTOR_SCRIPT="$FAKE_FORWARDER" \
+BEACON_FALCON_HEC_ENDPOINT="https://falcon.example/services/collector" \
+BEACON_FALCON_HEC_TOKEN="falcon-token" \
+FORWARDER_MARKER="$FORWARDER_MARKER" \
+"$ROOT_DIR/packaging/macos/jamf/scripts/repair-falcon-claude-hooks-vector.sh" >/dev/null 2>&1 && {
+ echo "combined Falcon Vector repair should return the failing repair status" >&2
+ exit 1
+}
+if [ ! -f "$FORWARDER_MARKER" ]; then
+ echo "combined Falcon Vector repair should run forwarder before failing repair" >&2
+ exit 1
+fi