What is wrong.script/cibuild on next at 06ae357 failed in TestQueryNameserverIP_Timeout (internal/resolver/resolver_test.go:1398): expected status timeout, got error. The same test passed on the four next heads before it, and the commit in between changes no behaviour, so the test fails on some runs only.
Where.querySingleType (internal/resolver/iterative.go) records every error that is neither a timeout nor REFUSED as a network error. When the caller's context ends, queryDNS and tryExchange return ErrContextCanceled, which is not a reply or a fault of the nameserver, yet it lands there. Since #291, classifyResponse ranks a network error above a timeout, so a nameserver that only timed out is reported as network error: context canceled.
Scenario. The test gives the query a 3-second deadline at 192.0.2.1, where nothing answers. The first try of the first record type times out at 2 seconds; the deadline ends during the second. If the next record type starts before the context reports itself done, its query returns ErrContextCanceled, and the status becomes error. The test's own comment says it chose its deadline to avoid exactly this variation.
Correct. The queryEachType doc says a query the context cut short did not fail. Such a query gives no reason about the nameserver: it is not recorded as a network error, a timeout or anything else.
Done when: an error caused by the caller's context ending is not recorded as a reason in querySingleType; a nameserver whose only failures are timeouts, with its last query cut short by the context, gets timeout; a test that does not depend on timing covers this (for example querySingleType with a context already ended records nothing); TestQueryNameserverIP_Timeout stays as it is and passes.
Plan. Package internal/resolver; no new package. The change is in querySingleType. Live DNS only in any test that sends a query; a test with a context already ended sends none. TODO.md Completed Steps entry in the same commit.
Severity: major (next is red on some runs)
Model: opus-5-5
**What is wrong.** `script/cibuild` on `next` at `06ae357` failed in `TestQueryNameserverIP_Timeout` (`internal/resolver/resolver_test.go:1398`): expected status `timeout`, got `error`. The same test passed on the four `next` heads before it, and the commit in between changes no behaviour, so the test fails on some runs only.
**Where.** `querySingleType` (`internal/resolver/iterative.go`) records every error that is neither a timeout nor REFUSED as a network error. When the caller's context ends, `queryDNS` and `tryExchange` return `ErrContextCanceled`, which is not a reply or a fault of the nameserver, yet it lands there. Since https://git.eeqj.de/sneak/dnswatcher/pulls/291, `classifyResponse` ranks a network error above a timeout, so a nameserver that only timed out is reported as `network error: context canceled`.
**Scenario.** The test gives the query a 3-second deadline at `192.0.2.1`, where nothing answers. The first try of the first record type times out at 2 seconds; the deadline ends during the second. If the next record type starts before the context reports itself done, its query returns `ErrContextCanceled`, and the status becomes `error`. The test's own comment says it chose its deadline to avoid exactly this variation.
**Correct.** The `queryEachType` doc says a query the context cut short did not fail. Such a query gives no reason about the nameserver: it is not recorded as a network error, a timeout or anything else.
**Done when:** an error caused by the caller's context ending is not recorded as a reason in `querySingleType`; a nameserver whose only failures are timeouts, with its last query cut short by the context, gets `timeout`; a test that does not depend on timing covers this (for example `querySingleType` with a context already ended records nothing); `TestQueryNameserverIP_Timeout` stays as it is and passes.
**Plan.** Package `internal/resolver`; no new package. The change is in `querySingleType`. Live DNS only in any test that sends a query; a test with a context already ended sends none. `TODO.md` Completed Steps entry in the same commit.
Severity: major (`next` is red on some runs)
Model: opus-5-5
clawbot
self-assigned this 2026-10-15 18:33:29 +02:00
#299: querySingleType records no reason for a query that ended with ErrContextCanceled, and a new test, which sends no query, checks that a nameserver whose earlier query timed out is still timeout after a query cut short by the context.
Model: opus-5-5
https://git.eeqj.de/sneak/dnswatcher/pulls/299: `querySingleType` records no reason for a query that ended with `ErrContextCanceled`, and a new test, which sends no query, checks that a nameserver whose earlier query timed out is still `timeout` after a query cut short by the context.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What is wrong.
script/cibuildonnextat06ae357failed inTestQueryNameserverIP_Timeout(internal/resolver/resolver_test.go:1398): expected statustimeout, goterror. The same test passed on the fournextheads before it, and the commit in between changes no behaviour, so the test fails on some runs only.Where.
querySingleType(internal/resolver/iterative.go) records every error that is neither a timeout nor REFUSED as a network error. When the caller's context ends,queryDNSandtryExchangereturnErrContextCanceled, which is not a reply or a fault of the nameserver, yet it lands there. Since #291,classifyResponseranks a network error above a timeout, so a nameserver that only timed out is reported asnetwork error: context canceled.Scenario. The test gives the query a 3-second deadline at
192.0.2.1, where nothing answers. The first try of the first record type times out at 2 seconds; the deadline ends during the second. If the next record type starts before the context reports itself done, its query returnsErrContextCanceled, and the status becomeserror. The test's own comment says it chose its deadline to avoid exactly this variation.Correct. The
queryEachTypedoc says a query the context cut short did not fail. Such a query gives no reason about the nameserver: it is not recorded as a network error, a timeout or anything else.Done when: an error caused by the caller's context ending is not recorded as a reason in
querySingleType; a nameserver whose only failures are timeouts, with its last query cut short by the context, getstimeout; a test that does not depend on timing covers this (for examplequerySingleTypewith a context already ended records nothing);TestQueryNameserverIP_Timeoutstays as it is and passes.Plan. Package
internal/resolver; no new package. The change is inquerySingleType. Live DNS only in any test that sends a query; a test with a context already ended sends none.TODO.mdCompleted Steps entry in the same commit.Severity: major (
nextis red on some runs)Model: opus-5-5
#299:
querySingleTyperecords no reason for a query that ended withErrContextCanceled, and a new test, which sends no query, checks that a nameserver whose earlier query timed out is stilltimeoutafter a query cut short by the context.Model: opus-5-5