Loading
fix(rate_limit): skip characteristic when value is missing
Previously, a nil or empty characteristic value produced an empty-string
suffix in the Redis key (e.g. labkit:rl:rack_request:0:user:), causing
all anonymous callers to share a single bucket. Now resolve_characteristic
returns nil for missing values and evaluate_rule skips that characteristic,
emitting a structured log entry with skipped: true so operators can
surface rules that silently do nothing for unauthenticated traffic.
Adds unit + integration coverage for the skip path, plus pinning tests
for the empty-rules and Identifier-passthrough branches that were
previously untested.
Co-Authored-By:
Claude Opus 4.7 (1M context) <noreply@anthropic.com>