If the title of the topic is an exact match of the title that was set when the topic was initially published, new review topics should be prevented from being published by this line:
return if Topic.where(user: Discourse.system_user, title: title).exists?
Unless the cause of the issue is that the title isn’t an exact match, maybe the issue is related to the topic being published in French. It would be great to know what is getting set as title here when the job is run:
title = I18n.t("yearly_review.topic_title", year: review_year)
I’m wondering if it’s trying to match the English title against the French title. Is French the default locale on your site?
Edit: if the topic is getting published with a French title, then title in the code above must be getting set in French. So that’s unlikely to be the cause of the issue.