Skip to content

fix: solar_conditions + band_outlook return nulls (SWPC JSON format drift)#4

Open
KI7MT wants to merge 1 commit into
mainfrom
fix/solar-conditions-parsing
Open

fix: solar_conditions + band_outlook return nulls (SWPC JSON format drift)#4
KI7MT wants to merge 1 commit into
mainfrom
fix/solar-conditions-parsing

Conversation

@KI7MT

@KI7MT KI7MT commented Jun 15, 2026

Copy link
Copy Markdown
Member

Summary

Fixes solar__solar_conditions (and solar_band_outlook) returning nulls for SFI/Kp after NOAA SWPC updated the JSON response shapes on two endpoints used only by these tools.

  • solar_conditions now robustly parses current list-of-dicts formats (and legacy for compat).
  • Scales normalized for consistency ("0" → "R0"/etc.).
  • Mocks updated; CHANGELOG entry added.
  • Verified live: real data + band outlook now returned correctly.

See issue #3 for full diagnosis, evidence (curl repros), root cause in client.py parsing, and verification steps.

Changes

  • src/solar_mcp/client.py: updated conditions() parsing + mocks.
  • CHANGELOG.md: Unreleased "Fixed" section.

Testing

  • Unit (mock): exercises new branches.
  • Live: client.conditions() now succeeds with real SFI/Kp (e.g. 128 / 0.67) + band_outlook.
  • Other solar tools unaffected (different endpoints).

Fleet impact

  • Affects any deployment using solar-mcp for conditions (observability plane, HF briefs, propagation tools).
  • No change to other tools or MCP interface.
  • Will resolve on next release + re-deploy (v0.2.1+).

Closes #3

Next

  • Run pytest tests/test_live.py --live post-merge.
  • Tag/release v0.2.2 (or patch) to bump Registry.
  • Monitor SWPC endpoint stability (add to CI if needed?).

This aligns with qso-graph MCP security/release workflow (feature branch, tracked in Issues, two-person review).

Co-Authored-By: Grok (xAI)

…nt parsing

- solar__solar_conditions (and solar_band_outlook) returned nulls for sfi/kp because /summary/10cm-flux.json and /noaa-planetary-k-index.json now return list-of-dicts (not legacy dict/list-of-lists).
- Added robust parsing for current + legacy formats.
- Normalize scales '0' -> 'R0' etc. for consistency with tests/docs.
- Updated mocks.
- Added entry to Unreleased in CHANGELOG.

This was diagnosed from MCP tool calls returning nulls while other solar tools succeeded, confirmed by direct curl of endpoints, and live verification post-fix.

Closes: will link to issue/PR.

Co-Authored-By: Grok (xAI) <grok@x.ai>
@KI7MT KI7MT self-assigned this Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

solar__solar_conditions (and band_outlook) return nulls for SFI/Kp due to SWPC endpoint format changes

1 participant