Only one resource owner should control a given resource node in a graph so when two models get stitched along some 'stitching nodes', only one of the models should specify the delegated resource and the delegation is inherited in the stitched node with an indicator which model it came from (so it can be removed when that model unmerges).
This should simplify the logic in deciding which of the two possible delegations on a stitching node to look at.
Note that ADM generation will need additional help because currently it looks for resources to delegate and if nothing is delegated it may remove the node from the model. Perhaps ADM generation needs an explicit list of 'stitch nodes' to keep.
Only one resource owner should control a given resource node in a graph so when two models get stitched along some 'stitching nodes', only one of the models should specify the delegated resource and the delegation is inherited in the stitched node with an indicator which model it came from (so it can be removed when that model unmerges).
This should simplify the logic in deciding which of the two possible delegations on a stitching node to look at.
Note that ADM generation will need additional help because currently it looks for resources to delegate and if nothing is delegated it may remove the node from the model. Perhaps ADM generation needs an explicit list of 'stitch nodes' to keep.