Thanks for your question.
Non-compete agreements are generally enforceable if limited in time and geographic area. They are generally enforced by courts as employees receive certain knowledge and secrets of trade in their previous employments.
Your question is in relation to its timeline. If the the non-compete clause was in your initial employment contract, it would start from the end of the contract/ termination of your employee role.
Considering you resumed employment for a 4 month period, generally speaking the old contract terms would prevail, even if there was nothing affirmatively agreed or perhaps even signed.
It should start from the end of the 4 month period, since you resumed employment again, and the terms of the previous contract will prevail. When no new contract is signed, the law is that the old contract terms will prevail.
This is perhaps not the answer you were looking for. Remember my answer is no substitute for consulting a local lawyer with all the facts on hand and a copy of the contract with a thorough discussion.
Please remember to rate my opinion positively before exiting this chat.