The vowel is definitely thought to have been long in forms like amāsti.
In my comment, I was saying that the first vowel might be shortened in certain forms that show loss of intervocalic -v- without contraction of the originally separate syllables into one: -ie- and -ii- from -īve- and -īvi-. A vowel before another vowel in Latin was usually short, even when derived from an originally long vowel; that rule has exceptions, but it seems to have been applied in forms like this.
The main examples of the last vowel of the perfect stem being shortened before another vowel are verbs with -īvī perfects: either from the fourth conjugation, or in some cases from the third conjugation, such as appeto, which Wiktionary notes can have forms like appetiī. Leumann 1977 says that for verbs with -īvī perfects, short forms without v have been used since Plautus, and he says that as a rule long forms with -īvis- and -īver- correspond to short forms with -īs- and -ĭer-. Leumann mentions two possible examples of ī remaining unshortened in this context. Both examples are forms of the verb eo: īero in Plautus' Captivi 194 and īerant in Terence's Adelphoe 27. But certain editions of both of these texts give -īv- instead. (Lateinische Laut- und Formenlehre, §438.II.C, p. 600)
Some sources that I've read (e.g. Cser 2016) seem to indicate that for eo, the perfect forms without -v- are actually older, and the perfect forms with -īv- are an innovation, but I'm not sure why this would be thought to be the case.
Also, -īvī may be shortened to -iī, or -īvit to -iit (this might be less common than -iī? but there still seem to be a number of examples of -iit for -īvit in poetry), but the similar shortened form -iimus for īvimus is supposed to be quite rare. Cser 2016 says that for eo and compounds, the usual first-person plural perfect forms are īmus, abīmus, obīmus, etc., with a single long [iː] sound, and for all (other) fourth-conjugation verbs, the usual form is apparently -īvimus with -v- (p. 121).
Side note: The question Are there exceptions to the Latin stress rules? has an answer by Joel Derfner saying that even though the penult syllable is light, it is still stressed in forms like dormiī, audiī, veniī, but I'm not sure how we know this.