The AS page now lists its IPv4 prefixes and its IPv6 prefixes by mask length, shortest first, so a /16 comes before a /24. Prefixes with the same mask length are listed by network address. Before, both lists were sorted by network address, then by mask length.
The sort function in internal/server/handlers.go is renamed from sortRoutesByNetwork to sortRoutesByMaskLength. A new test sorts a mixed IPv4 list and a mixed IPv6 list.
Judgement call: the JSON answer of /api/v1/as/{asn} is unchanged. Its handler does not sort, so its lists keep the order the database reads them in. The page and the API list prefixes in different orders.
The README states no order for the AS page, so it is unchanged.
A prefix that does not parse sorts before the others instead of failing the page. Stored prefixes always parse.
The AS page now lists its IPv4 prefixes and its IPv6 prefixes by mask length, shortest first, so a /16 comes before a /24. Prefixes with the same mask length are listed by network address. Before, both lists were sorted by network address, then by mask length.
The sort function in `internal/server/handlers.go` is renamed from `sortRoutesByNetwork` to `sortRoutesByMaskLength`. A new test sorts a mixed IPv4 list and a mixed IPv6 list.
- Judgement call: the JSON answer of `/api/v1/as/{asn}` is unchanged. Its handler does not sort, so its lists keep the order the database reads them in. The page and the API list prefixes in different orders.
- The README states no order for the AS page, so it is unchanged.
- A prefix that does not parse sorts before the others instead of failing the page. Stored prefixes always parse.
Closes https://git.eeqj.de/sneak/routewatch/issues/153
Model: opus-5-5
The AS page sorted its IPv4 and IPv6 prefix lists by network address,
then by mask length. It now sorts them by mask length, shortest first,
and by network address within one mask length, so a /16 comes before a
/24. The sort function is renamed from sortRoutesByNetwork to
sortRoutesByMaskLength to say so.
The handler of /api/v1/as/{asn} does not sort its lists, so it is
unchanged.
Model: opus-5-5
PASS: the AS page now lists its IPv4 and IPv6 prefixes by mask length, shortest first, and by numeric network address within one mask length, as #153 asks.
Judgement call: the new test checks the sort function, not the AS page itself. I accepted that because the page's call to the function changed only its name.
Model: opus-5-5
PASS: the AS page now lists its IPv4 and IPv6 prefixes by mask length, shortest first, and by numeric network address within one mask length, as https://git.eeqj.de/sneak/routewatch/issues/153 asks.
- Judgement call: the new test checks the sort function, not the AS page itself. I accepted that because the page's call to the function changed only its name.
Model: opus-5-5
clawbot
merged commit 2375480e2e into next2026-10-27 04:37:18 +01:00
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.
The AS page now lists its IPv4 prefixes and its IPv6 prefixes by mask length, shortest first, so a /16 comes before a /24. Prefixes with the same mask length are listed by network address. Before, both lists were sorted by network address, then by mask length.
The sort function in
internal/server/handlers.gois renamed fromsortRoutesByNetworktosortRoutesByMaskLength. A new test sorts a mixed IPv4 list and a mixed IPv6 list./api/v1/as/{asn}is unchanged. Its handler does not sort, so its lists keep the order the database reads them in. The page and the API list prefixes in different orders.Closes #153
Model: opus-5-5
The AS page sorted its IPv4 and IPv6 prefix lists by network address, then by mask length. It now sorts them by mask length, shortest first, and by network address within one mask length, so a /16 comes before a /24. The sort function is renamed from sortRoutesByNetwork to sortRoutesByMaskLength to say so. The handler of /api/v1/as/{asn} does not sort its lists, so it is unchanged. Model: opus-5-5PASS: the AS page now lists its IPv4 and IPv6 prefixes by mask length, shortest first, and by numeric network address within one mask length, as #153 asks.
Model: opus-5-5