Not blocking: a fault in tests, the same as #324 in other files of internal/sww.
Where
Each of these waits at most waitLimit (10 s) for the starting line through output.line:
internal/sww/waf_test.go, lines 69 and 170 (runWAF);
internal/sww/healthcheck_test.go, line 44;
internal/sww/rproxy_test.go, lines 89, 108, 542, 613, 654 and 753.
What is wrong
A start of sww waf compiles the Core Rule Set, which can take longer than 10 s on a loaded host. The wait then fails the test while sww is still starting. The fix for #324 adds output.lineBeforeExit in internal/sww/sww_test.go, which waits until the line is written or sww exits; these waits can use it where the test has sww's exit status on a channel. waf_test.go line 69 runs sww as a child process and has no such channel.
rproxy_test.go is also changed by #322; land after it to avoid a conflict.
Definition of done
One PR to next that changes tests only.
No wait for starting in internal/sww ends after a fixed time.
make check passes.
Model: opus-5-5
Not blocking: a fault in tests, the same as https://git.eeqj.de/sneak/smallwebwaf/issues/324 in other files of `internal/sww`.
## Where
Each of these waits at most `waitLimit` (10 s) for the `starting` line through `output.line`:
- `internal/sww/waf_test.go`, lines 69 and 170 (`runWAF`);
- `internal/sww/healthcheck_test.go`, line 44;
- `internal/sww/rproxy_test.go`, lines 89, 108, 542, 613, 654 and 753.
## What is wrong
A start of `sww waf` compiles the Core Rule Set, which can take longer than 10 s on a loaded host. The wait then fails the test while sww is still starting. The fix for https://git.eeqj.de/sneak/smallwebwaf/issues/324 adds `output.lineBeforeExit` in `internal/sww/sww_test.go`, which waits until the line is written or sww exits; these waits can use it where the test has sww's exit status on a channel. `waf_test.go` line 69 runs sww as a child process and has no such channel.
`rproxy_test.go` is also changed by https://git.eeqj.de/sneak/smallwebwaf/pulls/322; land after it to avoid a conflict.
## Definition of done
- One PR to `next` that changes tests only.
- No wait for `starting` in `internal/sww` ends after a fixed time.
- `make check` passes.
Model: opus-5-5
Plan. As the issue says, after #322 lands: rebase onto it. Tests only, in internal/sww; use output.lineBeforeExit from sww_test.go where the test has sww's exit status, and give waf_test.go line 69 an equivalent that ends when the child process exits. No test, request or value is removed. Follow AGENTS.md: checks only through make targets. make fmt, then flock -w 1800 /srv/code/tmp/.gate-smallwebwaf.lock make check; a flock timeout also exits 1, so read the output. Edit by hand. Title ending (closes #331). Label the PR needs-review.
Model: opus-5-5
**Plan.** As the issue says, after https://git.eeqj.de/sneak/smallwebwaf/pulls/322 lands: rebase onto it. Tests only, in `internal/sww`; use `output.lineBeforeExit` from `sww_test.go` where the test has sww's exit status, and give `waf_test.go` line 69 an equivalent that ends when the child process exits. No test, request or value is removed. Follow `AGENTS.md`: checks only through `make` targets. `make fmt`, then `flock -w 1800 /srv/code/tmp/.gate-smallwebwaf.lock make check`; a `flock` timeout also exits 1, so read the output. Edit by hand. Title ending ` (closes #331)`. Label the PR `needs-review`.
Model: opus-5-5
clawbot
self-assigned this 2026-11-11 06:31:27 +01:00
Built in #340. Every starting wait in internal/sww now ends only when the line appears or sww exits. The two child-process tests get sww's exit status from a goroutine that waits on it.
Model: opus-5-5
Built in https://git.eeqj.de/sneak/smallwebwaf/pulls/340. Every `starting` wait in `internal/sww` now ends only when the line appears or sww exits. The two child-process tests get sww's exit status from a goroutine that waits on it.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Not blocking: a fault in tests, the same as #324 in other files of
internal/sww.Where
Each of these waits at most
waitLimit(10 s) for thestartingline throughoutput.line:internal/sww/waf_test.go, lines 69 and 170 (runWAF);internal/sww/healthcheck_test.go, line 44;internal/sww/rproxy_test.go, lines 89, 108, 542, 613, 654 and 753.What is wrong
A start of
sww wafcompiles the Core Rule Set, which can take longer than 10 s on a loaded host. The wait then fails the test while sww is still starting. The fix for #324 addsoutput.lineBeforeExitininternal/sww/sww_test.go, which waits until the line is written or sww exits; these waits can use it where the test has sww's exit status on a channel.waf_test.goline 69 runs sww as a child process and has no such channel.rproxy_test.gois also changed by #322; land after it to avoid a conflict.Definition of done
nextthat changes tests only.startingininternal/swwends after a fixed time.make checkpasses.Model: opus-5-5
Plan. As the issue says, after #322 lands: rebase onto it. Tests only, in
internal/sww; useoutput.lineBeforeExitfromsww_test.gowhere the test has sww's exit status, and givewaf_test.goline 69 an equivalent that ends when the child process exits. No test, request or value is removed. FollowAGENTS.md: checks only throughmaketargets.make fmt, thenflock -w 1800 /srv/code/tmp/.gate-smallwebwaf.lock make check; aflocktimeout also exits 1, so read the output. Edit by hand. Title ending(closes #331). Label the PRneeds-review.Model: opus-5-5
Built in #340. Every
startingwait ininternal/swwnow ends only when the line appears or sww exits. The two child-process tests get sww's exit status from a goroutine that waits on it.Model: opus-5-5