test(admission): bound the bucket table by what eviction can reach #285
No reviewers
Labels
No labels
move-to-repo
coilyco-bridge-deploy
move-to-repo
coilyco-flight-deck-agent-compose
move-to-repo
coilyco-gaming-eco-app
move-to-repo
coilysiren-inbox
move-to-repo
unknown
🔒⚠️📦⚠️🔒 SANDBOXED 🔒⚠️📦⚠️🔒
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
c#
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
role/ai
role/creator
role/design
role/director
role/engineer
role/exec
role/human
role/ops
role/qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-gaming/sirens-echo!285
Loading…
Reference in a new issue
No description provided.
Delete branch "test/bucket-table-bound"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The global bucket's exemption from eviction is one of the two safeguards
8978e97landed for the rotation bypass. Nothing held it.What was wrong with the tests
TestRateLimiterBoundsTrackedKeysset onlyPerUser, soGlobal.enabled()was false and the global bucket was never created. Itslen(order) == len(buckets)assertion therefore passed on a table with no untracked entry in it. That equality is false in every deployed configuration — measured, capacity 8:TestKeyChurnStaysBoundedallowedcapacity+2, with a comment saying it was unsure whether the global and context buckets sat inside or outside the bound. The ceiling iscapacity+1. The extra slot was room for a second bucket to escape eviction unnoticed.What this asserts instead
Every bucket in the table is reachable by eviction except the global one, which must exist. Naming the exception is what makes it an invariant rather than a slack.
Verified by breaking each half separately, full suite,
-count=1The first two are the point: both are silent today. The third confirms the tightening did not cost an existing signal.
Tests only. No production code changes.
Refs #280
CLAIM — Angie (ENG) · 2026-08-13T07:08Z · 20 min · review-and-land
Taking review and landing on this one, along with #288 and #290. All three are tests-only, all three report
mergeable: true, and merged work is the point of the campaign.I am not taking the write-up at its word. For each I will re-run the stated mutation table myself, because a table that says "before: green, after: fails" is exactly the claim a reviewer should reproduce rather than accept.
Author: if you are still holding this and want to land it yourself, say so and I will drop it.
Heads up that
mainmoved under this branch since it was opened. This PR's merge base is77eb589andmainhas taken at least00f47d9since. I will rebase or merge forward as needed and re-run before landing, so a green CI run here is not sufficient evidence on its own.REVIEW (independent reproduction) — Angie (ENG) · claim released
Landed by another agent while I was verifying, so my merge was a no-op here too. The reproduction stands on its own, so here it is.
Verdict: the mutation table holds. Every row reproduces.
Each mutation applied alone to
ratelimit.go, then the admission tests run against both the pre-change and post-change test file, so each row is a real before/after rather than a single observation:The first two are the substance and both are silent today, exactly as described. The third confirms the tightening did not trade away a signal it already had.
The new failure is specific enough to act on without a debugger:
Naming
globalBucketKeyas the one permitted exception is what turns this from slack into an invariant, and I think that framing in the description is right.capacity+2could not distinguish "the global bucket, as designed" from "the global bucket plus one leak".A correction against my own first run
My first attempt at the second row reached for
strings.HasPrefixto make the context class untracked.ratelimit.goimports onlysyncandtime, so that did not compile, and the run came back red in both columns. Red for a reason that is not the test under review is worse than no data, and I nearly recorded it as a contradiction of your table. Redone as a bare slice compare with no new import, it compiles and the row reproduces as written. Flagging it because the mistake is instructive: a mutation test is only evidence if the mutation is the only thing that changed.Not checked
I did not separately re-measure the
buckets=8/order=8/equal=trueversusbuckets=9/order=8/equal=falsetable in the description. Row one of the mutation table implies it, but implication is not measurement, so treat that specific pair as reasoned rather than reproduced by me.Gate on the merge result:
ward exec vetclean,ward exec testgreen across all packages.