Repository navigation
Plan a road route for custom-route shipments (#328) - #336
Merged
Merged
Conversation
Part 1 of #328. A shipment on a custom route (no lane) gets its own planned route in a new ShipmentRoute table, calculated through its stops in sequence by ShipmentRoutePlanner when the shipment is created or changed while draft or ready, and only when the stop sequence changed. The provider call runs off the request path (ShipmentRoutePlanningHandler) and outside any transaction; SetShipmentRouteCommand stores the result and emits shipment.route_planned. With no Google Maps server key, planning is skipped and logged. Checkpoints, route deviation in the ETA monitor, the new GET /api/v1/shipments/:id/route and the shipment map all use the shipment's effective route: its own, otherwise its lane's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 4, 2026
Connor-Finn
added a commit
that referenced
this pull request
Oct 4, 2026
PgBossEventBus only fanned events out to handlers registered in its own process, so with DISABLE_EMBEDDED_WORKERS=true every event the API published was recorded and then delivered nowhere. A process that runs no handlers now puts events on an evt.__dispatch queue, and every process that has started handlers consumes it and fans them out to its handler queues. This also covers WORKER_MODE=integrations workers. The standalone worker now sets up the same DI container as the API (queue adapter, event bus, full command bus, delivery and arrival services) instead of hand-built command buses, and both processes register the event handlers with the full command bus. The command-driven handlers (issue engine, auto-replenishment, route planning) therefore run in both setups, whether or not an LLM is configured. Replaces the route-planning-only workaround from #336. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 1 of #328.
What changed
ShipmentRoute(new table, reference role): the planned road route for a shipment on a custom route (no lane), with the stop sequence it was calculated for (stopsKey).ShipmentRoutePlanner, run byShipmentRoutePlanningHandleronshipment.created/shipment.updated:SetShipmentRouteCommandstores the result and emitsshipment.route_plannedShipmentRouteRepository.findEffectiveRoute): the shipment's own route, otherwise its lane's. Checkpoints, route deviation in the ETA monitor, the newGET /api/v1/shipments/:id/routeand the shipment map use it.Testing
tsc(backend and frontend), tenancy and boundary lints pass.no_server_keyas expected). The Google call is covered by tests with it stubbed.🤖 Generated with Claude Code