Part of #203. Comes first: every later addition builds on this shape.
sneak, #203 (comment): "make the json shape better. the is_ fields should probably be a sub object, and "blocklists" is a bad term as the data inside isn't just used for blocking." and "download cap raised to 200MiB".
Change.
The term goes everywhere. The JSON field blocklists becomes ip_lists. The package internal/blocklist becomes internal/iplist (git mv), and its doc says public IP lists. Blocklists becomes IPLists, SetBlocklists becomes SetIPLists, the state directory blocklists becomes iplists, the README section "Blocklists" becomes "IP lists". Comments and log messages follow. Before 1.0 there is no installed base: no compatibility for the old field, path or directory.
Every result of an IP lookup gains a flags object (IPLookupResult in internal/server/handlers.go), present for every address, a routed one or not:
is_tor: the address is on tor_exits.
is_bogon: bogon.Prefix says the address, as a /32 or /128, is reserved.
maxDownloadSize in internal/iplist/download.go becomes 200 MiB, and the README sentence with it.
Later issues add is_vpn and is_relay to flags. Only flags that work are added here.
Tests.is_tor true and false; is_bogon for a private, a loopback and a public address, IPv4 and IPv6; a file over the old cap and under 200 MiB is accepted, without allocating 200 MiB (an io.Reader that generates bytes); the JSON keys.
Done when. No identifier, comment, log line, directory or README sentence says blocklist, except abuse.ch's and Spamhaus's own URLs; the README's IP lookup field list has flags and ip_lists. Read API_POLICIES.md in the repo before changing the response.
Model: opus-5-5
Part of https://git.eeqj.de/sneak/routewatch/issues/203. Comes first: every later addition builds on this shape.
sneak, https://git.eeqj.de/sneak/routewatch/issues/203#issuecomment-165190: "make the json shape better. the is_ fields should probably be a sub object, and "blocklists" is a bad term as the data inside isn't just used for blocking." and "download cap raised to 200MiB".
**Change.**
1. The term goes everywhere. The JSON field `blocklists` becomes `ip_lists`. The package `internal/blocklist` becomes `internal/iplist` (`git mv`), and its doc says public IP lists. `Blocklists` becomes `IPLists`, `SetBlocklists` becomes `SetIPLists`, the state directory `blocklists` becomes `iplists`, the README section "Blocklists" becomes "IP lists". Comments and log messages follow. Before 1.0 there is no installed base: no compatibility for the old field, path or directory.
2. Every result of an IP lookup gains a `flags` object (`IPLookupResult` in `internal/server/handlers.go`), present for every address, a routed one or not:
- `is_tor`: the address is on `tor_exits`.
- `is_bogon`: `bogon.Prefix` says the address, as a /32 or /128, is reserved.
3. `maxDownloadSize` in `internal/iplist/download.go` becomes 200 MiB, and the README sentence with it.
Later issues add `is_vpn` and `is_relay` to `flags`. Only flags that work are added here.
```json
before: "ptr": [...], "blocklists": [{"name": "tor_exits", "description": "...", "updated": "..."}]
after: "ptr": [...], "flags": {"is_tor": true, "is_bogon": false}, "ip_lists": [{"name": "tor_exits", "description": "...", "updated": "..."}]
```
**Tests.** `is_tor` true and false; `is_bogon` for a private, a loopback and a public address, IPv4 and IPv6; a file over the old cap and under 200 MiB is accepted, without allocating 200 MiB (an `io.Reader` that generates bytes); the JSON keys.
**Done when.** No identifier, comment, log line, directory or README sentence says blocklist, except `abuse.ch`'s and Spamhaus's own URLs; the README's IP lookup field list has `flags` and `ip_lists`. Read `API_POLICIES.md` in the repo before changing the response.
Model: opus-5-5
clawbot
self-assigned this 2026-11-10 10:15:07 +01:00
Built in #241: the rename to IP lists, the flags object and the 200 MiB limit. The PR body has the details and disclosures.
Model: opus-5-5
Built in https://git.eeqj.de/sneak/routewatch/pulls/241: the rename to IP lists, the `flags` object and the 200 MiB limit. The PR body has the details and disclosures.
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.
Part of #203. Comes first: every later addition builds on this shape.
sneak, #203 (comment): "make the json shape better. the is_ fields should probably be a sub object, and "blocklists" is a bad term as the data inside isn't just used for blocking." and "download cap raised to 200MiB".
Change.
blocklistsbecomesip_lists. The packageinternal/blocklistbecomesinternal/iplist(git mv), and its doc says public IP lists.BlocklistsbecomesIPLists,SetBlocklistsbecomesSetIPLists, the state directoryblocklistsbecomesiplists, the README section "Blocklists" becomes "IP lists". Comments and log messages follow. Before 1.0 there is no installed base: no compatibility for the old field, path or directory.flagsobject (IPLookupResultininternal/server/handlers.go), present for every address, a routed one or not:is_tor: the address is ontor_exits.is_bogon:bogon.Prefixsays the address, as a /32 or /128, is reserved.maxDownloadSizeininternal/iplist/download.gobecomes 200 MiB, and the README sentence with it.Later issues add
is_vpnandis_relaytoflags. Only flags that work are added here.Tests.
is_tortrue and false;is_bogonfor a private, a loopback and a public address, IPv4 and IPv6; a file over the old cap and under 200 MiB is accepted, without allocating 200 MiB (anio.Readerthat generates bytes); the JSON keys.Done when. No identifier, comment, log line, directory or README sentence says blocklist, except
abuse.ch's and Spamhaus's own URLs; the README's IP lookup field list hasflagsandip_lists. ReadAPI_POLICIES.mdin the repo before changing the response.Model: opus-5-5
Built in #241: the rename to IP lists, the
flagsobject and the 200 MiB limit. The PR body has the details and disclosures.Model: opus-5-5
clawbot referenced this issue2026-11-10 10:49:12 +01:00