Record values now carry DNS names in lower case. extractRecordValue in internal/resolver/iterative.go lower-cases CNAME, MX, SRV and NS targets; A, AAAA, TXT and CAA values are formatted as before. DNS names are case-insensitive, and one nameserver for eeqj.de answers in upper case while the others answer in lower case, so the inconsistency check fired on every DNS cycle.
Because the values are lower-cased where they are built, the inconsistency check and the record-change check both compare equal strings; recordsEqual in the watcher is untouched. The dashboard, alerts and state file show the lower-case spelling. extractNSSet in the same file already lower-cases nameserver names the same way.
The test is a table test of extractRecordValue, reached through a new internal/resolver/export_test.go (the pattern other packages here use). It builds records in the test and formats them; no resolver, server or response is involved. The README hostname section gains one line on the lower-casing.
State saved before this change can hold upper-case names; the first check after upgrading reports a one-time record change for those records. dnswatcher is not deployed anywhere yet.
Judgement call: the CAA tag keeps exact comparison along with the CAA value, as the issue asks, although CAA tags are themselves case-insensitive.
Model: opus-5-5
Record values now carry DNS names in lower case. `extractRecordValue` in `internal/resolver/iterative.go` lower-cases CNAME, MX, SRV and NS targets; A, AAAA, TXT and CAA values are formatted as before. DNS names are case-insensitive, and one nameserver for `eeqj.de` answers in upper case while the others answer in lower case, so the inconsistency check fired on every DNS cycle.
Because the values are lower-cased where they are built, the inconsistency check and the record-change check both compare equal strings; `recordsEqual` in the watcher is untouched. The dashboard, alerts and state file show the lower-case spelling. `extractNSSet` in the same file already lower-cases nameserver names the same way.
The test is a table test of `extractRecordValue`, reached through a new `internal/resolver/export_test.go` (the pattern other packages here use). It builds records in the test and formats them; no resolver, server or response is involved. The README hostname section gains one line on the lower-casing.
Closes https://git.eeqj.de/sneak/dnswatcher/issues/157
Disclosures:
- State saved before this change can hold upper-case names; the first check after upgrading reports a one-time record change for those records. dnswatcher is not deployed anywhere yet.
- Judgement call: the CAA tag keeps exact comparison along with the CAA value, as the issue asks, although CAA tags are themselves case-insensitive.
Model: opus-5-5
README.md (the new bullet in the hostname monitoring section) and the new comment on extractRecordValue in internal/resolver/iterative.go say TXT and CAA values are stored or kept "exactly as received". That is not true of the tree: the separate strings of a TXT record are joined into one, and quotes, backslashes and non-ASCII bytes are stored as escape sequences. Acceptable: say in both places that TXT and CAA values keep their letter case (are not lower-cased), without claiming they are stored exactly as received.
Model: opus-5-5
- `README.md` (the new bullet in the hostname monitoring section) and the new comment on `extractRecordValue` in `internal/resolver/iterative.go` say TXT and CAA values are stored or kept "exactly as received". That is not true of the tree: the separate strings of a TXT record are joined into one, and quotes, backslashes and non-ASCII bytes are stored as escape sequences. Acceptable: say in both places that TXT and CAA values keep their letter case (are not lower-cased), without claiming they are stored exactly as received.
Model: opus-5-5
Nameservers may answer with DNS names in any letter case. For eeqj.de,
y.ns.joker.com answers in upper case while its peers answer in lower
case, so the inconsistency check fired on every cycle. extractRecordValue
now lower-cases CNAME, MX, SRV and NS targets, so the inconsistency check
and the record-change check both compare names regardless of case. A,
AAAA, TXT and CAA values are formatted as before. State saved before this
change can hold upper-case names, which report a one-time record change
on the first check after upgrading.
Model: opus-5-5
README.md and the comment on extractRecordValue now say TXT and CAA values keep their letter case (are not lower-cased), with no claim that they are stored exactly as received.
The PR body and commit message now say A, AAAA, TXT and CAA values are "formatted as before" instead of "unchanged", so they cannot be read as the same claim.
Model: opus-5-5
- `README.md` and the comment on `extractRecordValue` now say TXT and CAA values keep their letter case (are not lower-cased), with no claim that they are stored exactly as received.
- The PR body and commit message now say A, AAAA, TXT and CAA values are "formatted as before" instead of "unchanged", so they cannot be read as the same claim.
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.
Record values now carry DNS names in lower case.
extractRecordValueininternal/resolver/iterative.golower-cases CNAME, MX, SRV and NS targets; A, AAAA, TXT and CAA values are formatted as before. DNS names are case-insensitive, and one nameserver foreeqj.deanswers in upper case while the others answer in lower case, so the inconsistency check fired on every DNS cycle.Because the values are lower-cased where they are built, the inconsistency check and the record-change check both compare equal strings;
recordsEqualin the watcher is untouched. The dashboard, alerts and state file show the lower-case spelling.extractNSSetin the same file already lower-cases nameserver names the same way.The test is a table test of
extractRecordValue, reached through a newinternal/resolver/export_test.go(the pattern other packages here use). It builds records in the test and formats them; no resolver, server or response is involved. The README hostname section gains one line on the lower-casing.Closes #157
Disclosures:
Model: opus-5-5
README.md(the new bullet in the hostname monitoring section) and the new comment onextractRecordValueininternal/resolver/iterative.gosay TXT and CAA values are stored or kept "exactly as received". That is not true of the tree: the separate strings of a TXT record are joined into one, and quotes, backslashes and non-ASCII bytes are stored as escape sequences. Acceptable: say in both places that TXT and CAA values keep their letter case (are not lower-cased), without claiming they are stored exactly as received.Model: opus-5-5
354db6b524to1d856a66c1README.mdand the comment onextractRecordValuenow say TXT and CAA values keep their letter case (are not lower-cased), with no claim that they are stored exactly as received.Model: opus-5-5
Review passed on
1d856a6.Model: opus-5-5