Skip to content

Fix rolling accessory location history fetching#252

Open
hackermengzhi wants to merge 1 commit into
malmeloo:mainfrom
hackermengzhi:fix/full-rolling-location-history
Open

Fix rolling accessory location history fetching#252
hackermengzhi wants to merge 1 commit into
malmeloo:mainfrom
hackermengzhi:fix/full-rolling-location-history

Conversation

@hackermengzhi

Copy link
Copy Markdown

Summary

  • make fetch_location_history() fetch the full rolling key history by default
  • keep fetch_location() on the faster latest-only path explicitly
  • add regression tests for default full-history behavior and the internal latest-only override

Why

LocationReportsFetcher.fetch_location_history() accepted a RollingKeyPairSource, but internally always passed only_latest=True to _fetch_accessory_reports(). That meant callers asking for history could silently get only the newest report batch for rolling accessories.

This keeps the public history method aligned with its name while preserving current-location performance through fetch_location().

Tests

  • .venv/bin/python -m pytest tests/test_reports.py tests/test_keygen.py
  • .venv/bin/python -m ruff check findmy/reports/account.py findmy/reports/reports.py tests/test_reports.py

@hackermengzhi hackermengzhi force-pushed the fix/full-rolling-location-history branch from 0408b0f to f0e31e1 Compare June 24, 2026 22:48
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