Commit e1eb383
fix(bulk): CodeQL implicit-concat + a vacuous suggestions-list assertion
CodeQL py/implicit-string-concatenation-in-list (2 findings): the item-5
dynamic-approval suggestions list (middleware.py, previous commit) wrapped
two multi-line string items with no operator between the literals -- the
same shape a missing comma produces. Switched to the explicit "+" already
used elsewhere in this file, plus one more instance in the same list-shape
(the RecursionError fix's suggestions) that CodeQL hadn't flagged yet but
matches the identical pattern.
CodeRabbit: test_custom_suggestions_override_the_defaults asserted a
default suggestion string was absent from response["error"]["suggestions"]
-- but create_error_response only populates the plural "suggestions" key
when more than one suggestion is present, and the test passed exactly one,
so that key was never set regardless of whether the override worked. The
assertion was vacuous: it would pass even if create_connection_error
silently ignored custom suggestions entirely. Fixed by passing two custom
suggestions and asserting the complete list equals them exactly.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent 6c6e447 commit e1eb383
2 files changed
Lines changed: 22 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
162 | | - | |
| 162 | + | |
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| |||
389 | 389 | | |
390 | 390 | | |
391 | 391 | | |
392 | | - | |
| 392 | + | |
393 | 393 | | |
394 | | - | |
395 | | - | |
| 394 | + | |
| 395 | + | |
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
143 | 157 | | |
144 | 158 | | |
145 | | - | |
| 159 | + | |
146 | 160 | | |
147 | 161 | | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
| 162 | + | |
| 163 | + | |
154 | 164 | | |
155 | 165 | | |
156 | 166 | | |
| |||
0 commit comments