Commit 8ef486f
committed
Name the rate-limit axis that actually binds
A missing rate-limit header reads as 0, and the label compared the two derived
capacities directly, so whichever axis was absent won: with no TPM header and
an RPM limit, `0 <= by_rpm` printed "TPM-bound" and would send someone to raise
a quota that was never the constraint.
`fits` already skipped zeros; only the label did not. Report the axis that
produced `fits`, and say so explicitly when the other header is missing rather
than implying both were read.
Greptile flagged this and proposed `by_tpm and by_tpm <= by_rpm`, which fixes
the absent-TPM case but still prints "RPM-bound" for the mirror case (a TPM
limit and no RPM header), because the `and` short-circuits to the same branch.1 parent 7cdbf26 commit 8ef486f
1 file changed
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
105 | 115 | | |
106 | 116 | | |
107 | 117 | | |
| |||
0 commit comments