Unexpected error in Discourse Plugin CI

Not 100% sure, but I think it happens if you use ActiveRecord through things like User, etc openly, e.g. not in on() or in a job but just in after_initialize.

I encountered this too not long ago… IIRC I had to ask AI for this; I moved the code to a scheduled job and it was fine after that.