You don't give enough information to say whether or not your employment at Y violated the non-compete. The fact that you have a different job title might or might not make any difference, depending on the terms of the non-compete contract. If that contract simply said, "Employee shall not work at Y", then having a different job title would make no difference. If it said, "Shall not work at Y as a welder" or whatever job description, and you got a job at Y as a truck driver, then you would not be violating the contract. If you got a job there supervising welders but didn't do any welding yourself, you'd probably be okay, but it might be pushing it.
But let's assume for the sake of argument that your employment at Y DOES violate the non-compete. If you worked for Company Y during the period that the non-compete was in force, then Company X could still sue you for violating the agreement for the time that it was in force. They couldn't sue you for working for company Y after the agreement expired, but the fact that the agreement has now expired doesn't get you off the hook for violating the contract while it was in force.
If contract law worked that way, people who want to break a contract could often get away with it by just stalling until the contract expired. Like, "Yes, we guaranteed that our work would be completed to your satisfaction, but we decided that job was boring so we quit working on it. As we're no longer working on it, the contract term is over, and we're just keeping your money even though we never finished the work."