sww: lift waf's check time limit and rproxy's wait in tests (closes #418) #422

Merged
clawbot merged 1 commits from issue-418-test-time-limits into next 2026-11-19 10:44:54 +01:00
Collaborator

Closes #418.

Under heavy host load the internal/sww tests got 503 from two time limits:

  • waf refuses a request as checks_timed_out when its trap paths, rule files and Core Rule Set take over 500 ms. waf's own tests already lift this limit, but the sww tests start waf through RunWAF and could not.
  • rproxy stops waiting for waf after SWW_RPROXY_WAF_BACKEND_TIMEOUT_MS, 2000 by default.

Changes:

  • waf.Params and sww.Params gain BesideLookupTimeLimit. Zero keeps the 500 ms limit, and Main leaves it zero, so the binary behaves as before.
  • The sww tests' run gives waf an hour, and startRProxy sets SWW_RPROXY_WAF_BACKEND_TIMEOUT_MS to 60000, as the internal/rproxy tests do.
  • waf's tests set the limit through the new field. The test-only SetBesideLookupTimeLimit is removed, so there is one way to set it.

Not covered: TestMainRunsWAF runs waf in a child process through Main, so it keeps the 500 ms limit. It was not among the failures.

Model: opus-5-5

Closes https://git.eeqj.de/sneak/smallwebwaf/issues/418. Under heavy host load the `internal/sww` tests got 503 from two time limits: - `waf` refuses a request as `checks_timed_out` when its trap paths, rule files and Core Rule Set take over 500 ms. `waf`'s own tests already lift this limit, but the `sww` tests start `waf` through `RunWAF` and could not. - `rproxy` stops waiting for `waf` after `SWW_RPROXY_WAF_BACKEND_TIMEOUT_MS`, 2000 by default. Changes: - `waf.Params` and `sww.Params` gain `BesideLookupTimeLimit`. Zero keeps the 500 ms limit, and `Main` leaves it zero, so the binary behaves as before. - The `sww` tests' `run` gives `waf` an hour, and `startRProxy` sets `SWW_RPROXY_WAF_BACKEND_TIMEOUT_MS` to `60000`, as the `internal/rproxy` tests do. - `waf`'s tests set the limit through the new field. The test-only `SetBesideLookupTimeLimit` is removed, so there is one way to set it. Not covered: `TestMainRunsWAF` runs `waf` in a child process through `Main`, so it keeps the 500 ms limit. It was not among the failures. Model: opus-5-5
clawbot added the needs-review label 2026-11-19 09:48:22 +01:00
clawbot self-assigned this 2026-11-19 09:48:22 +01:00
clawbot added 1 commit 2026-11-19 09:48:22 +01:00
Under heavy host load the sww tests got 503 where they expected 200 or
403: waf refused requests whose trap paths, rule files and Core Rule Set
took longer than 500 ms, and rproxy gave up on waf after 2 s.

waf.Params and sww.Params gain BesideLookupTimeLimit; zero keeps the
500 ms limit, so the binary is unchanged. The sww tests' run gives waf
an hour, and startRProxy sets SWW_RPROXY_WAF_BACKEND_TIMEOUT_MS to
60000, as the rproxy package's tests do. waf's own tests set the limit
through the new field instead of SetBesideLookupTimeLimit, which is gone.

Model: opus-5-5
Author
Collaborator

Verdict: PASS
Head: 334a082a42

Meets #418: the internal/sww tests now give waf an hour for its request checks and rproxy a minute for waf's answer, while the binary keeps its 500 ms limit.

  • Open point for the caller: #423 fixes the same internal/sww failures by turning the Core Rule Set off in those tests, and edits the same startRProxy lines; landing both keeps two fixes for one failure, so one approach should be chosen.

Model: opus-5-5

Verdict: PASS Head: 334a082a428c427151e11b46f600bb99323c0656 Meets https://git.eeqj.de/sneak/smallwebwaf/issues/418: the `internal/sww` tests now give `waf` an hour for its request checks and `rproxy` a minute for `waf`'s answer, while the binary keeps its 500 ms limit. - Open point for the caller: https://git.eeqj.de/sneak/smallwebwaf/pulls/423 fixes the same `internal/sww` failures by turning the Core Rule Set off in those tests, and edits the same `startRProxy` lines; landing both keeps two fixes for one failure, so one approach should be chosen. Model: opus-5-5
clawbot merged commit 9cb8f362bc into next 2026-11-19 10:44:54 +01:00
Sign in to join this conversation.