Skip to content

fix(desktop): keep impossible coordinates and radii off the lookup wire - #70

Merged
subzeroid merged 1 commit into
mainfrom
chore/lookup-followups
Sep 22, 2026
Merged

subzeroid merged 1 commit into
mainfrom
chore/lookup-followups

Conversation

@subzeroid

Copy link
Copy Markdown
Owner

Two follow-ups from the Lookup reviews.

  • Geo bounds move into the core. lookup.activity now treats a latitude outside ±90, a longitude outside ±180 or a radius beyond 20 100 km the way it already treats a non-finite number: the post's geotag is dropped before the analysis (so geotagged, places, centroid and radius_km stay about the same posts) and no radius is reported. The desktop host refuses such values, so before this the app would have turned a paid answer into a protocol error.
  • The 12-request worst case is pinned. MAX_PAGE_REQUESTS and the single retry were each proven separately; one test now multiplies them over a real HikerBackend and httpx.MockTransport: six pages, each failing once, twelve requests, analyzed == 6.

ruff, ruff format, mypy clean; pytest 2270 passed (the two test_symlink_loops_in_a_path_are_home_invalid cases fail the same way on a clean main under Python 3.13).

A latitude outside ±90, a longitude outside ±180 or a radius beyond half the Earth's circumference cannot describe a real place; the desktop host already refuses them, so the core now drops such a post's geotag and reports no radius instead of handing the app a value it will reject after the user has paid. Also pins the documented worst case of lookup.activity — six pages, each retried once, twelve requests — with one test.
@subzeroid
subzeroid merged commit c140466 into main Sep 22, 2026
5 checks passed
@subzeroid
subzeroid deleted the chore/lookup-followups branch September 22, 2026 08:25
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