Short answer
A threshold or calibration rule should be treated like any other learned component. Fit it on the training window, lock it, and then judge it on the next forward slice without letting later information leak backward into the decision boundary.