mirror of
https://github.com/block/buzz.git
synced 2026-11-08 10:21:46 +00:00
Investigation guards for the LP4 thread-unread badge flakiness. Each new test passes against current behavior to pin the exact trigger, labeled DEFECT (documents the bug) or DESIRED/control. Case 1 (badge at level N, not root): a deep reply whose intermediate ancestor is absent from the loaded timeline is keyed under that absent parent, so collectSubtreeReplies never reaches it from the root bucket. The root undercounts or shows no badge while the reply is genuinely unread. Case 3 (no badge anywhere): seedThreadBadgeFrontiers seeds via the effective thread marker max(thread_own, channel_marker); once channel-open mark-read folds the channel marker past the unread reply, the seed lands past it and computeThreadBadgeCounts yields zero. The pre-mark-read marker control keeps the badge. These are demonstration tests only; no fix code changes. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>