Presence tracking publishes device discovered, offline, back online and address changed events #161
Labels
No labels
agent
api-regen
agent
architect
agent
coder
agent
console-coder
agent
docs-writer
agent
mechanic
agent
protocol-coder
agent
storage-coder
area/api
area/ci
area/console
area/dhcp
area/dns
area/docs
area/packaging
area/process
area/storage
area/windows
kind
bug
kind
chore
kind
docs
kind
epic
kind
feature
kind
performance
kind
security
kind
test
priority
high
priority
low
priority
medium
resolution
duplicate
resolution
not-a-bug
resolution
wontfix
status
blocked
status
in-progress
status
needs-decision
status
needs-design
status
ready
theme
ad-samba-dns
theme
alternatives-benchmark
theme
console-toolchain
theme
later
theme
parity-devices
theme
parity-query
theme
post-release-fixes
theme
tracker-setup
theme
valkey
theme
windows-installer
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Depends on
#162 Notification channels can receive device presence and DHCP lease events with useful payloads
lantea-one/ninlil
#253 Each device keeps a history of its online and offline periods
lantea-one/ninlil
Reference
lantea-one/ninlil#161
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
Online status is computed when read, never stored (
ClientPresenceOptions.cs:11-17), so nothing notices a transition.What changes
src/dotnet/src/Ninlil.Dns.Server.Core/Events/:ClientDiscoveredEvent,ClientWentOfflineEvent,ClientCameOnlineEvent,ClientAddressChangedEvent. Each carries client id, display name, identifier, address and time. Register each inEvents/Broker/DnsServerEventTypeRegistry.cs;DnsServerEventTypeRegistryTestsmust cover them.ClientPresenceFlushService: publish discovered (#145 creation), came online (previousLastSeenUtcolder thanOnlineWindow) and address changed (the storedAddressdiffers).ClientPresenceTransitionService(hosted, inNinlil.Dns.Server.ClientIdentity/Presence/). Each tick it publishes went offline for addresses whoseLastSeenUtccrossednow - OnlineWindowsince the previous tick.LastSeenUtcrange on EF and Mongo, which may need a storage-coder split if the index is missing.ClientDiscoveredEventis published for every device.ClientWentOfflineEvent,ClientCameOnlineEventandClientAddressChangedEventare published only for clients withDnsClientEntity.IsFavorite(DnsClientEntity.cs:83).Discoveredrow yet, the devices it creates publish noClientDiscoveredEvent.Acceptance
Flush_ForAFavoriteLastSeenBeforeTheWindow_PublishesClientCameOnlineagainst a recording publisher, insrc/dotnet/tests/Ninlil.Dns.Server.ClientIdentity.Tests.ClientDiscoveredEventper new device.dotnet test src/dotnet/tests/Ninlil.Dns.Server.ClientIdentity.Tests,dotnet test src/dotnet/tests/Ninlil.Dns.Server.Core.Tests. Core changed, so run the whole solution.Source
audit-feature-parity.md§2A #11.Owner decision 2026-10-31: "new-device alerts for all, on/offline for favourites" (Q-PN-5); "silent baseline" (Q-PN-6).