1.4 KiB
1.4 KiB
| id | type | title | tags | importance | confidence | created | updated | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0960205f-85d1-447c-9921-57fec764e1d5 | fix | Fix: Scorebug tracker read-failure tolerance prevents false channel hiding |
|
0.7 | 0.8 | 2026-02-20T20:30:07.053777+00:00 | 2026-02-20T20:30:07.053777+00:00 |
Scorebug Tracker: Read-Failure Tolerance
Project
major-domo / discord-app-v2
File
tasks/live_scorebug_tracker.py — _update_scorebugs() method
Problem
The method hid #live-sba-scores whenever active_scorebugs was empty after the read loop. It did not distinguish between:
- All games confirmed FINAL (safe to hide)
- All sheet reads failed due to transient errors (incorrect to hide)
A single Google Sheets timeout would cause the live scores channel to disappear mid-game.
Fix
Added read_failures and confirmed_final counters with three-branch logic:
- Active scorebugs present → show channel (normal case)
- Read failures with not all games confirmed final → preserve last known state, log warning (resilience case)
- All confirmed final → safe to hide channel (expected end-of-game case)
Key Takeaway
Channel visibility decisions that depend on external I/O (Google Sheets) must account for transient read failures before taking destructive action (hiding channels). Always distinguish "no data" from "failed to fetch data."