resolver: a nameserver with a failed record type is not nodata (closes #253) #254

Merged
clawbot merged 1 commits from issue-253-nodata-only-when-all-answered into next 2026-10-02 13:16:43 +02:00
Collaborator

Closes #253

classifyResponse set nodata when every record type that answered had no records, even when another type's query got no usable reply. That type is listed in FailedTypes and its records are not known, so the nameserver has not said it has none. Now nodata is set only when no type's query failed. A nameserver with a failed type whose other answers were empty stays ok, the status README gives a nameserver with a failed type, and its failed types stay listed.

Not shown by the diff:

  • The watcher already saved nodata as ok, and keeps a failed type's previous records by FailedTypes, not by status, so saved state, the dashboard and notifications do not change. What changes is the status the resolver returns, which TestQueryAllNameservers_AllReturnOK checks.
  • TestClassifyResponse had expected nodata for these cases since #234; each now lists its failed type and expects ok.
  • The nodata case no longer checks for NXDOMAIN: an NXDOMAIN reply with no records is taken by the first case, so that check was always true there.

Disclosures:

  • Judgement call: a nameserver that answered NXDOMAIN for one type while another type failed stays nxdomain, as before; NXDOMAIN says the name has no records of any type.

Model: opus-5-5

Closes https://git.eeqj.de/sneak/dnswatcher/issues/253 `classifyResponse` set `nodata` when every record type that answered had no records, even when another type's query got no usable reply. That type is listed in `FailedTypes` and its records are not known, so the nameserver has not said it has none. Now `nodata` is set only when no type's query failed. A nameserver with a failed type whose other answers were empty stays `ok`, the status README gives a nameserver with a failed type, and its failed types stay listed. Not shown by the diff: - The watcher already saved `nodata` as `ok`, and keeps a failed type's previous records by `FailedTypes`, not by status, so saved state, the dashboard and notifications do not change. What changes is the status the resolver returns, which `TestQueryAllNameservers_AllReturnOK` checks. - `TestClassifyResponse` had expected `nodata` for these cases since https://git.eeqj.de/sneak/dnswatcher/pulls/234; each now lists its failed type and expects `ok`. - The `nodata` case no longer checks for NXDOMAIN: an NXDOMAIN reply with no records is taken by the first case, so that check was always true there. Disclosures: - Judgement call: a nameserver that answered NXDOMAIN for one type while another type failed stays `nxdomain`, as before; NXDOMAIN says the name has no records of any type. Model: opus-5-5
clawbot added the needs-review label 2026-10-02 13:05:59 +02:00
clawbot self-assigned this 2026-10-02 13:05:59 +02:00
clawbot added 1 commit 2026-10-02 13:06:00 +02:00
classifyResponse set nodata when every record type that answered had
no records, even when another type's query got no usable reply. That
type is listed in FailedTypes and its records are unknown, so the
nameserver has not said it has none. It now stays ok, the status
README describes for a nameserver with a failed type, and nodata is
set only when no type failed. The watcher saved nodata as ok already,
so saved state is unchanged; the live test that rejects nodata no
longer fails when one of a nameserver's queries is lost.

Model: opus-5-5
Author
Collaborator

Review passed on 62eee57.

Model: opus-5-5

Review passed on 62eee57. Model: opus-5-5
clawbot merged commit 6822996134 into next 2026-10-02 13:16:43 +02:00
clawbot deleted branch issue-253-nodata-only-when-all-answered 2026-10-02 13:16:43 +02:00
clawbot removed the needs-review label 2026-10-02 13:16:44 +02:00
Sign in to join this conversation.