Repository navigation
Name the vehicle's position in its state: its place, or its address - #439
Conversation
GET /vehicles/{vehicle}/state gives, beside position, what a trip gives of
its ends: place, the account's nearest place whose circle holds it, and
address, the instance's reverse geocoder's answer outside every place. Both
come from the same code and the same cache of geocoded positions as the
trips': a parked vehicle read every minute has its cell geocoded once.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
No actionable comments were generated in the recent review. Walkthrough
Severity of issue fixed: Medium Merge Risk:
|
GET /api/v1/vehicles/{vehicle}/stategave the vehicle'spositiononly. It now gives, beside it, what a trip gives of its ends:place: the account's nearest place whose circle holds the position (PlaceRef, as a trip'sstart_place);nullwithout a position and outside every place.address: the street and town of the position, from the instance's reverse geocoder, outside every place (as a trip'sstart_address);nullat a place, without a geocoder, when it knows none, and until it answered.Both are computed by the trips' code (
placeAt,Server.addresses) and share their cache of geocoded positions (geocoded_positions, one row per account and cell,ON CONFLICT DO NOTHING): a parked vehicle read every minute has its cell geocoded once. The places are read only when the state has a position.Both fields are required and nullable in
State;api/openapi.yamland the state's golden files are regenerated.Tests
TestStatePlace: a place, an address outside places, null at a place, an unknown address asked for a later read, no position, no geocoder.task unit-go(0 lint issues),task lint-api,TestGeocodingon PostgreSQL,task web-lint,task web-test.Closes #438
🤖 Generated with Claude Code
Summary by CodeRabbit