the PHPCR\SessionInterface does not have getObjectManager so this test may not use it. though there is SessionInterface::refresh anyways.

but you are right, this should not be needed. so this is kind of merging a node from one workspace to the other, which cascades the merge to the children as well? if that is the case, then yes the node should loop over its children and set them to dirty. be careful however to check if they are already loaded - if the object manager has not yet loaded them, no need to load them. there is ObjectManager::getCachedNode for that.