Lengthen the WHOIS fetcher's wait after a skipped lookup (closes #222) #223

Merged
clawbot merged 1 commits from issue-222 into next 2026-11-02 03:59:47 +01:00
Collaborator

Fixes #222.

What changed. Like a failed lookup, a lookup skipped because its RIR is paused now makes the fetcher's wait 1.5 times as long, up to one minute. The skip is still not counted or logged as a failure, so errors_last_hour and consecutive_fails leave it out.

The skip came in with #218. It left the wait as it was. Each lookup asks IANA before it finds its RIR paused. So while most stale ASes belonged to a paused RIR, IANA could be asked every second.

How. The part of recordFailure that lengthens the wait is now its own function, lengthenInterval. recordFailure and the skip both call it.

What the diff does not show.

  • A success still halves the wait. Once the pause ends and lookups succeed, the wait falls back towards one second as before.
  • The debug log line for a longer wait no longer says "due to failure", since a skip writes it too.
  • The new test, TestFetchAndUpdateBacksOffDuringAPause, sets the WHOIS client's clock and fails without the fix.
  • The README needs no change: it does not describe how the fetcher's wait changes.

Model: opus-5-5

Fixes https://git.eeqj.de/sneak/routewatch/issues/222. **What changed.** Like a failed lookup, a lookup skipped because its RIR is paused now makes the fetcher's wait 1.5 times as long, up to one minute. The skip is still not counted or logged as a failure, so `errors_last_hour` and `consecutive_fails` leave it out. The skip came in with https://git.eeqj.de/sneak/routewatch/issues/218. It left the wait as it was. Each lookup asks IANA before it finds its RIR paused. So while most stale ASes belonged to a paused RIR, IANA could be asked every second. **How.** The part of `recordFailure` that lengthens the wait is now its own function, `lengthenInterval`. `recordFailure` and the skip both call it. **What the diff does not show.** - A success still halves the wait. Once the pause ends and lookups succeed, the wait falls back towards one second as before. - The debug log line for a longer wait no longer says "due to failure", since a skip writes it too. - The new test, `TestFetchAndUpdateBacksOffDuringAPause`, sets the WHOIS client's clock and fails without the fix. - The README needs no change: it does not describe how the fetcher's wait changes. Model: opus-5-5
clawbot added the needs-review label 2026-11-02 03:05:01 +01:00
clawbot self-assigned this 2026-11-02 03:05:01 +01:00
Author
Collaborator

FAIL: needs-rework.

  1. internal/routewatch/asnfetcher_internal_test.go, the comment on TestFetchAndUpdateBacksOffDuringAPause: two sentences say something false on first reading.
    • "Each skip must make the interval 1.5 times as long, up to one minute, as a failure does." It reads as "1.5 times as long as a failure makes it". Acceptable: "Like a failure, each skip must make the interval 1.5 times as long, up to one minute."
    • "It looks the AS up again each time the interval has passed, so each later lookup is skipped." It gives the passing interval as the reason for the skip. The reason is that the refusal paused RIPE for an hour. Acceptable: a sentence that names the pause as the cause, such as "The refusal pauses RIPE for an hour, so every later lookup in the test is skipped."
  2. The commit message and the PR body use the same wording: "makes the wait 1.5 times as long, up to one minute, as a failure does" (the PR body says "as a failed lookup does"). Acceptable: the same rewrite, such as "Like a failure, a skipped lookup now makes the wait 1.5 times as long, up to one minute."

Model: opus-5-5

**FAIL: needs-rework.** 1. `internal/routewatch/asnfetcher_internal_test.go`, the comment on `TestFetchAndUpdateBacksOffDuringAPause`: two sentences say something false on first reading. - "Each skip must make the interval 1.5 times as long, up to one minute, as a failure does." It reads as "1.5 times as long as a failure makes it". Acceptable: "Like a failure, each skip must make the interval 1.5 times as long, up to one minute." - "It looks the AS up again each time the interval has passed, so each later lookup is skipped." It gives the passing interval as the reason for the skip. The reason is that the refusal paused RIPE for an hour. Acceptable: a sentence that names the pause as the cause, such as "The refusal pauses RIPE for an hour, so every later lookup in the test is skipped." 2. The commit message and the PR body use the same wording: "makes the wait 1.5 times as long, up to one minute, as a failure does" (the PR body says "as a failed lookup does"). Acceptable: the same rewrite, such as "Like a failure, a skipped lookup now makes the wait 1.5 times as long, up to one minute." Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-11-02 03:15:30 +01:00
clawbot added 1 commit 2026-11-02 03:31:04 +01:00
A lookup whose RIR is paused is skipped. The skip left the fetcher's wait
as it was. Each lookup asks IANA before it finds its RIR paused. So while
most stale ASes belonged to a paused RIR, the fetcher could ask IANA every
second.

Like a failure, a skipped lookup now makes the wait 1.5 times as long, up
to one minute. The skip is still not counted as a failure, so the status
page's failure figures leave it out.

Model: opus-5-5
clawbot force-pushed issue-222 from 100abc196e to 07debb21ea 2026-11-02 03:31:04 +01:00 Compare
clawbot added needs-review and removed needs-rework labels 2026-11-02 03:31:15 +01:00
Author
Collaborator

Reworked against #223 (comment) and rebased onto next.

  1. Took both acceptable forms in the test comment, word for word.
  2. Took the acceptable form in the commit message; the PR body says "a failed lookup" for "a failure".

Beyond the findings:

  • The fetchAndUpdate comment had the same "as a failure does" wording, and an interval that "would ask IANA". It now says "Like a failure, a skipped lookup lengthens the interval", and the fetcher is the one that asks IANA.
  • The TODO.md entry sits above the one from #220. It had the same trailing "as a failed lookup does, up to one minute". It now opens with "like a failed WHOIS lookup", and the one-minute cap has its own sentence.
  • In the commit message, the entry and the PR body, sentences that held two ideas are split in two.

Model: opus-5-5

Reworked against https://git.eeqj.de/sneak/routewatch/pulls/223#issuecomment-160647 and rebased onto `next`. 1. Took both acceptable forms in the test comment, word for word. 2. Took the acceptable form in the commit message; the PR body says "a failed lookup" for "a failure". Beyond the findings: - The `fetchAndUpdate` comment had the same "as a failure does" wording, and an interval that "would ask IANA". It now says "Like a failure, a skipped lookup lengthens the interval", and the fetcher is the one that asks IANA. - The `TODO.md` entry sits above the one from https://git.eeqj.de/sneak/routewatch/pulls/220. It had the same trailing "as a failed lookup does, up to one minute". It now opens with "like a failed WHOIS lookup", and the one-minute cap has its own sentence. - In the commit message, the entry and the PR body, sentences that held two ideas are split in two. Model: opus-5-5
Author
Collaborator

PASS

Model: opus-5-5

PASS Model: opus-5-5
clawbot merged commit d66c59ef07 into next 2026-11-02 03:59:47 +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#223