Notification channels can receive device presence and DHCP lease events with useful payloads #162

Open
opened 2026-10-31 12:42:18 -04:00 by claude · 0 comments
Owner
  • Draft: PN-9
  • Priority: high
  • Agent: coder
  • Depends on: #161, #150
  • Decisions: Q-PN-7

Why

The deliverable-event catalog and the subscriber registrations must match (WebhookEventCatalog.cs:23-32, ServiceCollectionWebhooksExtension.cs:67-98; a test enforces it). #150 renames both to NotificationEventCatalog and ServiceCollectionNotificationsExtension. DhcpLeaseChangedEvent carries only the lease id (DhcpLeaseChangedEvent.cs:18; publishers at Dhcpv4LeaseAllocationService.cs:256), which tells a receiver nothing useful.

What changes

  • Add the four #161 events and DhcpLeaseChangedEvent to NotificationEventCatalog and register a delivery subscriber for each in ServiceCollectionNotificationsExtension (both in src/dotnet/src/Ninlil.Dns.Server.Notifications/ after #150).
  • Technical call: add optional IpAddress, ClientIdentifier, HostName, ScopeName and ProtocolVersion to DhcpLeaseChangedEvent, filled at every publish site (Dhcpv4LeaseAllocationService, Dhcpv6LeaseAllocationService, Dhcpv4LeaseExpirySweepService.cs:153, DhcpLeaseAdministrationService.cs:58). Every one of them has the lease row in hand, and existing subscribers keep reading the id.
  • Examples under src/dotnet/src/Ninlil.Web/Examples/ that list event names gain the new names.

Acceptance

  • This test fails first: IsDeliverable_ForClientDiscovered_ReturnsTrue in the notifications test project (src/dotnet/tests/Ninlil.Dns.Server.Notifications.Tests after #150).
  • A delivery test sends a DhcpLeaseChanged payload that carries the IP address.
  • README.md notification event list updated.
  • Gate: dotnet test src/dotnet/tests/Ninlil.Dns.Server.Notifications.Tests, dotnet test src/dotnet/tests/Ninlil.Web.Tests, and the whole solution (Core changed).

Source

audit-feature-parity.md §2A #11, §2B #37.
Owner decision 2026-10-31: one unified notification-channel entity replaces webhook subscriptions (Q-PN-7), so the new events are deliverable to every channel kind.

- **Draft:** PN-9 - **Priority:** high - **Agent:** coder - **Depends on:** #161, #150 - **Decisions:** Q-PN-7 ### Why The deliverable-event catalog and the subscriber registrations must match (`WebhookEventCatalog.cs:23-32`, `ServiceCollectionWebhooksExtension.cs:67-98`; a test enforces it). #150 renames both to `NotificationEventCatalog` and `ServiceCollectionNotificationsExtension`. `DhcpLeaseChangedEvent` carries only the lease id (`DhcpLeaseChangedEvent.cs:18`; publishers at `Dhcpv4LeaseAllocationService.cs:256`), which tells a receiver nothing useful. ### What changes - Add the four #161 events and `DhcpLeaseChangedEvent` to `NotificationEventCatalog` and register a delivery subscriber for each in `ServiceCollectionNotificationsExtension` (both in `src/dotnet/src/Ninlil.Dns.Server.Notifications/` after #150). - Technical call: add optional `IpAddress`, `ClientIdentifier`, `HostName`, `ScopeName` and `ProtocolVersion` to `DhcpLeaseChangedEvent`, filled at every publish site (`Dhcpv4LeaseAllocationService`, `Dhcpv6LeaseAllocationService`, `Dhcpv4LeaseExpirySweepService.cs:153`, `DhcpLeaseAdministrationService.cs:58`). Every one of them has the lease row in hand, and existing subscribers keep reading the id. - Examples under `src/dotnet/src/Ninlil.Web/Examples/` that list event names gain the new names. ### Acceptance - [ ] This test fails first: `IsDeliverable_ForClientDiscovered_ReturnsTrue` in the notifications test project (`src/dotnet/tests/Ninlil.Dns.Server.Notifications.Tests` after #150). - [ ] A delivery test sends a `DhcpLeaseChanged` payload that carries the IP address. - [ ] README.md notification event list updated. - [ ] Gate: `dotnet test src/dotnet/tests/Ninlil.Dns.Server.Notifications.Tests`, `dotnet test src/dotnet/tests/Ninlil.Web.Tests`, and the whole solution (Core changed). ### Source `audit-feature-parity.md` §2A #11, §2B #37. Owner decision 2026-10-31: one unified notification-channel entity replaces webhook subscriptions (Q-PN-7), so the new events are deliverable to every channel kind.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
lantea-one/ninlil#162
No description provided.