fix: notification config not broadcast to swarm nodes#4563
Conversation
Three bugs fixed: 1. Swarm agent server created with nil notification handler, so config broadcasts were silently dropped. Pass multiHostService.NotificationHandler() instead. 2. EventExpression missing from subscription broadcast conversion, preventing event-based alerts on agent nodes. 3. Headers missing from dispatcher broadcast conversion, breaking webhook dispatchers with custom headers on agent nodes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Clean, minimal fix. All three issues are legitimate bugs.
No issues found. |
|
|
Three targeted fixes, all correct:
One concern: Otherwise the fix is minimal, correct, and well-scoped. |
Both call sites always pass a non-nil handler, so these guards indicate a programming error if ever triggered. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Code review:
|
Fail fast at server creation time instead of at RPC call time. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Clarifying on the The three substantive fixes (nil handler, |
The agent server now requires a non-nil NotificationConfigHandler, so the test needs a mock implementation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Review
Test plan gap: Two items unchecked — event-based alerts and webhook custom headers on agent nodes. These are the exact scenarios being fixed; should be verified before merge. Minor: Whitespace-only alignment change in |
APIKey, Prefix, and ExpiresAt were missing from the NotificationDispatcher protobuf message, causing these fields to be silently dropped when broadcasting notification config to agent nodes. Same class of bug as #4563. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
nilnotification handler (main.go:98), so gRPC config broadcasts were silently dropped on all swarm nodesEventExpressionwas missing from subscription broadcast conversion, breaking event-based alerts on agent nodesHeaderswas missing from dispatcher broadcast conversion, breaking webhook dispatchers with custom headers on agent nodesFixes #4562
Test plan
🤖 Generated with Claude Code