Commit 22d8f07
TASK-036 review: fix callback=nullptr and counter isolation
- Add = nullptr default initializer to modded_request::callback field,
eliminating UB per the C++ standard (findings 1 & 5: code-quality-
reviewer + code-simplifier). The is_allowed guard already prevents
the pointer from being invoked for unrecognized methods; this makes
the contract explicit at the declaration site.
- Update the comment in resolve_method_callback to remove the stale
"pre-existing latent bug" note now that callback has a safe default.
- Add per-test counter reset at the start of the three deferred tests
that share the static counter (finding 12: test-quality-reviewer).
tear_down() also resets but cannot guarantee ordering when tests run
in non-default order or under skip conditions.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 47e926d commit 22d8f07
3 files changed
Lines changed: 11 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
369 | | - | |
370 | | - | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
371 | 372 | | |
372 | 373 | | |
373 | 374 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
53 | 56 | | |
54 | 57 | | |
55 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
| 192 | + | |
192 | 193 | | |
193 | 194 | | |
194 | 195 | | |
| |||
207 | 208 | | |
208 | 209 | | |
209 | 210 | | |
| 211 | + | |
210 | 212 | | |
211 | 213 | | |
212 | 214 | | |
| |||
225 | 227 | | |
226 | 228 | | |
227 | 229 | | |
| 230 | + | |
228 | 231 | | |
229 | 232 | | |
230 | 233 | | |
| |||
0 commit comments