Skip live network feed test under -short for deterministic make check (closes #2) #4

Merged
clawbot merged 1 commits from issue-2-short-skip-live-test into next 2026-09-21 09:05:34 +02:00
Collaborator

Guards the live-network integration test so make check is deterministic
and offline. Closes #2

What changed:

  • TestRouteWatchLiveFeed (which streams the live RIPE RIS feed for about
    five seconds) now skips under testing.Short().
  • script/test passes -short in both go test invocations, so the
    default suite and CI run offline.
  • README documents how to run the live test on demand (go test without
    -short).

No production (non-test) code changed.

Data race: the race noted on the issue is on the peeringHandler field of
RouteWatch. The test reads it at
internal/routewatch/app_integration_test.go:475 while RouteWatch.Run
writes it unsynchronized at internal/routewatch/app.go:93; the write is
non-test code and is not fixed here, per the plan. Skipping the test
removes it from make check.

Verification: script/test (with -race -short) is green and identical
across repeated runs, with the live test skipped; script/fmt-check is
green.

Disclosure: host golangci-lint (built with go1.25) crashes on this
host's go1.26 standard library, so make check cannot finish lint on the
host — a pre-existing host toolchain skew, unrelated to this change. I ran
lint in a matching Docker image (golangci/golangci-lint:v2.7.2) instead:
0 issues.

Model: opus-4-8

Guards the live-network integration test so `make check` is deterministic and offline. Closes https://git.eeqj.de/sneak/routewatch/issues/2 What changed: - `TestRouteWatchLiveFeed` (which streams the live RIPE RIS feed for about five seconds) now skips under `testing.Short()`. - `script/test` passes `-short` in both `go test` invocations, so the default suite and CI run offline. - README documents how to run the live test on demand (`go test` without `-short`). No production (non-test) code changed. Data race: the race noted on the issue is on the `peeringHandler` field of `RouteWatch`. The test reads it at `internal/routewatch/app_integration_test.go:475` while `RouteWatch.Run` writes it unsynchronized at `internal/routewatch/app.go:93`; the write is non-test code and is not fixed here, per the plan. Skipping the test removes it from `make check`. Verification: `script/test` (with `-race -short`) is green and identical across repeated runs, with the live test skipped; `script/fmt-check` is green. Disclosure: host `golangci-lint` (built with go1.25) crashes on this host's go1.26 standard library, so `make check` cannot finish lint on the host — a pre-existing host toolchain skew, unrelated to this change. I ran lint in a matching Docker image (`golangci/golangci-lint:v2.7.2`) instead: 0 issues. Model: opus-4-8
clawbot added the needs-review label 2026-09-21 08:50:45 +02:00
clawbot self-assigned this 2026-09-21 08:50:45 +02:00
clawbot added 1 commit 2026-09-21 08:50:45 +02:00
TestRouteWatchLiveFeed streams the live RIPE RIS feed for about five
seconds, which made make check nondeterministic and network-dependent.
Guard it with a testing.Short() skip and pass -short in both go test
lines of script/test, so the default suite runs offline and
deterministically. The README documents how to run the live test on
demand.

Test-only change; no production behavior changes.

Model: opus-4-8
Author
Collaborator

FAIL — one finding.

Data-race location in the PR body is wrong. The body states the test reads peeringHandler at internal/routewatch/app_integration_test.go:472; on the merged tree line 472 is time.Sleep(5 * time.Second), and the actual read (if rw.peeringHandler != nil) is at line 475 — the three added skip lines shifted it. The write location (internal/routewatch/app.go:93) and the field name are correct. The same wrong line appears in the implementation comment on #2. Acceptable: cite line 475 for the read (or describe it without a fixed line number) in both the PR body and that comment. No code change is needed; the diff itself is test-only and otherwise sound.

Deviation: make lint cannot run on this host (the installed golangci-lint predates the host Go toolchain), so I ran the linter from the official golangci/golangci-lint:v2.7.2 container image against the tree instead.

Model: opus-4-8

FAIL — one finding. Data-race location in the PR body is wrong. The body states the test reads `peeringHandler` at `internal/routewatch/app_integration_test.go:472`; on the merged tree line 472 is `time.Sleep(5 * time.Second)`, and the actual read (`if rw.peeringHandler != nil`) is at line 475 — the three added skip lines shifted it. The write location (`internal/routewatch/app.go:93`) and the field name are correct. The same wrong line appears in the implementation comment on https://git.eeqj.de/sneak/routewatch/issues/2. Acceptable: cite line 475 for the read (or describe it without a fixed line number) in both the PR body and that comment. No code change is needed; the diff itself is test-only and otherwise sound. Deviation: `make lint` cannot run on this host (the installed `golangci-lint` predates the host Go toolchain), so I ran the linter from the official `golangci/golangci-lint:v2.7.2` container image against the tree instead. Model: opus-4-8
clawbot added needs-rework and removed needs-review labels 2026-09-21 08:57:52 +02:00
clawbot added needs-review and removed needs-rework labels 2026-09-21 08:59:57 +02:00
Author
Collaborator

PASS — test-only guard is correct and minimal: TestRouteWatchLiveFeed skips under testing.Short(), both go test lines in script/test pass -short, the README accurately documents running it on demand, no production code changed, the definition of done is met, and the corrected data-race statement (read at internal/routewatch/app_integration_test.go:475, unsynchronized write at internal/routewatch/app.go:93) matches the tree in both the PR body and the comment on #2.

Deviation: make lint cannot run on this host (installed golangci-lint predates the host Go toolchain), so I ran the linter from the official golangci/golangci-lint:v2.7.2 container image against the rebased tree instead.

Model: opus-4-8

PASS — test-only guard is correct and minimal: `TestRouteWatchLiveFeed` skips under `testing.Short()`, both `go test` lines in `script/test` pass `-short`, the README accurately documents running it on demand, no production code changed, the definition of done is met, and the corrected data-race statement (read at `internal/routewatch/app_integration_test.go:475`, unsynchronized write at `internal/routewatch/app.go:93`) matches the tree in both the PR body and the comment on https://git.eeqj.de/sneak/routewatch/issues/2. Deviation: `make lint` cannot run on this host (installed `golangci-lint` predates the host Go toolchain), so I ran the linter from the official `golangci/golangci-lint:v2.7.2` container image against the rebased tree instead. Model: opus-4-8
clawbot merged commit b0cd884019 into next 2026-09-21 09:05:34 +02:00
clawbot deleted branch issue-2-short-skip-live-test 2026-09-21 09:05:34 +02:00
clawbot removed the needs-review label 2026-09-21 09:05:34 +02: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#4