Skip to content

fix: identify malformed QWeather forecasts - #35

Merged
IceCodeNew merged 1 commit into
masterfrom
codex/qweather-error-context
Jul 16, 2026
Merged

fix: identify malformed QWeather forecasts#35
IceCodeNew merged 1 commit into
masterfrom
codex/qweather-error-context

Conversation

@IceCodeNew

Copy link
Copy Markdown
Owner

Summary

  • label QWeather daily-response validation as a distinct forecast parsing stage
  • report the exact missing required forecast field using a code-defined, safe contract error
  • reject non-object and non-string-keyed daily entries before field access
  • cover every required QWeather daily field with focused tests

Why

Missing QWeather daily fields previously surfaced only as KeyError, which identified neither the parsing stage nor the missing contract field and made provider failures difficult to diagnose.

Impact

Malformed QWeather forecasts now fail with actionable messages such as daily forecast missing required field: tempMax. Raw provider response values and arbitrary exception messages remain excluded from diagnostics.

Validation

  • prek run --all-files
  • uv run --with pytest --with pytest-cov -- pytest --cov --cov-branch --cov-report=xml
  • 490 tests passed; line coverage 99.70%, branch coverage 98.34%

@IceCodeNew
IceCodeNew requested a review from Copilot July 16, 2026 06:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@IceCodeNew, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 20 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2bf3b1c7-b42c-476a-b970-197191daaa39

📥 Commits

Reviewing files that changed from the base of the PR and between 8107b4d and 6463eff.

📒 Files selected for processing (2)
  • tests/test_weather_context.py
  • weather_briefing/weather_context.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/qweather-error-context

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.51%. Comparing base (8107b4d) to head (6463eff).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #35   +/-   ##
=======================================
  Coverage   99.51%   99.51%           
=======================================
  Files          39       39           
  Lines        5728     5748   +20     
  Branches      329      331    +2     
=======================================
+ Hits         5700     5720   +20     
  Misses         17       17           
  Partials       11       11           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@IceCodeNew
IceCodeNew marked this pull request as ready for review July 16, 2026 06:54
@IceCodeNew

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@IceCodeNew
IceCodeNew merged commit f047228 into master Jul 16, 2026
20 checks passed
@IceCodeNew
IceCodeNew deleted the codex/qweather-error-context branch July 16, 2026 07:42
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.

2 participants