Each row of the dashboard's Hostnames table listed a nameserver's record types in whatever order Go walked the record map, which changed from row to row and on every load. formatRecords in internal/handlers/dashboard.go now sorts the types by their place in the README's list (A, AAAA, CNAME, MX, TXT, SRV, CAA, NS); a type not in that list comes after them, in alphabetical order. A new test builds records for all eight types and two others and checks the exact output.
Not visible in the diff:
Values within one type were already sorted by the resolver, so the order of types was the only thing that made rows of agreeing nameservers differ.
The list is a literal inside formatRecords. The resolver's list of types it asks for (recordTypes in internal/resolver/iterative.go) holds the same types in the same order, but it is unexported and in DNS type numbers, so it is not reused.
/api/v1/status is unchanged; its JSON already lists record types sorted by name.
Disclosures:
Judgement call: types outside the README's list go in alphabetical order; the issue says only that they come after.
Model: opus-5-5
Closes https://git.eeqj.de/sneak/dnswatcher/issues/226
Each row of the dashboard's Hostnames table listed a nameserver's record types in whatever order Go walked the record map, which changed from row to row and on every load. `formatRecords` in `internal/handlers/dashboard.go` now sorts the types by their place in the README's list (A, AAAA, CNAME, MX, TXT, SRV, CAA, NS); a type not in that list comes after them, in alphabetical order. A new test builds records for all eight types and two others and checks the exact output.
Not visible in the diff:
- Values within one type were already sorted by the resolver, so the order of types was the only thing that made rows of agreeing nameservers differ.
- The list is a literal inside `formatRecords`. The resolver's list of types it asks for (`recordTypes` in `internal/resolver/iterative.go`) holds the same types in the same order, but it is unexported and in DNS type numbers, so it is not reused.
- `/api/v1/status` is unchanged; its JSON already lists record types sorted by name.
Disclosures:
- Judgement call: types outside the README's list go in alphabetical order; the issue says only that they come after.
Model: opus-5-5
Each row of the Hostnames table listed a nameserver's record types in
the order Go happens to walk the record map, which changed from row to
row and on every page load, so two nameservers with the same records
looked different. formatRecords now sorts the types by their place in
the README's list (A, AAAA, CNAME, MX, TXT, SRV, CAA, NS); any other
type comes after them in alphabetical order. Values within a type were
already sorted by the resolver.
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.
Closes #226
Each row of the dashboard's Hostnames table listed a nameserver's record types in whatever order Go walked the record map, which changed from row to row and on every load.
formatRecordsininternal/handlers/dashboard.gonow sorts the types by their place in the README's list (A, AAAA, CNAME, MX, TXT, SRV, CAA, NS); a type not in that list comes after them, in alphabetical order. A new test builds records for all eight types and two others and checks the exact output.Not visible in the diff:
formatRecords. The resolver's list of types it asks for (recordTypesininternal/resolver/iterative.go) holds the same types in the same order, but it is unexported and in DNS type numbers, so it is not reused./api/v1/statusis unchanged; its JSON already lists record types sorted by name.Disclosures:
Model: opus-5-5
Review passed on
f4d71f2.Model: opus-5-5