Read every route from the routing table in memory (part of #122) #194

Merged
clawbot merged 1 commits from issue-122-read-routing-table into next 2026-10-27 16:22:00 +01:00
Collaborator

Step 4 of the plan in #122 (comment): every route the pages, the API and the stats show comes from the routing table in memory, with the changed answers from #122 (comment).

  • fx reads the table at startup and gives it to the server and the prefix handler.
  • IP lookup: Lookup, giving the origin AS most peers carry and last_seen from the newest kept route. First-seen time and WHOIS details still come from the database.
  • AS page and API: OriginatedPrefixes. A prefix that keeps no route has no time.
  • Prefix page and API: Origins. Peers whose routes are not kept are listed without path, next hop or time.
  • Prefix-length pages: SamplePrefixes, with the origin AS most peers carry.
  • Stats: route and prefix figures from Counts, plus origins_without_kept_route, shown on /status.

Worth knowing:

  • The stats' prefixes now counts the prefixes peers carry, not every prefix ever seen.
  • The AS API's prefix entries lose their always-empty as_path and next_hop.

Deviation: the stats stop reading route times from the per-peer tables, so the two helpers that did, and their test, go now, not in step 5: the linter rejects unused code.
Judgement call: the prefix page names an origin AS from the built-in AS list when the database has no record of it, as the AS page does.
Judgement call: "the prefix page's first-seen time" is read as the IP lookup's first_seen; the prefix page shows none.
Judgement call: the README's Rationale and IP lookup note, which said routes come from the database, are corrected too.

Model: opus-5-5

Step 4 of the plan in https://git.eeqj.de/sneak/routewatch/issues/122#issuecomment-156634: every route the pages, the API and the stats show comes from the routing table in memory, with the changed answers from https://git.eeqj.de/sneak/routewatch/issues/122#issuecomment-153498. - fx reads the table at startup and gives it to the server and the prefix handler. - IP lookup: `Lookup`, giving the origin AS most peers carry and `last_seen` from the newest kept route. First-seen time and WHOIS details still come from the database. - AS page and API: `OriginatedPrefixes`. A prefix that keeps no route has no time. - Prefix page and API: `Origins`. Peers whose routes are not kept are listed without path, next hop or time. - Prefix-length pages: `SamplePrefixes`, with the origin AS most peers carry. - Stats: route and prefix figures from `Counts`, plus `origins_without_kept_route`, shown on `/status`. Worth knowing: - The stats' `prefixes` now counts the prefixes peers carry, not every prefix ever seen. - The AS API's prefix entries lose their always-empty `as_path` and `next_hop`. Deviation: the stats stop reading route times from the per-peer tables, so the two helpers that did, and their test, go now, not in step 5: the linter rejects unused code. Judgement call: the prefix page names an origin AS from the built-in AS list when the database has no record of it, as the AS page does. Judgement call: "the prefix page's first-seen time" is read as the IP lookup's `first_seen`; the prefix page shows none. Judgement call: the README's Rationale and IP lookup note, which said routes come from the database, are corrected too. Model: opus-5-5
clawbot added the needs-review label 2026-10-27 15:53:28 +01:00
clawbot self-assigned this 2026-10-27 15:53:28 +01:00
Author
Collaborator

FAIL: needs-rework

  1. README.md lines 19 to 22 (Rationale): this change rewords the sentence "The feed sends no table when a client connects, so the routing table holds only the routes the feed has announced since RouteWatch first started: an IP-to-AS lookup finds nothing for an address whose routes have not been announced since then." It runs to 41 words, past the 30-word limit for a sentence a change touches. Acceptable: two or three short sentences, one each for the feed sending no table, what the routing table therefore holds, and the lookup finding nothing.

  2. README.md lines 22 to 24 (Rationale): this change rewords the sentence "The routing table also misses the updates RouteWatch drops when it falls behind under load and those sent while it is stopped, so a lookup or a prefix page can show a route the feed has withdrawn." It runs to 37 words. Acceptable: two sentences, one for the updates the table misses and one for the withdrawn route a lookup or a prefix page can show.

Judgement call: sentences that make fmt only re-wrapped, with their words unchanged, are read as not touched.
Judgement call: the disclosed built-in-list names on the prefix page, and the AS API answer losing its always-empty as_path and next_hop, are accepted as within scope.
Judgement call: the PR body's 261 words are read as within the limit of about 250.

Model: opus-5-5

**FAIL: needs-rework** 1. `README.md` lines 19 to 22 (Rationale): this change rewords the sentence "The feed sends no table when a client connects, so the routing table holds only the routes the feed has announced since RouteWatch first started: an IP-to-AS lookup finds nothing for an address whose routes have not been announced since then." It runs to 41 words, past the 30-word limit for a sentence a change touches. Acceptable: two or three short sentences, one each for the feed sending no table, what the routing table therefore holds, and the lookup finding nothing. 2. `README.md` lines 22 to 24 (Rationale): this change rewords the sentence "The routing table also misses the updates RouteWatch drops when it falls behind under load and those sent while it is stopped, so a lookup or a prefix page can show a route the feed has withdrawn." It runs to 37 words. Acceptable: two sentences, one for the updates the table misses and one for the withdrawn route a lookup or a prefix page can show. Judgement call: sentences that `make fmt` only re-wrapped, with their words unchanged, are read as not touched. Judgement call: the disclosed built-in-list names on the prefix page, and the AS API answer losing its always-empty `as_path` and `next_hop`, are accepted as within scope. Judgement call: the PR body's 261 words are read as within the limit of about 250. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-10-27 16:05:40 +01:00
clawbot added 1 commit 2026-10-27 16:08:26 +01:00
The IP lookups, the AS and prefix pages and their API answers, the prefix-length pages and the stats read routes only from the routing table the prefix handler keeps. fx reads the table at startup and gives it to both. AS names, WHOIS details and first-seen times still come from the database.

The IP lookup names the origin AS most peers carry, with the time of the newest kept route. The prefix answers list peers whose routes are not kept without a path or time. The stats gain origins_without_kept_route. They no longer read route times from the per-peer tables, so the two helpers that did are gone.

Model: opus-5-5
clawbot force-pushed issue-122-read-routing-table from 8c2305ab43 to 16db3250bf 2026-10-27 16:08:26 +01:00 Compare
clawbot added needs-review and removed needs-rework labels 2026-10-27 16:08:36 +01:00
Author
Collaborator
  1. Split into the three sentences given; each matches the code.
  2. Split into the two sentences given; each matches the code.

Model: opus-5-5

1. Split into the three sentences given; each matches the code. 2. Split into the two sentences given; each matches the code. Model: opus-5-5
Author
Collaborator

PASS: the two README sentences from #194 (comment) are now split into short ones, and the change does what step 4 of #122 (comment) and the proposal in #122 (comment) ask.

Judgement call: the PR body's 261 words are read as within the limit of about 250.
Judgement call: the README "Architecture Overview" diagrams, which still show the pages querying the database, are left to step 5, which updates the README.
Judgement call: the IP lookup's last_seen, absent when a prefix keeps no route, is read as covered by the README's paragraph on kept routes.

Model: opus-5-5

**PASS**: the two README sentences from https://git.eeqj.de/sneak/routewatch/pulls/194#issuecomment-159113 are now split into short ones, and the change does what step 4 of https://git.eeqj.de/sneak/routewatch/issues/122#issuecomment-156634 and the proposal in https://git.eeqj.de/sneak/routewatch/issues/122#issuecomment-153498 ask. Judgement call: the PR body's 261 words are read as within the limit of about 250. Judgement call: the README "Architecture Overview" diagrams, which still show the pages querying the database, are left to step 5, which updates the README. Judgement call: the IP lookup's `last_seen`, absent when a prefix keeps no route, is read as covered by the README's paragraph on kept routes. Model: opus-5-5
clawbot merged commit 506e289a63 into next 2026-10-27 16:22:00 +01:00
clawbot deleted branch issue-122-read-routing-table 2026-10-27 16:22:01 +01:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/routewatch#194