Skip to main content

Context Map

As built

Derived from network/model/model.yaml. This context's service is built (IQVO/customer-returns, decided by ADR 0012); the model carries its as-built contracts, and identifiers (Err... names, routes, CloudEvents types) are the names the service uses. Where the model left a choice open, the service's own ADRs 0001 to 0005 record what it does.

Following ddd-crew Context Mapping. This is customer-returns' slice of the network-wide context map. Arrows point from upstream to downstream.

Upstream: what customer-returns conforms to​

Downstream: who depends on customer-returns​

Derived from: model.yaml → contexts[customer-returns].inbound, .publishes, .consumes; contexts[offer-availability].consumes; meta.hard_boundary. The agent clients node is not a model edge: it is the service's MCP server and A2A agent (service ADRs 0006, 0009 and 0011), read on develop 5f2d5e6 on 2026-12-02; its row is in the table below.

Omitted: the contexts with no edge to this one in the model (delivery-promise, linehaul-transportation, last-mile-delivery, node-performance, seller-inbound), and, from the two diagrams only, shipping-and-tracking and vendor-connectivity: both are edges of the model since their side shipped, listed in the section below; the diagrams were not redrawn.

Relationships​

NeighbourDirectionPatternChannelMessagesWhy this pattern
customer-orderingU → DConformistKafka retailnetwork.customer-ordering.eventsCustomerOrderPlaced, ShopperNoticeDecidedWhether a group is shipped or delivered is customer-ordering's fact. Kept in OrderGroupView; never asked back.
node-topologyU → DConformistKafka retailnetwork.node-topology.eventsNodeRegistered, NodeActivated, NodeSuspended, NodeRetired, ServiceAreaAssignedWhich returns centre is ACTIVE and which region a prefix belongs to are node-topology's facts. Kept in ReturnsNetworkView.
order-sourcingU → DConformistKafka retailnetwork.order-sourcing.eventsFulfillmentReleasedToNode, FulfillmentLockedWhich node fulfilled the group, and whose stock each line took, are sourcing facts. Kept in ReturnsNetworkView.
offer-availabilityU → D (CR upstream)Conformist (offer-availability conforms)Kafka retailnetwork.customer-returns.eventsReturnCompletedThe restock is a fact about what came back; offer-availability applies it to the owner listing.
Storefront (external)U → DOpen Host ServiceREST (no auth)authorize, label, cancel, readA published returns API; the storefront is the only caller.
Agent clients (MCP and A2A)U → DOpen Host ServiceMCP Streamable HTTP /api/mcp/customer-returns; A2A JSON-RPC /api/a2a/customer-returns; both through the Agent Router, no authMCP get_return_authorization, list_return_authorizations; A2A skill get_return_authorizationThe two reads of the returns API as agent surfaces, both L1 and read-only (service ADRs 0006, 0009, 0011). warehouse-ops-agent wires none of them on its develop (abc8472). A2A is delegation only: a skill never proxies another context's data.
network-fulfillment (warehouse-systems fleet)noneSeparate WaysnonenoneThe hard boundary: the fleet reaches the network through the Vendor API of vendor-connectivity only.

The two returns seams​

Both are built in this service and in the neighbour: the neighbour's develop contract carries its side, so both are edges of the model.

NeighbourDirectionPatternChannelWhat crosses
shipping-and-trackingCR calls STCustomer/SupplierREST POST /return-labels (in-org, Idempotency-Key of the authorization id and the package number)IssueLabel calls the reverse-label route before the transaction and stores the tracking number of the 201 answer (shipping-and-tracking ADR 0017). The call is config-gated and off by default; when it is unset or fails the label request answers 422 label-unavailable.
vendor-connectivityCR → VCConformist (vendor-connectivity conforms)Kafka retailnetwork.customer-returns.eventsReturnAuthorized, ReturnLabelIssued, ReturnCancelled feed the vendor's return advices (vendor-connectivity ADR 0014).
vendor-connectivityVC → CRCustomer/SupplierKafka retailnetwork.vendor-connectivity.eventsVendorReturnOutcomeSubmitted, the vendor's graded outcome, completes the first fitting open authorization (RECEIVED, ReturnCompleted).

Notes on the patterns​

  • No Shared Kernel. orderId, nodeId, catalogItemId and ownerRef are values copied from events.
  • Conformist upstream, three times. The context decides from local copies; a view that lags refuses the command instead of calling the producer.
  • One synchronous call. The reverse-label call is the only one the service makes; see the table above.
  • Agent surfaces add no relationship. MCP and A2A front the same two reads as the REST API (service ADRs 0006 and 0009); no fact crosses through them that the REST reads do not already answer, and nothing is written over either.