claude-memory/graph/fixes/fix-scorebug-tracker-read-failure-tolerance-prevents-false-c-096020.md

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
major-domo
scorebug
live-scorebug-tracker
resilience
google-sheets
discord
fix
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:

  1. Active scorebugs present → show channel (normal case)
  2. Read failures with not all games confirmed final → preserve last known state, log warning (resilience case)
  3. 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."