warehouse-systems fleet · executive briefing

outbound-shipping

Proves what left on which truck and tells the network the order really shipped
eight capabilitys13 events out · 9 in8 recorded decisions

This project is a domain-driven design study. It is not associated with, endorsed by or affiliated with any company, and it uses no company's code, data, logos or trademarks. All names, figures and examples are illustrative or synthetic. · November 2026

the short version · read this if nothing else

Outbound Shipping confirms a shipment only when the trailer leaves, so 'shipped' finally means shipped

1

It fills the gap between a manifested package and a departed trailer.

2

Tying ship-confirm to the physical departure replaces a manual network confirmation.

3

It runs and is well tested, but the deployed image shows us almost nothing.

The ask

Roll an image with the OpenTelemetry setup to the cluster and have infra load its dashboard and alert rules.

why it exists

'Shipped' should mean the trailer actually left the yard

outbound-shipping is the WMS-tier Supporting bounded context that gets every manifested package onto the right load before its cutoff, proves what left on which trailer, and tells the fleet an order actually shipped. It fills the gap between fulfillment-execution (which stops at PackageManifested) and yard-management (which owns the trailer and departure) with three aggregates: OutboundLoad…

Today

It plans loads from manifested packages, stages and loads them, and confirms on the trailer's departure with a bill of lading.

The catch

One pod runs, but its image predates the OpenTelemetry setup, so dashboards are empty and lag, outbox and DLQ go unmeasured.

what it does

It gets every package onto the right load before its cutoff

Automatic load planning

Opens one load per cutoff and ship method when a package is manifested.

Door assignment

Takes the door from dock appointments and starts loading when the trailer docks.

Staging and loading

Stages packages only in the site's staging locations, then loads them.

Load control

Closes, reopens or cancels loads and short-ships missing packages with reasons.

Ship-confirm on departure

Confirms on departure with the seal number and issues one bill of lading per load.

Missed-load sweep

Flags packages left behind at departure so they can be re-promised.

who it talks to

Five contexts feed it, three build on what it publishes

LISTENS TO · 9 EVENT TYPESIS HEARD BY · 3 CONTEXTSyard-management3facility-layout2fulfillment-execution2dock-scheduling1process-path-management1order-management2exception-management1network-fulfillment1outboundshippingbadge = event types on that edge · derived from the CloudEvents types each repo declares
the shared language

Loads, packages and the bill of lading tell the whole story

THE LANGUAGEOF THE DOMAINOutboundLoadShippingPackageBillOfLadingCutoff keyShip-confirm-on-departure…Staging locationDock appointmentShort-ship
REST15 operations over 15 paths on :8080: POST…
MCPMCP server (cmd/mcp, :8090, Streamable HTTP): 2 read-only…
Events13 produced, 9 consumed on Kafka (CloudEvents 1.0): 13…
how it is built

Two binaries: one does the shipping work, one only reads

