Debug: log per-device data_usage response shape#128
Conversation
Temporary instrumentation to diagnose why per-device HourlyBandwidth records aren't being stored despite the double-unwrap fix. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Code Review — PR #128: Debug: log per-device data_usage response shapeThis PR adds six lines of diagnostic logging to Finding 1 — Wrong log level for temporary diagnostic output (most impactful)
Both new The PR description explicitly calls these temporary debug logging, yet # Before
logger.info(
f"Device data_usage response: type={type(result).__name__}, "
...
)
...
logger.info(f"Extracted devices_list: len={len(devices_list)}")
# After
logger.debug(
f"Device data_usage response: type={type(result).__name__}, "
...
)
...
logger.debug(f"Extracted devices_list: len={len(devices_list)}")Finding 2 — No removal mechanism for explicitly temporary code
The PR description says "temporary" but nothing in the code enforces removal — no Finding 3 — Minor: unnecessary
|
Summary
Authored by Merlin 🪄