R. Ishtori seems to be the earliest source who explicitly ascribed the mevo to R. Shmuel HaNagid. A later but important source, R. Yosef Sambari (Divre Yosef pp. 403), ascribed the mevo to the Nagid of Egypt, ca. 1140, R. Shmuel b. Hananya. However, the notion that the mevo was authored by R. Shmuel b. Hofni surfaced in the light of the genizah documents.
Now for a “(thorough) discussion on the matter”...
From various sources in medieval literature we are informed of a treatise (specifically, a mevo) on the Talmud authored by R. Shmuel b. Hofni. In fact, some sources (e.g. R. Yona ibn Janah in his Sefer Ha’sharashim, p. 114) quote selections from it. In 1880 Avraham Harkavy published a monograph on RS b. Hofni (subtitle, ‘Zichron HaGaon Rav Shmuel ben Hofni U’sfarav’ p. 4) and proposed that the aforementioned work served as a precursor for RS HaNagid’s mevo (Harkavy referenced ShIR who surmised the same) but no certain conclusions could’ve been drawn as long as the original treatise was lost and internal evidence unable to be ascertained. Then came the discovery of the Cairo Genizah trove.
One of the documents identified in the genizah was this treatise written in Arabic. After examining its content, Arthur Cowley published an extract of it (Zichron LeAvraham Eliyahu pp. 161) and, based on the similarity of the material between the two mevo’ot, determined that it was none other than the source for the later compiled ‘mevo of R. Shmuel HaNagid’, the latter being an abridged Hebrew translation of the former. Later on, Mordechai Margaliot published ‘Sefer Hilchot HaNagid’ and agreed (Intro., 68ff.) that RS b. Hofni’s work was the archetype but disagreed with the idea that it was RS HaNagid who had compile the later mevo and instead advanced Sambari’s claim, ascribing authorship to RS b. Hananya, arguing that provenance to the contrary is unreliable and supposed stylistic and linguistic inconsistencies also prove otherwise. Shraga Abramson (Sinai, vol. C pp. 22) agreed that the mevo commonly known as being from R. Shmuel HaNagid is only but a very abridged-translated version and “certainly improper to ascribe [such a work] to any important rabbi” (“וזה ודאי אינו ראוי לייחס לשום חכם חשוב”), although he disagreed with Margaliot as being from R. Shmuel b. Hananya and dismissed Margaliot’s proofs as “shikul ha’daat” (“his own discretion”; i.e. short of critical evidence) leaving the question of authorship unsolved and apparently only considered that the original treatise was by R. Shmuel b. Hofni.