The issue (which is solved)
I recently migrated from Vanilla to Flarum using the migration script someone kindly wrote.
It's all working great with 2.0 rc4, except for one strange thing: all discussions were visible to logged-in users, but some discussions were not visible when they were logged out (and thus wouldn't be visible to members of the public who don't have accounts).
After comparing the attributes in my SQL database, I noticed that the invisible discussions had 0 in the comment_count column. Setting it to 1 caused the discussion to become visible to logged-out users! I ran a command to find all the discussions with 0 comment_count and set them to 1, and there were 190 of them!
Strangely, there was no visible difference in Flarum between discussions with 0 comment_count and those with 1 -- they all had no posts. I'm assuming this is an artifact of migrating from Vanilla, but it would be good to have something in place to handle this.
Cheers!
Edit: removed SQL command and corrected typos in my post -- I said post_count but meant comment_count.