Ex post facto legislation?
That's correct. Flatly unconstitutional. However, the Congress has enacted ex post facto legislation once before, under Clinton, and nobody even challenged it. It was a retroactive tax increase.
We left the rule of law in this country a long time ago.