Commit 310c1ca
committed
fix(sqs/htfifo): PR #681 round 2 — FIFO-only PartitionCount + test cleanup
Three items from the round-2 Claude review on PR #681:
(1) Bug (latent, live in PR 5): validatePartitionConfig only guarded
FifoThroughputLimit / DeduplicationScope as FIFO-only, not
PartitionCount > 1. A Standard queue with PartitionCount=2 would
slip past the validator after PR 5 lifts the dormancy gate. Added
a guard inside the !meta.IsFIFO block: PartitionCount > 1 →
InvalidAttributeValue("PartitionCount > 1 is only valid on FIFO
queues"). PartitionCount 0 / 1 stay accepted on Standard (both
mean "single-partition layout"). Test
TestValidatePartitionConfig_StandardQueueRejectsHTFIFOAttrs
extended to cover PartitionCount=2/4/8/16/32 → reject and
PartitionCount=0/1 → accept.
(2) Low: TestSQSServer_HTFIFO_RejectsQueueScopedDedupOnPartitioned
had two contradictory comments. The function-level doc said "Test
sets PartitionCount=1 to bypass dormancy" but the test actually
sends PartitionCount=2; the inline comment claimed "dormancy fires
first" but validatePartitionConfig (inside parseAttributesIntoMeta)
runs before validatePartitionDormancyGate, so the cross-attr rule
fires first. Rewrote the doc to describe the actual control-plane
order (validatePartitionConfig → cross-attr rejection → wire 400)
and removed the misleading "dormancy fires first" assertion.
(3) Nit: replaced the custom 11-line contains/indexOf helpers with
strings.Contains. Identical behaviour, idiomatic.
All findings noted in the round-2 Claude review on PR #681.1 parent 288b06e commit 310c1ca
3 files changed
Lines changed: 38 additions & 33 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
145 | 156 | | |
146 | 157 | | |
147 | 158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | | - | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
83 | | - | |
| 84 | + | |
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
| |||
109 | 110 | | |
110 | 111 | | |
111 | 112 | | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
118 | 125 | | |
119 | 126 | | |
120 | 127 | | |
121 | 128 | | |
122 | 129 | | |
123 | 130 | | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | 131 | | |
131 | 132 | | |
132 | 133 | | |
| |||
138 | 139 | | |
139 | 140 | | |
140 | 141 | | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | 142 | | |
145 | 143 | | |
146 | 144 | | |
| |||
269 | 267 | | |
270 | 268 | | |
271 | 269 | | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
166 | 172 | | |
167 | 173 | | |
168 | 174 | | |
169 | 175 | | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
170 | 182 | | |
171 | 183 | | |
172 | 184 | | |
| |||
0 commit comments