Skip to content

fix(client): send the feed bbox latitude first - #6

Merged
kryp2 merged 2 commits into
masterfrom
fix/bbox-latitude-first-2026-09-30
Sep 30, 2026
Merged

kryp2 merged 2 commits into
masterfrom
fix/bbox-latitude-first-2026-09-30

Conversation

@kryp2

@kryp2 kryp2 commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

What

get_feed(bbox=...) joined the box as given, (west, south, east, north), but /v1/feed reads minLat,minLng,maxLat,maxLng. The overlay matched latitudes against the longitudes, so the box selected the wrong area (usually none). Same bug and fix as the TypeScript SDK (overlay-social/sdk #14).

  • The argument keeps its documented shape, (west, south, east, north); it is now sent as south,west,north,east.
  • A bbox that is not four values raises ValueError before any request, instead of being forwarded as is.
  • near still wins over bbox; its wire format is unchanged.
  • New offline tests in tests/test_feed_query.py (httpx mock transport, sync and async): wire order, list and integer input, near over bbox, no bbox without a geo filter, wrong-shape rejection. Six of them fail without the fix.
  • README states the argument order; CHANGELOG has an Unreleased "Fixed" entry.

A second commit replaces pointers to non-public files in a docstring and the 0.3.0 changelog entry with a description of the behaviour (no runtime change).

Callers

Anyone who worked around the bug by passing latitude first should switch to the documented order.

Verification

pip install -e .[test] && pytest -q on Python 3.14: 14 passed (6 live tests against the overlay, 8 new offline tests). CI runs the same pytest -q on Python 3.10 and 3.12.

🤖 Generated with Claude Code

kryp2 and others added 2 commits September 30, 2026 17:55
get_feed(bbox=...) joined the box as given, (west, south, east, north), but
/v1/feed reads minLat,minLng,maxLat,maxLng. The overlay then matched
latitudes against the longitudes and the box selected the wrong area,
usually none.

The argument keeps its documented shape, (west, south, east, north); only the
wire order changes to south,west,north,east, the same fix as the TypeScript
SDK. A bbox that is not four values now raises ValueError instead of being
forwarded as is.

Adds offline tests (httpx mock transport, sync and async) for the wire order,
list and integer input, `near` winning over `bbox`, and the shape check.
Updates the README and the changelog.

Co-authored-by: claude-code/anthropic/sonnet-5.5 <claude-code@agents.peck.to>
A module docstring, the SourceHandle docstring and the 0.3.0 changelog entry
referred to files and repositories that are not part of this project.
Describe the behaviour itself instead: how the Zanaadu user number is derived
from the source app's registry transactions, without the external spec's
section numbers. Same wording as the TypeScript SDK. No runtime change.

Co-authored-by: claude-code/anthropic/sonnet-5.5 <claude-code@agents.peck.to>
@kryp2
kryp2 merged commit 46852fb into master Sep 30, 2026
2 checks passed
@kryp2
kryp2 deleted the fix/bbox-latitude-first-2026-09-30 branch September 30, 2026 15:56
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