The law of karma is not so much about reward and punishment but about learning and growth, through action and consequences. In one word it is an evolutionary mechanism rather than a tribunal of Justice which is a human mistranslation of a divine Law.
The Divine does not punish or reward but simply leads us forward by putting a pressure from within and Above, a silent pressure of His Will. If we align with the Will we go faster, if not we slow down, if we actively resist we are pushed strongly as if through blows.
The soul accepts all circumstances with joy and progresses through everything, including what we call as sorrow and misfortune and vice versa, often more through pain than through pleasure. Outer events are not the real issue though the ego takes so much more interest in it.
The real game goes on within and there we discover not the stern hand of a Judge but the loving embrace of the Divine Mother who carries us despite everything. This Love and Grace are the deeper truths that override and even cancel the law of karma, thereby shortening the Path. This is the secret that Sri Aurobindo reveals to us.