Skip to content

fix(weather): prefer provider-native time metadata#618

Merged
Orinks merged 1 commit intodevfrom
codex-provider-api-native-fields
Apr 24, 2026
Merged

fix(weather): prefer provider-native time metadata#618
Orinks merged 1 commit intodevfrom
codex-provider-api-native-fields

Conversation

@Orinks
Copy link
Copy Markdown
Owner

@Orinks Orinks commented Apr 24, 2026

Summary

  • prefer Visual Crossing epoch fields for sun and moon times before reconstructing local datetimes
  • use Pirate Weather response timezone names consistently for current, hourly, and alert epoch timestamps
  • add regression coverage for provider-native timestamp behavior

Tests

  • uv run pytest -q -n 0 --tb=short tests/test_visual_crossing_client.py tests/test_pirate_weather_client.py
  • uv run ruff check src tests
  • uv run pyright

Notes

  • Not tested against live provider APIs.

Use Visual Crossing epoch fields for sun and moon times when available, and make Pirate Weather epoch parsing consistently honor the response timezone name instead of relying on fixed offsets. This reduces local reconstruction where the providers already return the necessary temporal metadata.

Constraint: Preserve existing AccessiWeather models and display contracts.

Rejected: Replace all unit conversions in this pass | models still store paired US/metric fields for display and fusion.

Confidence: high

Scope-risk: narrow

Directive: Prefer provider-supplied timestamps/timezones before adding local reconstruction helpers.

Tested: uv run pytest -q -n 0 --tb=short tests/test_visual_crossing_client.py tests/test_pirate_weather_client.py

Tested: uv run ruff check src tests

Tested: uv run pyright

Not-tested: Live provider API calls
@Orinks Orinks merged commit 95d61a1 into dev Apr 24, 2026
3 checks passed
@Orinks Orinks deleted the codex-provider-api-native-fields branch April 24, 2026 14:27
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.

1 participant