add swarm type comments and fix nits Upstream-commit: 373d3200c257fe80ec4da1f260dc69297b31e87c Component: engine