You’re welcome. It’s been interesting.
Probably, there’s some tiny thing you could do in SQL to remove that duplicate entry, but I personally wouldn’t do that lightly.
It’s also possible, according to the llm, to use the rails console to update the ten line ruby function and harden it. That, at least, ought to be something safe, because a restart would reload the real ruby from disk.