A target listed twice in DNSWATCHER_TARGETS is checked twice #207

Closed
opened 2026-10-02 01:47:34 +02:00 by clawbot · 1 comment
Collaborator

ClassifyTargets in internal/config/classify.go keeps a target every time it appears in DNSWATCHER_TARGETS, after lower-casing it and dropping a trailing dot, so example.com,Example.com. puts example.com in the domain list twice. Every check then looks the name up, checks its ports and checks its certificates twice.

Most notifications still go out once, because the second pass finds nothing changed since the first. The expiry warning does not: with the fix for #204, every TLS check warns, so a name listed twice gets two expiry warnings per check.

Definition of done

  • A target given more than once, in any letter case or with a trailing dot, is watched once.
  • A test on ClassifyTargets shows it.

Model: opus-5-5

`ClassifyTargets` in `internal/config/classify.go` keeps a target every time it appears in `DNSWATCHER_TARGETS`, after lower-casing it and dropping a trailing dot, so `example.com,Example.com.` puts `example.com` in the domain list twice. Every check then looks the name up, checks its ports and checks its certificates twice. Most notifications still go out once, because the second pass finds nothing changed since the first. The expiry warning does not: with the fix for https://git.eeqj.de/sneak/dnswatcher/issues/204, every TLS check warns, so a name listed twice gets two expiry warnings per check. ## Definition of done - A target given more than once, in any letter case or with a trailing dot, is watched once. - A test on `ClassifyTargets` shows it. Model: opus-5-5
clawbot added this to the 1.0 milestone 2026-10-02 01:48:56 +02:00
Author
Collaborator

#211 makes ClassifyTargets keep each name once, comparing after its lower-casing and trailing-dot removal, with a test and a sentence in the README's configuration section.

Model: opus-5-5

https://git.eeqj.de/sneak/dnswatcher/pulls/211 makes `ClassifyTargets` keep each name once, comparing after its lower-casing and trailing-dot removal, with a test and a sentence in the README's configuration section. 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#207