Bug: New construction addresses blocked as out-of-service in online scheduler due to Mapbox geocoding failure

Objective

  • Fix the online scheduler so new construction addresses that Mapbox cannot confidently geocode don't result in a false "Out of Service Area" block and a quote stuck in Blocked status.
  • Give the service area check a reliable coordinate to work against, or surface a meaningful fallback path when geocoding fails rather than silently blocking the booking.

Background

  • Catherine Lemoine (SE/Residential) reported that a quote created via the online scheduler for 1105 Riverrun, Madison, Tennessee 37115 was blocked with status "Out of Service Area — Review Property Address." Madison, TN 37115 is confirmed inside the SE service area.
  • Chris Scott identified this as a Mapbox geocoding failure — the new construction address doesn't exist in Mapbox's database yet, causing the geocoder to return either no result or an inaccurate coordinate. Chris noted the intended behavior is to fall back to zip code, but something broke in that chain.
  • The online scheduler's address entry (AddressSearchInputFallbackForm) has two distinct paths: the autocomplete search path and the manual entry path. The geocoding fallback chain (full address → city/state/zip → zip code alone) exists only in the manual entry submitForm function. The autocomplete path (handleAutoCompleteClick) takes coordinates directly from Mapbox's suggestion result — no fallback runs if Mapbox returns a result with an imprecise coordinate, or if the user is forced into manual entry after a failed autocomplete.
  • The service area check (service-area/find-containing) runs against address.lat and address.lng in PropertyStep.tsx. If those coordinates are wrong or represent a fallback location (e.g., a city centroid for a zip code that straddles the service area boundary), the property is silently blocked.
  • There is no logging or diagnostic visibility into which geocode attempt produced the coordinates used, or what those coordinates were — making this class of failure impossible to identify without engineering investigation into Mapbox directly.
  • New construction is a material inspection volume segment; any address newer than Mapbox's database is at risk of this failure pattern.

Product Decisions

Locked

  1. Behavior intent — The expected outcome for a valid address inside the service area is that the booking proceeds. A geocoding failure should never silently block a legitimate booking without a recoverable path.

Open

  1. Fallback behavior — When Mapbox cannot return a high-confidence coordinate for a full address, should the system: (a) fall back to zip centroid and proceed if that centroid is inside the service area, (b) surface a manual override for internal schedulers, or (c) block and prompt the user to call in? The right answer may differ between the online-public and internal scheduler contexts.
  2. Logging — Should geocode attempt results (which tier succeeded, what coordinates were returned) be logged for observability? Or is a one-time Mapbox diagnostic on the specific address sufficient?

Scope

Frontend — The geocoding fallback chain in attik-frontend/src/components/forms/AddressSearchInputFallbackForm.tsx (submitForm) covers manual entry but not the autocomplete path. handleAutoCompleteClick takes foundAdd.center directly from the Mapbox Places response without any validation or fallback. If Mapbox returns coordinates that don't match the real property location (common for new construction), those bad coordinates propagate silently. The callMapboxPlaces and geocodeAddress utilities in attik-frontend/src/util/functions/fetching/callMapboxPlaces.ts are the entry points for any geocoding quality improvements.

The service area check is triggered in attik-frontend/src/app/scheduler/property/PropertyStep.tsx via callServerAction to service-area/find-containing — it receives whatever coordinates were produced upstream with no validation layer.

References

Please authenticate to join the conversation.

Upvoters
Status

Planned

Board
🏠

Main App

Date

About 3 hours ago

Author

Linear

Subscribe to post

Get notified by email when there are changes.