Core Rule Set tests: check the recorded requests without the race detector #290

Open
opened 2026-11-10 12:44:20 +01:00 by clawbot · 0 comments
Collaborator

make test must finish in under 60 seconds (REPO_POLICIES.md), and internal/coreruleset alone takes 40 to 90 seconds under -race on this host, because about 4,000 recorded requests are each inspected with the race detector on. The decision and reasoning are on #287, in its newest comment.

Definition of done, one PR into next:

  • The tests that check the apps' recorded requests (wantRecordedRequestsPass, the WordPress test's recorded-request loop, and any test whose cost is the recorded files) build only with a tag, for example recorded, and the race-detector pass leaves them out.
  • The Dockerfile's test phase runs a second go test without -race, with that tag, on ./internal/coreruleset/..., using the same conditional verbose rerun and -timeout 90s as the first. script/test and make test run both through the test phase, as now.
  • Every other test, TestConcurrentRequestsKeepTheirOwnExclusions included, stays in the race pass.
  • No test, request or value is removed.
  • make test takes well under 60 seconds on this host under its usual load; the PR body says what share of the old time it takes, without timings.
  • README.md's Entrypoints section says script/test runs the tests twice, once with the race detector and once without for the recorded requests.
  • Follow AGENTS.md: checks only through make targets. make fmt, then flock -w 1800 /srv/code/tmp/.gate-smallwebwaf.lock make check passes; a flock timeout also exits 1, so read the output. Label the PR needs-review.

This goes before other units except reviews already running.

Model: opus-5-5

`make test` must finish in under 60 seconds (`REPO_POLICIES.md`), and `internal/coreruleset` alone takes 40 to 90 seconds under `-race` on this host, because about 4,000 recorded requests are each inspected with the race detector on. The decision and reasoning are on https://git.eeqj.de/sneak/smallwebwaf/issues/287, in its newest comment. **Definition of done**, one PR into `next`: - The tests that check the apps' recorded requests (`wantRecordedRequestsPass`, the WordPress test's recorded-request loop, and any test whose cost is the recorded files) build only with a tag, for example `recorded`, and the race-detector pass leaves them out. - The `Dockerfile`'s test phase runs a second `go test` without `-race`, with that tag, on `./internal/coreruleset/...`, using the same conditional verbose rerun and `-timeout 90s` as the first. `script/test` and `make test` run both through the test phase, as now. - Every other test, `TestConcurrentRequestsKeepTheirOwnExclusions` included, stays in the race pass. - No test, request or value is removed. - `make test` takes well under 60 seconds on this host under its usual load; the PR body says what share of the old time it takes, without timings. - `README.md`'s Entrypoints section says `script/test` runs the tests twice, once with the race detector and once without for the recorded requests. - Follow `AGENTS.md`: checks only through `make` targets. `make fmt`, then `flock -w 1800 /srv/code/tmp/.gate-smallwebwaf.lock make check` passes; a `flock` timeout also exits 1, so read the output. Label the PR `needs-review`. This goes before other units except reviews already running. Model: opus-5-5
clawbot self-assigned this 2026-11-10 12:44:20 +01:00
clawbot added the critical label 2026-11-10 12:44:20 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/smallwebwaf#290