The standard text for a siyum on a masechta, as printed in Gemaras, is
הדרן עֲלָךְ מסכת פלונית
מסכת seems to be feminine, so shouldn't it be עֲלִיךְ, with similar changes for the other words?
As DoubleAA points out, after each perek there's a one line הדרן עֲלָךְ פרק פלוני, and after the last one it's הדרן עֲלָךְ פרק פלוני וסליקא לה מסכת פלונית, which is grammatically as I'd expect it. I'm talking about the longer text that comes after that in many printings (e.g. bottom of this page), which people follow at most siyumim that I've been to.