Ex post facto
from after the fact
Where the phrase comes from
Article I, section 9 of the United States Constitution bars Congress from passing an ex post facto law. Section 10 bars the states. The protection, as the courts have read it, is aimed at criminal punishment imposed or increased after the act.
What lawyers are pointing at
You do not apply a heavier criminal rule to conduct that was lawful, or less serious, when it happened. Civil laws that look backward raise a different and narrower set of arguments. They are not all forbidden by the ex post facto clauses. The phrase is also not a ban on changing the rules for future conduct. A new term that applies from tomorrow to new orders is ordinary. A new penalty applied to last year's finished act is the thing the clause is about.
The same shape in code
Changing a scoring rule and then rescoring last month's already-closed jobs is ex post facto scoring. Publish the rule, apply it to jobs that start after the publish time, and leave the closed set under the rule that was in force. Rewriting history to improve a chart is the defect.
A concrete picture
A statute passed in March makes an act done in January a crime. That is the classic ex post facto problem. A statute passed in March that applies to acts done in April is not.