Pashinyan's dilemma: facing military defeat in Nagorno-Karabakh and needing a way to end the war but knowing his government might not survive the peace agreement he signed. It looks like Russia is stepping in to keep him in office. https://twitter.com/BabakTaghvaee1/status/1325959178469380098
Similar to the deal Russia cut with Georgian Pres. Shevardnadze in 1994. Georgia accepts Russian peacekeepers in Abkhazia and joins CSTO, and Russia helps put down Gamsakhurdia's insurgency. Certainly differences between the two cases but they're generally alike.
Russia likely reckons it will gain more control over Pashinyan, who had charted a more independent foreign policy before the war. It didn't work with Shevardnadze, but Armenia has fewer choices than Georgia.