ספר המדות, Tidings / Part I Tidings / Part I · ג
Sefer HaMiddot 454
ג. הָעוֹשֶׂה מִצְוָה כְּמַאֲמָרָהּ – אֵין מְבַשְּׂרִין אוֹתוֹ בְּשֹוֹרוֹת רָעוֹת, וְהַקָּדוֹשׁ־בָּרוּךְ־הוּא גּוֹזֵר וְהוּא מְבַטֵּל.
3. One who fulfills a commandment 'as it was said' (t.n. There are different interpretations as to what this demands. The Maharsha explains that it means -- for the sake of Heaven. The Maharal explains it means -- in completion, exactly as it was commanded), evil tidings do not come to him, and the Holy One, Blessed be He, decrees, and he annuls.