DRIVERS · INBOUNDOUTBOUND · ADAPTERSREST API :808015 operations over 15 pathsMCP tools :8090MCP server (cmd/mcp, :8090…Kafka consumer · 9 eventspackage.PackageManifestedpackage.PackageDivertedDOMAIN COREOutboundLoadShippingPackageBillOfLadingCutoff keyPostgreSQLPostgreSQL onlyKafka producer · 13 eventsoutboundload.LoadPlannedLoadDoorAssignedTransactional outboxrelay · DLQ on x-dlq-*commands inevents inevents outstorage / infra
event traffic · CloudEvents 1.0 on Kafka

Thirteen events out and nine in trace every load to departure

CONSUMED · BY SOURCE · 9PUBLISHED · BY ENTITY · 13yard-management 3facility-layout 2fulfillment-execution 2dock-scheduling 1process-path-management 17 outboundload4 shippingpackage2 billoflading
how we know it is healthy

The code is instrumented, but the running image predates it

Fleet observability standard (ADR 0008): both binaries push OTLP/gRPC traces and metrics (off when OTEL_EXPORTER_OTLP_ENDPOINT is empty…

What we watch

  • One JSON log line per lifecycle event (boot, readiness flips, shutdown drain, consumer deaths exit the pod)…
  • Dead-letter topic per consumer with logged poison messages; outbox relay caps and re-arm logging
  • W3C trace-context stored in each outbox row's headers and copied onto the relayed Kafka message so correlation can cross Kafka

What stops a bad change

  • make check / check-all (fmt-check, vet, golangci-lint, go test -race, build)
  • make coverage, make mutation (gremlins, 90/90), make arch-test (fitness tests)
  • make guide-lint + harness-test (repo lint, pinned-contract gate, fleet drift sensors)
by the numbers

Eight decisions and 10 BDD features: a young but disciplined context

8
Architecture decisions
#38 of 45 in the fleet
1
DB migrations
#32 of 45 in the fleet
10
BDD feature files
#33 of 45 in the fleet
13
Events published
#4 of 45 in the fleet

Ranked against all 45 briefed repositories (dot = one repository, highest on the left).

One-command workflows (make)

arch-testbddbuildcheckcheck-allcheck-fastcoveragefmtfmt-checkguide-lintharness-testhelpintegrationlint
what comes next

Next, ship the instrumented image, then pin the last contracts

NOW1Roll the OpenTelemetryimage and load theinfra dashboardRoll an image carrying theOpenTelemetry setup (ADR 0008)to the cluster — the runningv0.1.0 pod (857edfd) predatesit — and get warehouse-infra toload the outbound-shippingdashboard and alert rules (notloaded at the 2026-11-13 check)NEXT2Instrument consumerlag, outbox depth andDLQ rateInstrument what theobservability page lists as notdone: consumer lag, outboxbacklog depth, dead-letter rateand a ship-confirm counter; addconsumer-side trace extraction(not evidenced)LATER3Pin the last twoproducer contracts andverify consumptionPin the two remaining producercontracts, CPTScheduleChanged(process-path-management) andPackageManifested(fulfillment-execution) — ADR0007 lists them as follow-ups;verify ShipmentConfirmedconsumption in …LATER4Raise mutation gatefrom 90/90 to the 99/99standardRaise the mutation gate(.gremlins.yaml 90% efficacy /90% mutant-coverage) to thefleet 99/99 standard
what could go wrong · and what we do about it

Our biggest risk is running blind while the deployed image lags

No lag, depth or DLQ metric; dashboards are empty

Consumers (six groups) and the relay have no lag, depth or DLQ metric: operational truth is slog lines and SQL…

→

Instrument consumer lag, outbox depth and DLQ rate, and deploy the new image.

One pod, never observed under load

One api pod runs v0.1.0 (since 2026-11-12); MCP is off by default and consumer policies…

→

Observe consumer, relay and DLQ behaviour under load before relying on it.

Three inputs lack a pinned producer contract

The fulfillment-execution, process-path-management and facility-layout inputs are consumed without a pinned contract: a producer…

→

Pin the remaining contracts so a producer rename fails CI, not runtime.

Unauthenticated endpoints, by fleet decision

REST and MCP are unauthenticated BY DECISION (fleet-wide)

→

A decision, not a gap: fleet-wide.

the decision we need

Roll an image with the OpenTelemetry setup to the cluster and have infra load its dashboard and alert rules.

WHAT ISIt plans loads from manifestedpackages, stages and loads them, andconfirms on the trailer's departurewith a bill of lading.THE CATCHOne pod runs, but its image predatesthe OpenTelemetry setup, sodashboards are empty and lag, outboxand DLQ go unmeasured.WHAT COULD BEDashboards show real loads, andconsumer lag, outbox depth and DLQrate alert us before cutoffs slip.
Why it matters

Outbound Shipping confirms a shipment only when the trailer leaves, so 'shipped' finally means shipped

appendix · for the engineers in the room

The fine print: how it is put together

StyleHexagonal (ports and adapters) with DDD aggregates and an event-driven transactional outbox; dependencies point inward, enforced by architecture fitness tests
LayoutTwo binaries: cmd/api (REST :8080 + six Kafka consumers — fulfillment, dock, yard, cpt, layout and the own analytics consumer…
StoragePostgreSQL only (pgx; unit of work; 1 embedded golang-migrate migration; transactional outbox table with a headers column for trace context…
TestingUnit tests per layer (domain, use-case, adapter); 10 godog BDD feature files; testcontainers integration; consumer contract tests against pinned producer AsyncAPIs (yard-management…
REST15 operations over 15 paths on :8080: POST /packages/{packageId}/stagings | loadings | unloadings…
Go 1.27.4chi routerpgx v5 + golang-migratekafka-go + CloudEvents SDK v2MCP go-sdk v1.8.0OpenTelemetry Go SDK v1.47.0godogHelm chart with Gateway API…