Dear Dominik,
I. Scheftelowitz (Zur Textkritik und Lautlehre des Ṛgveda; In: WZKM 21 (1907): 85–142) notes regarding the Kashmiri R̥gveda mss., that word-initial and -middle ś frequently turns to ṣ following ī̆, u, o, e, r̥, r. In contrast, ṣ frequently turns to ś following i, u, e, a, r, r̥, but never after ī, ū, o, ai, au (ibid. §24ff. p.123ff.). He also gives explicit information on kośa/koṣa, stating the latter to be a younger development found earliest in the Brāhmaṇas and then the MBh (p.127).
Best,
Raik Strunz
I always thought the first, with ś, was correct, and the second was just an orthographic error. Then I saw "-koṣa" on the title page of Ingalls's
Subhāṣitaratnakoṣa. He must have thought about this.
So which is "right" and why?
Best,
Dominik
PS I haven't even done elementary due diligence on this question, beyond MW.