I flew a domestic AC metal flight earlier this year that redirected in-air to another city due to not being able to land at scheduled destination due to weather. The flight posted as cancelled even though I definitely flew it and even was put up in a hotel overnight by AC. After 2 failed attempts to resolve missing miles through AP - standard missing miles form first, then an email to credits@ (both were boilerplate BS responses), I submitted a customer service request on aircanada.com. Got a reply and miles credited within 48 hours with an apology.
Sometimes escalating using the Contact Us form on the AC website actually works.