rproxy: breaker test no longer needs each failed ask to reach waf (closes #398) #399

Open
clawbot wants to merge 1 commits from issue-398-breaker-test-without-questions into next
pull from: issue-398-breaker-test-without-questions
Collaborator

Closes #398.

TestFiveFailedAsksKeepTheNextRequestFromAskingWAF no longer waits for a question from each of the five failing asks. Under load an ask can time out before the stand-in for waf sees it, which failed the test with no question.

The check that the sixth request did not ask waf now matches its request ID. The app records the ID of that request, and the test looks for a question carrying it. Late questions from the failed asks, which the old check would have counted, cannot be mistaken for it.

No wait is needed for that check: a question from the sixth request would reach the stand-in before the request reaches the app.

Model: opus-5-5

Closes https://git.eeqj.de/sneak/smallwebwaf/issues/398. `TestFiveFailedAsksKeepTheNextRequestFromAskingWAF` no longer waits for a question from each of the five failing asks. Under load an ask can time out before the stand-in for `waf` sees it, which failed the test with `no question`. The check that the sixth request did not ask `waf` now matches its request ID. The app records the ID of that request, and the test looks for a question carrying it. Late questions from the failed asks, which the old check would have counted, cannot be mistaken for it. No wait is needed for that check: a question from the sixth request would reach the stand-in before the request reaches the app. Model: opus-5-5
clawbot self-assigned this 2026-11-16 07:15:52 +01:00
clawbot added 1 commit 2026-11-16 07:15:52 +01:00
TestFiveFailedAsksKeepTheNextRequestFromAskingWAF waited for a question
from each of the five failing asks. Under load an ask could time out
before the stand-in for waf saw it, and the test failed with "no
question". It now waits only for each visitor's answer. It checks that
the sixth request did not ask by its request ID, which the app records,
so late questions from the failed asks cannot be mistaken for it.

Model: opus-5-5
clawbot added the needs-review label 2026-11-16 07:15:57 +01:00
Author
Collaborator

Verdict: PASS
Head: b4363206d2

The breaker test no longer needs each failed ask to reach the stand-in for waf, and its request-ID check still fails when the next request asks waf.

Model: opus-5-5

Verdict: PASS Head: b4363206d26ba591fc95beef305e8456625422bc The breaker test no longer needs each failed ask to reach the stand-in for `waf`, and its request-ID check still fails when the next request asks `waf`. Model: opus-5-5
Author
Collaborator

script/cibuild fails on this PR merged onto next. Last 40 lines:

#28 57.77 ok  	sneak.berlin/go/smallwebwaf/internal/reputation	4.658s	coverage: 96.1% of statements
#28 57.77 ok  	sneak.berlin/go/smallwebwaf/internal/requestlog	1.037s	coverage: 94.3% of statements
#28 57.77 ok  	sneak.berlin/go/smallwebwaf/internal/routewatch	3.601s	coverage: 98.0% of statements
#28 57.77 ok  	sneak.berlin/go/smallwebwaf/internal/rproxy	5.120s	coverage: 98.5% of statements
#28 59.29 ok  	sneak.berlin/go/smallwebwaf/internal/rules	7.092s	coverage: 96.7% of statements
#28 59.29 ok  	sneak.berlin/go/smallwebwaf/internal/state	1.401s	coverage: 96.7% of statements
#28 62.72 ok  	sneak.berlin/go/smallwebwaf/internal/sww	9.600s	coverage: 91.9% of statements
#28 ...

#27 [test-recorded 1/1] RUN --mount=type=tmpfs,target=/root/.cache/go-build     go test -tags no_fs_access,recorded -timeout 90s -cover         -skip '^TestConcurrent' ./internal/coreruleset ||     { echo "--- Rerunning with -v for details ---";       go test -tags no_fs_access,recorded -timeout 90s -v         -skip '^TestConcurrent' ./internal/coreruleset;       exit 1; }
#27 ERROR: process "/bin/sh -c go test -tags no_fs_access,recorded -timeout 90s -cover         -skip '^TestConcurrent' ./internal/coreruleset ||     { echo \"--- Rerunning with -v for details ---\";       go test -tags no_fs_access,recorded -timeout 90s -v         -skip '^TestConcurrent' ./internal/coreruleset;       exit 1; }" did not complete successfully: exit code: 1

#28 [test-race 1/1] RUN --mount=type=tmpfs,target=/root/.cache/go-build     others="$(go list ./... | grep -vxF sneak.berlin/go/smallwebwaf/internal/coreruleset)";     { go test -tags no_fs_access -timeout 90s -race -cover $others &&       go test -tags no_fs_access -timeout 90s -race -cover         -run '^TestConcurrent' ./internal/coreruleset; } ||     { echo "--- Rerunning with -v for details ---";       go test -tags no_fs_access -timeout 90s -race -v $others;       go test -tags no_fs_access -timeout 90s -race -v         -run '^TestConcurrent' ./internal/coreruleset;       exit 1; }
#28 CANCELED
------
 > [test-recorded 1/1] RUN --mount=type=tmpfs,target=/root/.cache/go-build     go test -tags no_fs_access,recorded -timeout 90s -cover         -skip '^TestConcurrent' ./internal/coreruleset ||     { echo "--- Rerunning with -v for details ---";       go test -tags no_fs_access,recorded -timeout 90s -v         -skip '^TestConcurrent' ./internal/coreruleset;       exit 1; }:
67.73     --- PASS: TestOrdinaryMediaWikiRequestsPass/SWW_WAF_APPS_unset:_POST_/index.php?title=Lighthouse_notes&action=submit (0.06s)
67.73     --- PASS: TestOrdinaryMediaWikiRequestsPass/SWW_WAF_APPS_unset:_POST_/index.php?title=Lighthouse_notes&action=submit#02 (0.07s)
67.73     --- PASS: TestOrdinaryMediaWikiRequestsPass/SWW_WAF_APPS_unset:_POST_/api.php?action=stashedit#05 (0.08s)
67.73     --- PASS: TestOrdinaryMediaWikiRequestsPass/SWW_WAF_APPS_unset:_POST_/api.php?action=stashedit#04 (0.09s)
67.73     --- PASS: TestOrdinaryMediaWikiRequestsPass/SWW_WAF_APPS_unset:_POST_/index.php?title=Lighthouse_notes&action=submit#01 (0.09s)
67.73     --- PASS: TestOrdinaryMediaWikiRequestsPass/SWW_WAF_APPS_unset:_GET_/load.php?lang=en&modules=jquery%2Coojs%2Coojs-ui-core%2Coojs-ui-widgets%2Csite%7Cjquery.client%2CmakeCollapsible%7Cjquery.makeCollapsible.styles%7Cmediawiki.String%2CTitle%2Capi%2Cbase%2Ccldr%2Ccookie%2Cexperiments%2CjqueryMsg%2Clanguage%2Cstorage%2Cuser%2Cutil%2Cwidgets%7Cmediawiki.libs.pluralruleparser%7Cmediawiki.page.ready%7Cmediawiki.page.watch.ajax%7Cmediawiki.rcfilters.filters.ui%7Cmediawiki.special.changeslist.legend.js%7Cmediawiki.widgets.styles%7Coojs-ui-core.icons%2Cstyles%7Coojs-ui-widgets.icons%7Coojs-ui-windows.icons%7Coojs-ui.styles.icons-content%2Cicons-editing-advanced%2Cicons-editing-core%2Cicons-editing-styling%2Cicons-interactions%2Cicons-layout%2Cicons-media%2Cicons-moderation%2Cindicators%7Cskins.vector.clientPreferences%2Cjs%7Cskins.vector.icons.js&skin=vector-2022&version=6mcou (0.10s)
67.73 --- PASS: TestOrdinaryGiteaRequestsPass (7.90s)
67.73 --- PASS: TestOrdinaryForgejoRequestsPass (9.84s)
67.73 PASS
67.73 ok  	sneak.berlin/go/smallwebwaf/internal/coreruleset	13.674s
------
Dockerfile:67
--------------------
  66 |     
  67 | >>> RUN --mount=type=tmpfs,target=/root/.cache/go-build \
  68 | >>>     go test -tags no_fs_access,recorded -timeout 90s -cover \
  69 | >>>         -skip '^TestConcurrent' ./internal/coreruleset || \
  70 | >>>     { echo "--- Rerunning with -v for details ---"; \
  71 | >>>       go test -tags no_fs_access,recorded -timeout 90s -v \
  72 | >>>         -skip '^TestConcurrent' ./internal/coreruleset; \
  73 | >>>       exit 1; }
  74 |     
--------------------
ERROR: failed to build: failed to solve: process "/bin/sh -c go test -tags no_fs_access,recorded -timeout 90s -cover         -skip '^TestConcurrent' ./internal/coreruleset ||     { echo \"--- Rerunning with -v for details ---\";       go test -tags no_fs_access,recorded -timeout 90s -v         -skip '^TestConcurrent' ./internal/coreruleset;       exit 1; }" did not complete successfully: exit code: 1

Model: opus-5-5

`script/cibuild` fails on this PR merged onto `next`. Last 40 lines: ```` #28 57.77 ok sneak.berlin/go/smallwebwaf/internal/reputation 4.658s coverage: 96.1% of statements #28 57.77 ok sneak.berlin/go/smallwebwaf/internal/requestlog 1.037s coverage: 94.3% of statements #28 57.77 ok sneak.berlin/go/smallwebwaf/internal/routewatch 3.601s coverage: 98.0% of statements #28 57.77 ok sneak.berlin/go/smallwebwaf/internal/rproxy 5.120s coverage: 98.5% of statements #28 59.29 ok sneak.berlin/go/smallwebwaf/internal/rules 7.092s coverage: 96.7% of statements #28 59.29 ok sneak.berlin/go/smallwebwaf/internal/state 1.401s coverage: 96.7% of statements #28 62.72 ok sneak.berlin/go/smallwebwaf/internal/sww 9.600s coverage: 91.9% of statements #28 ... #27 [test-recorded 1/1] RUN --mount=type=tmpfs,target=/root/.cache/go-build go test -tags no_fs_access,recorded -timeout 90s -cover -skip '^TestConcurrent' ./internal/coreruleset || { echo "--- Rerunning with -v for details ---"; go test -tags no_fs_access,recorded -timeout 90s -v -skip '^TestConcurrent' ./internal/coreruleset; exit 1; } #27 ERROR: process "/bin/sh -c go test -tags no_fs_access,recorded -timeout 90s -cover -skip '^TestConcurrent' ./internal/coreruleset || { echo \"--- Rerunning with -v for details ---\"; go test -tags no_fs_access,recorded -timeout 90s -v -skip '^TestConcurrent' ./internal/coreruleset; exit 1; }" did not complete successfully: exit code: 1 #28 [test-race 1/1] RUN --mount=type=tmpfs,target=/root/.cache/go-build others="$(go list ./... | grep -vxF sneak.berlin/go/smallwebwaf/internal/coreruleset)"; { go test -tags no_fs_access -timeout 90s -race -cover $others && go test -tags no_fs_access -timeout 90s -race -cover -run '^TestConcurrent' ./internal/coreruleset; } || { echo "--- Rerunning with -v for details ---"; go test -tags no_fs_access -timeout 90s -race -v $others; go test -tags no_fs_access -timeout 90s -race -v -run '^TestConcurrent' ./internal/coreruleset; exit 1; } #28 CANCELED ------ > [test-recorded 1/1] RUN --mount=type=tmpfs,target=/root/.cache/go-build go test -tags no_fs_access,recorded -timeout 90s -cover -skip '^TestConcurrent' ./internal/coreruleset || { echo "--- Rerunning with -v for details ---"; go test -tags no_fs_access,recorded -timeout 90s -v -skip '^TestConcurrent' ./internal/coreruleset; exit 1; }: 67.73 --- PASS: TestOrdinaryMediaWikiRequestsPass/SWW_WAF_APPS_unset:_POST_/index.php?title=Lighthouse_notes&action=submit (0.06s) 67.73 --- PASS: TestOrdinaryMediaWikiRequestsPass/SWW_WAF_APPS_unset:_POST_/index.php?title=Lighthouse_notes&action=submit#02 (0.07s) 67.73 --- PASS: TestOrdinaryMediaWikiRequestsPass/SWW_WAF_APPS_unset:_POST_/api.php?action=stashedit#05 (0.08s) 67.73 --- PASS: TestOrdinaryMediaWikiRequestsPass/SWW_WAF_APPS_unset:_POST_/api.php?action=stashedit#04 (0.09s) 67.73 --- PASS: TestOrdinaryMediaWikiRequestsPass/SWW_WAF_APPS_unset:_POST_/index.php?title=Lighthouse_notes&action=submit#01 (0.09s) 67.73 --- PASS: TestOrdinaryMediaWikiRequestsPass/SWW_WAF_APPS_unset:_GET_/load.php?lang=en&modules=jquery%2Coojs%2Coojs-ui-core%2Coojs-ui-widgets%2Csite%7Cjquery.client%2CmakeCollapsible%7Cjquery.makeCollapsible.styles%7Cmediawiki.String%2CTitle%2Capi%2Cbase%2Ccldr%2Ccookie%2Cexperiments%2CjqueryMsg%2Clanguage%2Cstorage%2Cuser%2Cutil%2Cwidgets%7Cmediawiki.libs.pluralruleparser%7Cmediawiki.page.ready%7Cmediawiki.page.watch.ajax%7Cmediawiki.rcfilters.filters.ui%7Cmediawiki.special.changeslist.legend.js%7Cmediawiki.widgets.styles%7Coojs-ui-core.icons%2Cstyles%7Coojs-ui-widgets.icons%7Coojs-ui-windows.icons%7Coojs-ui.styles.icons-content%2Cicons-editing-advanced%2Cicons-editing-core%2Cicons-editing-styling%2Cicons-interactions%2Cicons-layout%2Cicons-media%2Cicons-moderation%2Cindicators%7Cskins.vector.clientPreferences%2Cjs%7Cskins.vector.icons.js&skin=vector-2022&version=6mcou (0.10s) 67.73 --- PASS: TestOrdinaryGiteaRequestsPass (7.90s) 67.73 --- PASS: TestOrdinaryForgejoRequestsPass (9.84s) 67.73 PASS 67.73 ok sneak.berlin/go/smallwebwaf/internal/coreruleset 13.674s ------ Dockerfile:67 -------------------- 66 | 67 | >>> RUN --mount=type=tmpfs,target=/root/.cache/go-build \ 68 | >>> go test -tags no_fs_access,recorded -timeout 90s -cover \ 69 | >>> -skip '^TestConcurrent' ./internal/coreruleset || \ 70 | >>> { echo "--- Rerunning with -v for details ---"; \ 71 | >>> go test -tags no_fs_access,recorded -timeout 90s -v \ 72 | >>> -skip '^TestConcurrent' ./internal/coreruleset; \ 73 | >>> exit 1; } 74 | -------------------- ERROR: failed to build: failed to solve: process "/bin/sh -c go test -tags no_fs_access,recorded -timeout 90s -cover -skip '^TestConcurrent' ./internal/coreruleset || { echo \"--- Rerunning with -v for details ---\"; go test -tags no_fs_access,recorded -timeout 90s -v -skip '^TestConcurrent' ./internal/coreruleset; exit 1; }" did not complete successfully: exit code: 1 ```` Model: opus-5-5
clawbot added the needs-checks label 2026-11-16 07:42:36 +01:00
Some required checks failed
check / check (push) Failing after 2m0s
You are not authorized to merge this pull request.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin issue-398-breaker-test-without-questions:issue-398-breaker-test-without-questions
git checkout issue-398-breaker-test-without-questions
Sign in to join this conversation.