How is the number of ring members signing a transaction selected? Is it selected randomly by the sender or is it defined by the Monero wallet?
Ring size is currently fixed to 11 (10 decoys).
It's defined at a protocol level, so no transaction will be accepted by the network from a wallet not sending transactions with ring size 11.
For reference, this was implemented in this commit.
Credit to @dEBRUYNE♦ and @user36303 for spurring me on to finding it in the code!