Compare commits

..
Author SHA1 Message Date
clawbot fde9b9c0b8 requestlog: list checks_timed_out among the values of would_action
check / check (push) Successful in 4m38s
The comment on WouldAction lists every action observe mode can log as
would_action, and left out ActionChecksTimedOut, which this change adds.

Model: opus-5-5
2026-11-17 04:48:26 +00:00
clawbot 7904647254 SPEC: the worst-case request is refused only if it takes over 500 ms
"Answering in time" said waf refuses the slowest request a visitor can
send after 500 milliseconds. Its inspection takes under a second, which
can be under 500 milliseconds, and then it is not refused.

Model: opus-5-5
2026-11-17 04:48:10 +00:00
clawbot b0a06aac63 waf: rename the heuristic list last, a name that said nothing
The list that runs tag_deny the second time was named last(). The bare
word does not say what it holds or when it runs, a local variable in
rulefiles.go shadows it, and its doc read "the heuristics of last run".
It is now afterBesideLookup, beside the other lists named for when they
run.

Model: opus-5-5
2026-11-17 04:47:47 +00:00
clawbot 0e5a5b468c waf: rename afterLookUp, which differed from afterLookup by one capital
The method that runs the heuristics of afterLookup was named afterLookUp,
beside the list afterLookup() in the same package. It is now
runAfterLookup, like runBesideLookup.

Model: opus-5-5
2026-11-17 04:47:28 +00:00
sneak 098bbe8878 waf: run the trap paths, rule files and Core Rule Set during the GeoJS wait (closes #405)
check / check (push) Failing after 1m56s
While the lookup waits for GeoJS, the trap paths, the rule files and the
Core Rule Set run at the same time as the checks after the lookup. The
first side to refuse answers the request; what the other side finds leaves
no trace. Those three checks have 500 ms together: past it, the request is
refused with 503 as checks_timed_out, with no ban and no offence.

Tests hold GeoJS and the Core Rule Set with stand-ins under synctest. The
test helper lifts the 500 ms limit for tests that run the real Core Rule
Set, which the race detector slows past it.

Model: opus-5-5
2026-11-17 04:27:26 +00:00
+5 -8
View File
@@ -31,12 +31,10 @@ import (
// this package: Go's resolver counts the queries under way in one // this package: Go's resolver counts the queries under way in one
// sync.WaitGroup for the whole process, and the process fails when // sync.WaitGroup for the whole process, and the process fails when
// queries from two bubbles, or from a bubble and from outside one, are // queries from two bubbles, or from a bubble and from outside one, are
// under way at once. The one test outside a bubble is parallel, so it // under way at once. TestMain has the resolver make its configuration,
// starts only once every test that is not parallel has ended; no other // which it makes on its first query, outside every bubble, since the
// parallel test of this package queries a resolver. TestMain has the // configuration holds a channel, which the bubble it was made in would
// resolver make its configuration, which it makes on its first query, // keep to itself.
// outside every bubble, since the configuration holds a channel, which
// the bubble it was made in would keep to itself.
const ( const (
// zone and otherZone are the DNSBL zones the tests name. // zone and otherZone are the DNSBL zones the tests name.
@@ -527,9 +525,8 @@ func TestAtMost100000VerdictsKeptTheOneFetchedLongestAgoDroppedFirst(
} }
} }
//nolint:paralleltest // one at a time, as the comment at the top of this file says
func TestQueriesGoToTheResolverSWWDNSBLResolverNames(t *testing.T) { func TestQueriesGoToTheResolverSWWDNSBLResolverNames(t *testing.T) {
t.Parallel()
resolver := &resolverStandIn{answers: map[string]answer{ resolver := &resolverStandIn{answers: map[string]answer{
listedName: {addrs: []string{listing}}, listedName: {addrs: []string{listing}},
}} }}