The IPinfo Lite file as a second lookup source #22

Open
opened 2026-09-25 11:01:48 +02:00 by clawbot · 2 comments
Collaborator

The local IPinfo Lite database as a lookup source beside GeoJS (LOOKUP_SOURCE=file), as the lookup settings in SPEC.md (#9) describe. Milestone 2 uses GeoJS only, as #11 proposed.

Not scheduled: it waits for sneak to put it in a milestone.

Model: opus-5-5

The local IPinfo Lite database as a lookup source beside GeoJS (`LOOKUP_SOURCE=file`), as the lookup settings in `SPEC.md` (https://git.eeqj.de/sneak/smallwebwaf/pulls/9) describe. Milestone 2 uses GeoJS only, as https://git.eeqj.de/sneak/smallwebwaf/issues/11 proposed. Not scheduled: it waits for sneak to put it in a milestone. Model: opus-5-5
Author
Collaborator

Plan. The build order in SPEC.md puts the lookup from the file or GeoJS in the third stage. Built after #95 (every client looked up, SWWAF_LOOKUP_SOURCE), as "Lookup of AS number and country" gives it. One PR to next.

  • SWWAF_LOOKUP_SOURCE=file with SWWAF_LOOKUP_DB_PATH: the IPinfo Lite .mmdb file, its asn, as_name and country_code read for every client, at once, with no wait and nothing sent off the host. file without the path, or the path with any other source, stops the start naming both; a file missing or unreadable at start stops the start.
  • The file read with the widely used MaxMind DB reader for Go (github.com/oschwald/maxminddb-golang, its current major version), recorded in ~/.claude/GO_PACKAGE_DEFAULTS.md as the choice for .mmdb files.
  • A replaced file is noticed and read again; a replacement that cannot be read is logged and sent as one file_error alert, and the file already loaded stays in use. README.md says to mount the directory, not the file.
  • Metrics: the file's load time and failed reloads, as "Metrics endpoint" gives them.

Definition of done: tests, with a small .mmdb file built in the test (the reader's own writer or a checked-in fixture whose making is documented), show a client placed from the file, an address missing from it as unknown, each start error, a replacement taken in and a broken replacement keeping the old file with one file_error alert; each test failing with its rule broken; make check green; one PR to next, passed by a reviewer who did not write it.

Model: opus-5-5

Plan. The build order in `SPEC.md` puts the lookup from the file or GeoJS in the third stage. Built after https://git.eeqj.de/sneak/smallwebwaf/issues/95 (every client looked up, `SWWAF_LOOKUP_SOURCE`), as "Lookup of AS number and country" gives it. One PR to `next`. - `SWWAF_LOOKUP_SOURCE=file` with `SWWAF_LOOKUP_DB_PATH`: the IPinfo Lite `.mmdb` file, its `asn`, `as_name` and `country_code` read for every client, at once, with no wait and nothing sent off the host. `file` without the path, or the path with any other source, stops the start naming both; a file missing or unreadable at start stops the start. - The file read with the widely used MaxMind DB reader for Go (`github.com/oschwald/maxminddb-golang`, its current major version), recorded in `~/.claude/GO_PACKAGE_DEFAULTS.md` as the choice for `.mmdb` files. - A replaced file is noticed and read again; a replacement that cannot be read is logged and sent as one `file_error` alert, and the file already loaded stays in use. `README.md` says to mount the directory, not the file. - Metrics: the file's load time and failed reloads, as "Metrics endpoint" gives them. Definition of done: tests, with a small `.mmdb` file built in the test (the reader's own writer or a checked-in fixture whose making is documented), show a client placed from the file, an address missing from it as unknown, each start error, a replacement taken in and a broken replacement keeping the old file with one `file_error` alert; each test failing with its rule broken; `make check` green; one PR to `next`, passed by a reviewer who did not write it. Model: opus-5-5
clawbot self-assigned this 2026-10-07 05:55:39 +02:00
Author
Collaborator

Built in #98, waiting for review.

Model: opus-5-5

Built in https://git.eeqj.de/sneak/smallwebwaf/pulls/98, waiting for review. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/smallwebwaf#22