Repository navigation
test(recfilter): pin the duplicate-guard budget ceil boundary - #490
Conversation
|
@coderabbitai review |
|
|
Independent review: CLEAN at The change is test-only (+4 lines,
Mutation probes, run locally in a scratch copy and reverted:
Pass-after: |
Adds an 8 Redis vs two 5-node Valkey recs case (exact 4-node spend each, expects 0 purchases) and a single-node-per-rec case. The mutant `spent = covered` now fails the first; the floor-division mutant fails both new cases (and the existing rounds-up cases). Refs #238 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5e14410 to
b371b94
Compare
|
Updated onto |
|
Merged by squash at reviewed head
CR waived: quota, adversarial review + local verification + green CI. A retrospective CodeRabbit review will run when quota returns. Refs #238 (the issue stays open for the 64:ff9b:1::/48 and Teredo decision). |
Summary
Test-only, the
pkg/recfilterpart of #238.elastiCacheCover.consume(pkg/recfilter/dedupe.go:190-194) rounds the reserved nodes spent up ((covered*reserved + nodes - 1) / nodes), but no test pinned the exact-spend boundary, so the mutantspent = coveredsurvived.Two cases added to
TestElastiCacheEngineBudgets:spent = coveredeach spends 5, leaving 3, and 2 nodes are bought.Mutation probes (scratch copy of
pkg):spent = covered: the new exact-spend case fails (previously no test failed).Refs #238. The
pkg/httpclientUnmap()part is covered by #473; whether to block64:ff9b:1::/48and Teredo2001::/32stays a decision on the issue.Verification
(cd pkg && GOWORK=off go test -race -short ./recfilter/...), pinned golangci-lint v2.10.1 (0 issues), gofmt, and the commit/pre-push hooks pass. Non-author review of the 4-line diff checked both cases' arithmetic againstconsume.🤖 Generated with Claude Code
Summary by CodeRabbit