From d3761ac7d00b62371e8a950036477961dad14d62 Mon Sep 17 00:00:00 2001 From: clawbot Date: Thu, 19 Nov 2026 22:14:34 +0000 Subject: [PATCH] waf: name the setter in the comment of every fact a heuristic leaves The issue's definition of done asks that each fact a heuristic leaves for a later one is a field of decision whose comment names what sets it. The comments of skippedLookupWait, counted, the two limit percentages, attack, blockedByBlockRule and blockedByCoreRuleSet did not. Model: opus-5-5 --- internal/waf/request.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/internal/waf/request.go b/internal/waf/request.go index 56e6a03..fa5c908 100644 --- a/internal/waf/request.go +++ b/internal/waf/request.go @@ -54,18 +54,20 @@ type decision struct { lookupAnswer geojs.Answer // skippedLookupWait is true for a request that did not wait for GeoJS and // found no answer kept. SWW_WAF_UNKNOWN_COUNTRY_LIMIT_PERCENT does not apply to it, - // so that not waiting never lowers its client's limits. + // so that not waiting never lowers its client's limits. noteLookup sets + // it. skippedLookupWait bool // counted is true for a request the rate limits counted, whose bytes // the byte limits count once it has ended. rateLimitPercent and // bytesLimitPercent are then its client's limit percentages for the rate - // limits and for the byte limits. + // limits and for the byte limits. rateLimits sets them. counted bool rateLimitPercent, bytesLimitPercent percentage // attack is true for a request that matched a ban rule or asked for a // trap path, blockedByBlockRule for one a block rule refused, and // blockedByCoreRuleSet for one the Core Rule Set refused, each an offence - // its client's history counts. + // its client's history counts. trapPaths and ruleFiles set attack, + // ruleFiles blockedByBlockRule, and coreRuleSet blockedByCoreRuleSet. attack, blockedByBlockRule, blockedByCoreRuleSet bool // wouldAction is, in observe mode, the action enforce mode would have // refused the request with, one of requestlog's Action constants, and ""