From 4d21b44ddcfa66243ce21865cca678664cbada0a Mon Sep 17 00:00:00 2001 From: Suriya Date: Tue, 11 Aug 2026 15:57:07 +0530 Subject: [PATCH] feat: wire the Doormile endpoint onto the server's actual code f804791 added app/routes/doormile.py against a base that predated the Valhalla work. Rebasing it onto 9ef2f61 rewires it to what is really running, without disturbing anything the server had: the RoadMatrix probe, road_backend_status and the VALHALLA_URL switch are all intact. The one thing the endpoint depends on is unchanged -- optimize_provider_payload(orders, start_coords=None) has the same signature in the server's optimizer as in the version it was written against -- so passing the kitchen through as the run's start still works. Tests re-run against the server's code: all pass. Co-Authored-By: Claude Opus 5 (1M context) --- app/main.py | 3 ++- app/routes/__init__.py | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index c6f2b8a..04439ce 100644 --- a/app/main.py +++ b/app/main.py @@ -28,7 +28,7 @@ from app.core.exception_handlers import ( ) from app.core.exceptions import APIException from app.middleware.request_id import RequestIDMiddleware -from app.routes import cache_router, health_router, ml_router, ml_web_router, optimization_router, batch_analytics_router, riders_router +from app.routes import cache_router, health_router, ml_router, ml_web_router, optimization_router, batch_analytics_router, riders_router, doormile_router # --------------------------------------------------------------------------- # Logging @@ -183,6 +183,7 @@ app.include_router(ml_router) app.include_router(ml_web_router) app.include_router(batch_analytics_router) app.include_router(riders_router) +app.include_router(doormile_router) @app.get("/", tags=["Root"]) diff --git a/app/routes/__init__.py b/app/routes/__init__.py index 870e2ce..47faef2 100644 --- a/app/routes/__init__.py +++ b/app/routes/__init__.py @@ -6,6 +6,7 @@ from .cache import router as cache_router from .ml_admin import router as ml_router, web_router as ml_web_router from .batch_analytics import router as batch_analytics_router from .riders import router as riders_router +from .doormile import router as doormile_router __all__ = [ "optimization_router", @@ -15,4 +16,5 @@ __all__ = [ "ml_web_router", "batch_analytics_router", "riders_router", + "doormile_router", ]