I agree , switchyard can potentially traverse the TransfomerRegistry and find the right path for a transformation. Problems could appear though, if there are multiple paths for one transformation.
For example we have transformers for the following cases :
A->B
B->C
A->C
Now that chaining is not allowed, this doesn't cause an issue. With chaining enabled though, switchyard could behaviour unexpectedly, but choosing A->B->C or A->C.
As I see it, either a proper set of rules should be established for transformers,that will lead so that multiple paths cannot exist , or transformation chains should have to be declared explicitly.
Agree on the potential for a problem there, but if we look for a shortest path traversal that doesn't revisit nodes then I think the potential for issues is limited. Honestly, a path which is more than 3-4 steps is extremely unlikely in this scenario and points to a configuration error or pathological user.