mirror of
https://github.com/affaan-m/ECC.git
synced 2026-10-01 05:55:18 +02:00
Two ways the outage state could mislead an operator reading either channel. The failure branch cleared the live region but left the canvas aria-label holding the counts from the last successful poll, so landing on the canvas during an outage reported stale counts. It now sets the same unavailable wording on the canvas. apply() already restores the count label on the next valid poll, and there is now a test for that. Polls run every 5000ms and are not sequenced, so a slow older request can settle after a newer one has succeeded. Its catch block then announced an outage while the canvas showed the newer counts, and the two channels contradicted each other. Each poll now takes a monotonic token and only the newest one may touch the view, so a superseded failure is dropped. The runtime test can park a response, which lets it settle an older failure after a newer success. New assertions cover the canvas label after an outage, the restored label after recovery, and the superseded-failure case. Removing the canvas reset, the token guard, or the restore in apply() each fail an assertion, and the unmutated view passes all of them. Co-authored-by: CommandCodeBot <noreply@commandcode.ai>