Skip to main content

Context Map

Following ddd-crew Context Mapping. This is network-fulfillment's slice of the fleet map: every relationship this context has, with the upstream (U) and downstream (D) side, the pattern, and the technology.

Source: internal/adapters/outbound/retailnetwork/mode.go, internal/adapters/outbound/ordermanagement/planner.go, internal/adapters/outbound/inventoryclient/client.go, internal/adapters/outbound/processpathcache/consumer.go, internal/adapters/outbound/pathcapacitycache/consumer.go, internal/adapters/outbound/kafka/publisher.go, internal/adapters/inbound/http/server.go, internal/adapters/inbound/kafka/shipment_confirmed_consumer.go, internal/adapters/inbound/mcp/tools.go, web/src/screens/NetworkFulfillmentScreen.tsx, cmd/netfulfil/main.go, docs/adr/0014-explicit-shipment-confirmation-endpoint.md.

Legend: solid arrow = live by default; dotted arrow = wired at boot (the capability-offer pipeline is always on, ADR 0025) or with no known consumer; dotted line without an arrow head = deliberately absent. Arrows point from upstream to downstream. Path parameters are written id / sku inside the diagram, for {id} / {sku}.

Omitted: the analytics loop (this context's own projector consuming its own analytics topic, an internal relationship); Postgres, Kafka and Kong as infrastructure; and every fleet context with no relationship to this one. Those are effectively Separate Ways: facility-layout, product-master, workforce-management, labor-performance, warehouse-planning, network-inventory-planning, warehouse-ops-agent. product-master (the owner of SKU handling classification and physical profile since 2026-10-07) has no edge here: this context advertises quantities per SKU and never reads a SKU's classification or dimensions.

Relationships and evidenceโ€‹

UpstreamDownstreamPatternTechnologyStatusEvidence
retail-network (external network role)network-fulfillmentConformist + Anti-Corruption Layerports.NetworkGateway: PollDemand, SubmitAcknowledgement, SubmissionStatus, SubmitShipmentConfirmationStub by default; NETWORK_MODE=live wires the Vendor API demand loop (ADR 0026)internal/adapters/outbound/retailnetwork/ (StubGateway, LiveGateway); ADR 0001 ยง2, ADR 0009, ADR 0026
order-managementnetwork-fulfillmentCustomer/Supplier (NF is the Customer; OM ADR 0020 is the Supplier's half)REST: POST /orders, POST /orders/{id}/releases, DELETE /orders/{id} behind one circuit breakerLiveinternal/adapters/outbound/ordermanagement/planner.go, breaker.go; cmd/netfulfil/main.go wirePlanner
inventory-storagenetwork-fulfillmentOpen Host / ConformistREST GET /inventory/{sku}/usableWired, always oninternal/adapters/outbound/inventoryclient/client.go; the ports.InventoryAvailability doc comment explains why this is REST rather than a cache
process-path-managementnetwork-fulfillmentOpen Host + Published Language / ConformistKafka warehouse.process-path-management.events, CE types ...processpath.ProcessPathCreated, ...ProcessPathUpdated, ...ProcessPathDeactivated, ...cptschedule.CPTScheduleChanged; per-process group network-fulfillment-process-path-capability-cache-<host>-<pid>-<ts>Wired, always oninternal/adapters/outbound/processpathcache/consumer.go
wes-work-planningnetwork-fulfillmentOpen Host + Published Language / ConformistKafka warehouse.work-planning.events, CE type com.warehouse.wes.work-planning.workpool.PathCapacityChanged; per-process group network-fulfillment-path-capacity-cache-<host>-<pid>-<ts>Wired, always oninternal/adapters/outbound/pathcapacitycache/consumer.go
network-fulfillmentwarehouse-console (via web/ remote)Open HostREST GET /network-orders, GET /inbound-statusLiveweb/src/screens/NetworkFulfillmentScreen.tsx; ADR 0010
network-fulfillmentMCP clientsOpen Host (read-only)MCP get_network_order, list_network_orders, list_capability_offers, get_acknowledgement_reportLive (cmd/mcp). No fleet MCP client found in the local warehouse-ops-agent checkoutinternal/adapters/inbound/mcp/tools.go, report_tool.go
network-fulfillmentany subscriberOpen Host + Published LanguageKafka warehouse.network-fulfillment.events, com.warehouse.wes.network-fulfillment.networkorder.<Event>Wired-but-unused. Published through the outbox relay (always on); no consumer found in the local fleet checkoutsinternal/adapters/outbound/kafka/publisher.go; apis/asyncapi.yaml
outbound-shippingnetwork-fulfillmentCustomer/Supplier (outbound-shipping ADR 0001)Kafka warehouse.outbound-shipping.events, CE type com.warehouse.wms.outbound-shipping.outboundload.ShipmentConfirmed; group OUTBOUND_SHIPPING_CONSUMER_GROUPWired, every mode. Primary trigger of shipment confirmation: orders[].order_id joins NetworkOrder.localOrderId (ADR 0014 addendum)internal/adapters/inbound/kafka/shipment_confirmed_consumer.go, cmd/netfulfil/outbound_shipping.go
fulfillment-executionnetwork-fulfillmentnonewould be Kafka PackageManifestedDeliberately absent (ADR 0014): PackageManifested is not consumed; the trigger is outbound-shipping's ShipmentConfirmed, joined on localOrderId (ADR 0014 addendum)internal/application/usecases/confirm_network_order_shipment.go doc comment

Notes on the patternsโ€‹

  • Conformist + ACL toward the network. Conformist because the network owns the protocol (one answer, 24h, fill-or-kill) and the identifier formats (NetworkRef is opaque). ACL because none of that vocabulary crosses adapters/outbound/retailnetwork/: the fleet sees SKUs, quantities and a deadline only.
  • Customer/Supplier with order-management. This is a negotiated, two-sided contract. The companion OM ADR 0020 added releaseOnAllocation and PromisePolicy.FeasibleBy specifically for this Customer. The relationship is not Conformist: the upstream changed to serve it.
  • No Shared Kernel. Value types such as SKU and SiteId are re-declared locally in internal/domain/shared; no code is shared.