mirror of
https://github.com/affaan-m/ECC.git
synced 2026-09-29 13:05:18 +02:00
The settled-token guard correctly ignored an older poll, but that poll still set settledPoll to its own token on the way out. With three polls settling in the order 3, 1, 2, the ignored poll 1 pulled the mark back to 1, so the even older poll 2 then passed the guard and replaced poll 3's counts, or marked a healthy view offline. The mark now only moves forward. A poll that settles late is itself stale, so it has no business moving the mark at all. Covered by a new runtime case that settles three polls out of order as 3, 1, 2, once with an older success and once with an older failure. The success case catches the counts regressing, the failure case catches a healthy view being marked offline. Reverting the fix trips each of them independently, and the unmutated file passes all 21. Co-authored-by: CommandCodeBot <noreply@commandcode.ai>