Skip to main content

Linehaul Transportation

As built

Derived from network/model/model.yaml. This context's service is built; the model carries its as-built contracts, and identifiers (Err... names, routes, CloudEvents types) are the names the service uses.

Supporting

Linehaul Transportation (linehaul-transportation, code LH, tier logistics) runs the middle mile: transport between nodes, from a vendor fulfillment node to a sortation centre, between sortation centres and air hubs, and on to a delivery station. A lane, owned by node-topology, is static: it says two nodes are connected and how long the trip nominally takes. This context turns lanes into scheduled departures, which are dynamic: each has a cutoff, a departure and arrival time and a package capacity that can change days ahead. For every declared cutoff of every ACTIVE vendor fulfillment node it schedules one pickup departure per operating day (policy PickupFromCutoffs). That is how a vendor's declared cutoff becomes the network's real pickup, and the shipBy the promise uses. It keeps booked <= capacity on every departure, consolidates packages at sortation centres into loads, and reports when loads depart and arrive: LoadArrived at a delivery station feeds last-mile induction, and DepartureCancelled feeds re-promising in delivery-promise.

This context's pages​

PageWhat it holdsddd-crew tool it follows
Business ContextThe problem, the actors, the decisions, what is out of scope— (narrative)
Ubiquitous LanguageDeparture, Pickup Departure, Load, Lane Schedule, Middle Mile and the neighbour terms used here— (glossary)
Core Domain ChartWhy this context is Supportingcore-domain-charts
Bounded Context CanvasPurpose, classification, roles, every inbound and outbound messagebounded-context-canvas v5
Context MapEvery upstream and downstream neighbour with its pattern and channelcontext-mapping
Aggregate Design CanvasDeparture, LaneSchedule and Load: states, invariants, commands, eventsaggregate-design-canvas v1.1
Domain EventsThe eight published and twelve consumed events, with full CloudEvents types— (event catalogue)
Domain Message FlowCutoff to pickup, booking on lock, load to station, cancellationdomain-message-flow-modelling
EventStormingProcess-level boards with hotspotseventstorming-glossary-cheat-sheet
Use CasesOne section per command: trigger, adapter, flow, errors, events— (application layer)
Class DiagramProposed domain types and the hexagonal ports and adapters— (UML)
Entity RelationshipProposed Postgres schema— (ER)
Sequence DiagramsOne runtime sequence per command use case— (UML)

The REST contract is apis/linehaul-transportation/openapi.yaml, rendered under API reference.

Service and operations​

  • Service: IQVO/linehaul-transportation on develop (e752832, 2026-10-26): binaries cmd/api (REST) and cmd/mcp (read-only MCP), and the console remote in web/.
  • Deployment: wired in warehouse-infra develop: a terraform/apps.yaml entry (database: true, frontend_remote: linehaul_mfe) and helm-values/linehaul-transportation.yaml (MCP enabled, gateway path /api/mcp/linehaul-transportation). The cluster itself was not checked in this refresh.
  • Observability: service ADR 0010, Adopt the fleet observability standard, Accepted 2026-10-26. Logs, metrics and traces leave over OTLP to the otel-collector (OTEL_EXPORTER_OTLP_ENDPOINT, chart default otel-collector.observability.svc.cluster.local:4317; OTEL_SERVICE_NAME). The Tier-2 business counter is linehaul.loads.dispatched (unit {load}, in internal/adapters/outbound/telemetry/load_metrics.go), with attribute outcome = dispatched or rejected and reason on the outcomes that are not a success. The dashboard queries it as linehaul_loads_dispatched_total in warehouse-infra's terraform/dashboards/contexts/linehaul-transportation.json, by outcome.

Elsewhere​

  • Read-only MCP server (service ADR 0008): cmd/mcp, a second binary serving Streamable HTTP on :8090 with no auth; it sources this context's own reads and nothing that writes. Two tools: get_departure, list_departures. The gateway (Kong) exposes it at /api/mcp/linehaul-transportation, rewritten to the server's /mcp mount.
  • Console remote (service ADR 0009): web/, a Vite + React Module Federation remote — federation container linehaul_mfe, gateway mount /mfes/linehaul-transportation/, dev/preview port 4015 — read-only screens over the existing REST reads, calling only this context's API.
  • Strategic context map and subdomain classification.
  • Node model (lanes and node types) and promise model (how departures become a witness path).
  • ADR 0008: capacity held at promise time and ADR 0004: parcel nodes are network-operated.