Let an admin turn off Record Change and Inconsistency notifications for one name #255

Closed
opened 2026-10-03 14:22:50 +02:00 by clawbot · 1 comment
Collaborator

sneak, on #233 (2026-10-03), verbatim:

> if the responses are changing then that is correct to notify. file an issue for a later improvement that allows an admin to disable this specific notification on a per-host basis.

What happens now

Some names' own nameservers rotate their answers: in the trial run (#149), github.com answered 140.82.121.3 at one check and 140.82.121.4 at the next. Each switch sends a Record Change notification, and two nameservers answering differently at the same check sends an Inconsistency notification, so such a name notifies on almost every check. That stays the default: the README already says any observable change in a nameserver's response is notified.

Wanted

An admin can name, in the configuration, the watched names for which these two notifications are not sent. Everything else about those names, and both notifications for every other name, stays as it is.

Definition of done

  • One new environment variable, in the README configuration table, takes a comma-separated list of names from DNSWATCHER_TARGETS. For a listed name no Record Change and no Inconsistency notification is sent; its records are still checked, saved, shown on the dashboard and in /api/v1/status, and its other notifications (NS changes, NS query failure and recovery, CNAME address change, ports, TLS) are sent as before.
  • A listed name that is not in DNSWATCHER_TARGETS stops startup with a message naming it, as an invalid interval does.
  • The variable's name is chosen in the plan comment before work starts.
  • Tests run against live DNS; no mocks, per the README.
  • Later improvement: milestone 1.5, not 1.0.

Model: opus-5-5

sneak, on https://git.eeqj.de/sneak/dnswatcher/issues/233 (2026-10-03), verbatim: > if the responses are changing then that is correct to notify. file an issue for a later improvement that allows an admin to disable this specific notification on a per-host basis. ## What happens now Some names' own nameservers rotate their answers: in the trial run (https://git.eeqj.de/sneak/dnswatcher/issues/149), `github.com` answered `140.82.121.3` at one check and `140.82.121.4` at the next. Each switch sends a Record Change notification, and two nameservers answering differently at the same check sends an Inconsistency notification, so such a name notifies on almost every check. That stays the default: the README already says any observable change in a nameserver's response is notified. ## Wanted An admin can name, in the configuration, the watched names for which these two notifications are not sent. Everything else about those names, and both notifications for every other name, stays as it is. ## Definition of done - One new environment variable, in the README configuration table, takes a comma-separated list of names from `DNSWATCHER_TARGETS`. For a listed name no Record Change and no Inconsistency notification is sent; its records are still checked, saved, shown on the dashboard and in `/api/v1/status`, and its other notifications (NS changes, NS query failure and recovery, CNAME address change, ports, TLS) are sent as before. - A listed name that is not in `DNSWATCHER_TARGETS` stops startup with a message naming it, as an invalid interval does. - The variable's name is chosen in the plan comment before work starts. - Tests run against live DNS; no mocks, per the README. - Later improvement: milestone 1.5, not 1.0. Model: opus-5-5
clawbot added this to the 1.5 milestone 2026-10-03 14:22:50 +02:00
Author
Collaborator

Plan. The variable is DNSWATCHER_SKIP_RECORD_NOTIFICATIONS, empty by default: a comma-separated list of names from DNSWATCHER_TARGETS, read and normalised as the targets are (letter case, trailing dot, repeats).

  • internal/config: a new Config field holds the listed names. A listed name that is not a target stops startup with an error naming it, an exported error value like ErrNoTargets.
  • internal/watcher: detectRecordChanges and detectInconsistencies send nothing for a listed name. Everything else detectHostnameChanges does, and all saving of state, is unchanged. Apex domains and hostnames alike.
  • README: a row in the Environment Variables table, and one sentence under Record change and Inconsistency detected naming this exception to "any observable change triggers a notification".
  • Tests: config tests for parsing, normalising and the unknown-name error. Watcher tests that seed earlier state live DNS cannot match, as the existing record change and inconsistency tests do, and show a listed name gets neither notification and still has its state saved, while an unlisted name in the same run still gets both. Live DNS only, no mocks.
  • TODO.md updated in the same commit.

Model: opus-5-5

Plan. The variable is `DNSWATCHER_SKIP_RECORD_NOTIFICATIONS`, empty by default: a comma-separated list of names from `DNSWATCHER_TARGETS`, read and normalised as the targets are (letter case, trailing dot, repeats). - `internal/config`: a new `Config` field holds the listed names. A listed name that is not a target stops startup with an error naming it, an exported error value like `ErrNoTargets`. - `internal/watcher`: `detectRecordChanges` and `detectInconsistencies` send nothing for a listed name. Everything else `detectHostnameChanges` does, and all saving of state, is unchanged. Apex domains and hostnames alike. - README: a row in the Environment Variables table, and one sentence under Record change and Inconsistency detected naming this exception to "any observable change triggers a notification". - Tests: config tests for parsing, normalising and the unknown-name error. Watcher tests that seed earlier state live DNS cannot match, as the existing record change and inconsistency tests do, and show a listed name gets neither notification and still has its state saved, while an unlisted name in the same run still gets both. Live DNS only, no mocks. - `TODO.md` updated in the same commit. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/dnswatcher#255