README endpoint list and database schema do not match the code #72

Open
opened 2026-10-14 14:50:33 +02:00 by clawbot · 1 comment
Collaborator

README "HTTP Endpoints" and "Database Schema" describe behaviour the code does not have:

  • GET / "Redirects to /status"; handleIndex in internal/server/handlers.go serves a home page.
  • GET /ip/{ip} "Redirects to prefix containing the IP"; it answers the same JSON as /api/v1/ip/{ip} (setupRoutes in internal/server/routes.go). Missing from the list: /ip/ with no address looks up the caller's address, both IP endpoints accept host names and comma-separated lists, and /.well-known/healthcheck.json.
  • "Database Schema" shows asns(id, number, ...); the table is keyed by asn and has the WHOIS columns. prefixes_v4 and prefixes_v6 are shown with mask_length, which they do not have, and bgp_peers without first_seen.

Failure scenario: a client written from the README expects a redirect from /ip/192.0.2.1 and gets a JSON body.

Severity: low

Definition of done

  • README "HTTP Endpoints" lists every route in setupRoutes with what it returns, and "Database Schema" matches internal/database/schema.sql.
  • make check passes, with make fmt applied to the README.

Model: opus-5-5

README "HTTP Endpoints" and "Database Schema" describe behaviour the code does not have: - `GET /` "Redirects to /status"; `handleIndex` in `internal/server/handlers.go` serves a home page. - `GET /ip/{ip}` "Redirects to prefix containing the IP"; it answers the same JSON as `/api/v1/ip/{ip}` (`setupRoutes` in `internal/server/routes.go`). Missing from the list: `/ip/` with no address looks up the caller's address, both IP endpoints accept host names and comma-separated lists, and `/.well-known/healthcheck.json`. - "Database Schema" shows `asns(id, number, ...)`; the table is keyed by `asn` and has the WHOIS columns. `prefixes_v4` and `prefixes_v6` are shown with `mask_length`, which they do not have, and `bgp_peers` without `first_seen`. Failure scenario: a client written from the README expects a redirect from `/ip/192.0.2.1` and gets a JSON body. Severity: low ## Definition of done - README "HTTP Endpoints" lists every route in `setupRoutes` with what it returns, and "Database Schema" matches `internal/database/schema.sql`. - `make check` passes, with `make fmt` applied to the README. Model: opus-5-5
clawbot self-assigned this 2026-10-14 14:50:33 +02:00
Author
Collaborator

Plan: this unit runs last, after the other open fixes have landed on next. Besides the README endpoint list and schema, it brings TODO.md up to date for every issue closed in this round (one dated Completed Steps line each, Status and Next Step current). The fix PRs leave TODO.md alone so that a dozen PRs in flight at once do not all conflict on its first lines; a review finding that a fix PR lacks its TODO.md line is answered by this plan.

Model: opus-5-5

Plan: this unit runs last, after the other open fixes have landed on `next`. Besides the README endpoint list and schema, it brings `TODO.md` up to date for every issue closed in this round (one dated Completed Steps line each, Status and Next Step current). The fix PRs leave `TODO.md` alone so that a dozen PRs in flight at once do not all conflict on its first lines; a review finding that a fix PR lacks its `TODO.md` line is answered by this plan. 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/routewatch#72