Linehaul Transportation
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.
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
| Page | What it holds | ddd-crew tool it follows |
|---|---|---|
| Business Context | The problem, the actors, the decisions, what is out of scope | — (narrative) |
| Ubiquitous Language | Departure, Pickup Departure, Load, Lane Schedule, Middle Mile and the neighbour terms used here | — (glossary) |
| Core Domain Chart | Why this context is Supporting | core-domain-charts |
| Bounded Context Canvas | Purpose, classification, roles, every inbound and outbound message | bounded-context-canvas v5 |
| Context Map | Every upstream and downstream neighbour with its pattern and channel | context-mapping |
| Aggregate Design Canvas | Departure, LaneSchedule and Load: states, invariants, commands, events | aggregate-design-canvas v1.1 |
| Domain Events | The eight published and twelve consumed events, with full CloudEvents types | — (event catalogue) |
| Domain Message Flow | Cutoff to pickup, booking on lock, load to station, cancellation | domain-message-flow-modelling |
| EventStorming | Process-level boards with hotspots | eventstorming-glossary-cheat-sheet |
| Use Cases | One section per command: trigger, adapter, flow, errors, events | — (application layer) |
| Class Diagram | Proposed domain types and the hexagonal ports and adapters | — (UML) |
| Entity Relationship | Proposed Postgres schema | — (ER) |
| Sequence Diagrams | One 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-transportationondevelop(e752832, 2026-10-26): binariescmd/api(REST) andcmd/mcp(read-only MCP), and the console remote inweb/. - Deployment: wired in warehouse-infra develop: a
terraform/apps.yamlentry (database: true,frontend_remote: linehaul_mfe) andhelm-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 defaultotel-collector.observability.svc.cluster.local:4317;OTEL_SERVICE_NAME). The Tier-2 business counter islinehaul.loads.dispatched(unit{load}, ininternal/adapters/outbound/telemetry/load_metrics.go), with attributeoutcome=dispatchedorrejectedandreasonon the outcomes that are not a success. The dashboard queries it aslinehaul_loads_dispatched_totalin warehouse-infra'sterraform/dashboards/contexts/linehaul-transportation.json, byoutcome.
Elsewhere
- Read-only MCP server (service ADR 0008):
cmd/mcp, a second binary serving Streamable HTTP on:8090with 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/mcpmount. - Console remote (service ADR 0009):
web/, a Vite + React Module Federation remote — federation containerlinehaul_mfe, gateway mount/mfes/linehaul-transportation/, dev/preview port4015— 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.