tidy-gateway: the frozen gate chain is two gates, not four - #255
Merged
Conversation
The comment justifying why rate limiting lives outside the pipeline ended "a quota is an admission WRAPPER around the call, not a gate — the frozen gate chain stays four gates long". pipeline.New builds two: scopeGate and tokenTierGate. gates.go says "there are exactly two, because there are exactly two gates", and AGENTS.md freezes the order as scope → token tier. Four was right at the initial public release, when the chain also carried precheckGate and hitlGate. Both went with the runtime governance surface, and this sentence kept their count. It is a worse place than most to leave a stale number. The sentence exists to show that adding quotas did NOT lengthen the chain, and it was making that argument against a figure a reader counting gates cannot reproduce — so the one comment asserting the chain is unchanged is the one that reads as though it changed. Gate count is load-bearing here: AGENTS.md requires any new execution path to assert its count matches a direct call, and inproc_test compares the counters. Found by sweeping Go comments for numeric claims about countable things, after catching myself writing hardcoded counts into a doc comment earlier tonight. make ci green. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Nightly tidy. New lens: sweep Go comments for numeric claims about countable things — the failure family that produced most of this week's findings, and one I caught myself committing earlier tonight.
gateway.gosaid the frozen gate chain is "four gates long". It is two.131 such claims across the tree; this is the one that is wrong. Four was correct at the initial public release, when the chain also carried
precheckGateandhitlGate— both removed with the runtime governance surface, leaving their count behind in the one sentence whose job is to state the current one.It matters more here than elsewhere: the sentence exists to argue that adding rate limiting did not lengthen the chain, and it made that argument against a number nobody counting gates can reproduce. AGENTS.md requires any new execution path to assert its gate count matches a direct call.
Spot-checked from the same sweep and all correct:
internal/tier's "seven packages import it" (7),discovery/meta.go's "five entries" (5 meta-tools),cli_test.go's "~90 commands" (96 paths),eventlog's twenty-one kinds (machine-guarded byeventkinds_test.go).