chore(agentnetwork): address automated review feedback

Drain the peer update channels after the bootstrap in the realstack
test so its fan-out assertions can only be satisfied by the operation
under test; use assert with a length guard for diffMappings conditions
under test; drop the duplicate labelgen package comment and two stale
provider-bootstrap comments in the e2e suite; add context to the
exclusion test's account-ID assertion.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Brad Ison
2026-08-10 16:57:20 +02:00
co-authored by Claude Fable 5
parent 78230e9747
commit 155756249c
6 changed files with 28 additions and 20 deletions
@@ -94,6 +94,11 @@ func TestAgentNetwork_ProviderCRUD_FansOutToProxyAndClientPeers(t *testing.T) {
_, err = agentMgr.CreateSettings(ctx, adminUserID, agenttypes.DefaultSettings(accountID), clusterAddr, "")
require.NoError(t, err, "CreateSettings must bootstrap the endpoint")
// The bootstrap itself reconciles and queues updates on both channels;
// drain them so the fan-out assertions below can only be satisfied by the
// operation under test, not by this leftover.
drain(clientCh)
drain(proxyCh)
provider, err := agentMgr.CreateProvider(ctx, adminUserID, &agenttypes.Provider{
AccountID: accountID,