agent: add test coverage for AgentReconciler

This subtle bug was fun to find :-(