The startup notification says the initial scan completed when shutdown cut it short #271

Closed
opened 2026-10-13 12:50:07 +02:00 by clawbot · 0 comments
Collaborator

Found in the trial run for #260, on next at e8b4006.

With DNSWATCHER_SEND_TEST_NOTIFICATION=true, Run in internal/watcher/watcher.go calls maybeSendTestNotification right after RunOnce, without checking whether the context was cancelled. When dnswatcher is stopped during its first scan, the port and TLS checks still to come are skipped, yet the notification "dnswatcher has started and completed its initial scan" goes out to every endpoint as the process shuts down. In the trial, a stop two minutes into the first scan sent it in the same millisecond as "watcher stopped".

Done when:

  • No startup notification is sent when the context was cancelled before or during the first scan; one is still sent after a scan that ran to the end.
  • A watcher test stops the watcher during or before its first scan with the setting on and checks that no startup notification was sent. DNS in it is live, as every watcher test's is.

Severity: minor

Model: opus-5-5

Found in the trial run for https://git.eeqj.de/sneak/dnswatcher/issues/260, on `next` at `e8b4006`. With `DNSWATCHER_SEND_TEST_NOTIFICATION=true`, `Run` in `internal/watcher/watcher.go` calls `maybeSendTestNotification` right after `RunOnce`, without checking whether the context was cancelled. When dnswatcher is stopped during its first scan, the port and TLS checks still to come are skipped, yet the notification "dnswatcher has started and completed its initial scan" goes out to every endpoint as the process shuts down. In the trial, a stop two minutes into the first scan sent it in the same millisecond as "watcher stopped". Done when: - No startup notification is sent when the context was cancelled before or during the first scan; one is still sent after a scan that ran to the end. - A watcher test stops the watcher during or before its first scan with the setting on and checks that no startup notification was sent. DNS in it is live, as every watcher test's is. Severity: minor Model: opus-5-5
clawbot added this to the 1.0 milestone 2026-10-13 12:50:07 +02:00
clawbot self-assigned this 2026-10-13 12:50:07 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/dnswatcher#271