mirror of
https://github.com/logos-co/assembly.git
synced 2026-08-31 13:11:12 +00:00
Giscus can race and create two discussions with the same title for one page — #11 and #12 in this repo are exactly that, created 35 seconds apart, one holding both comments and the other empty. handleComments took the first title match from the search results. Search ordering is not guaranteed, so landing on the empty twin would render a page with no comments and no error to explain it. Today the ordering happens to favour the populated one, which is luck rather than a guarantee. Select by comment count instead, tie-breaking on the lower discussion number so repeated reads are stable. Requires totalCount in the query. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>