Repository navigation
Conversation
fetch_beacon_snapshot replaced a body that failed json() with {} before the
outer failure handling, so a 200 whose body could not be decoded left
ok=True, errors=[] and zero counts — indistinguishable from a healthy empty
network, and the sidebar showed OK. Propagate the decode failure into the
established partial-failure/error path (ok=False, endpoint error appended,
count 0) while keeping valid endpoints intact.
Fixes Scottcjn#959
Test: tests/test_dashboard.py (undecodable 200 -> degraded + valid endpoint
survives; valid-empty control still ok).
|
Welcome to beacon-skill! Thanks for your first pull request. Quick checklist:
Bounty tiers: Micro (1-10 RTC) | Standard (20-50) | Major (75-100) A maintainer will review your PR soon! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Changed
In
fetch_beacon_snapshot, a 200 response whose body failedresp.json()was replaced with{}before the outer failure handling ran, so_normalize_api_rows({})returned[]and the snapshot keptok=True, errors=[]with zero counts — indistinguishable from a genuinely healthy empty network. The sidebar then renderedstatus: OK.beacon_skill/dashboard.py: a JSON decode failure on a 200 now flows into the same partial-failure path as HTTP/transport errors (ok=False, an endpoint-specific error appended, that endpoint's count 0), while valid endpoints still contribute their rows.This is distinct from the inclusive-inbox polling and the already-fixed API base URL.
Testing / Evidence
tests/test_dashboard.py:Checklist
Fixes #959
AI assistance disclosure: this fix, its regression test, and the report above were prepared with AI assistance; all claims were reproduced locally against the pinned source before submission.
Wallet:
RTC472c6fdc74ed1d43b5c80349c32d5399e7dca92f