Commit 3381b12
committed
address self-review findings on PR #60
- **Reject `max_concurrent` with non-concurrent strategy**: if a user
sets `ConcurrencyConfig(strategy="queue", max_concurrent=5)`, they
have a misconfig — the field is only honored under `"concurrent"`.
Upstream accepts silently but we fail-fast so it's never invisible.
New test `test_max_concurrent_with_non_concurrent_strategy_raises`.
- **Tighten error message**: raw input via `!r` repr instead of private
`self._concurrency_max_concurrent` attribute; message now also tells
the user how to fix ("pass None for unbounded").
- **Test robustness**: replace `for _ in range(20): await asyncio.sleep(0)`
yield-counting loops with `asyncio.wait_for(_reach_cap(), timeout=1.0)`
polling until the condition holds. Fixed counts can be flaky on slow
CI when handlers have multiple internal await points.
- **Document divergence in UPSTREAM_SYNC.md**: added row to Known
Non-Parity table with rationale (upstream accepts the config field
but never enforces it; we do).
- **Inline breadcrumb comment** `# Divergence from upstream — see
docs/UPSTREAM_SYNC.md` at the `_concurrent_semaphore` construction
site, matching the divergence discipline in CLAUDE.md.1 parent d74453e commit 3381b12
3 files changed
Lines changed: 58 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
455 | 455 | | |
456 | 456 | | |
457 | 457 | | |
| 458 | + | |
458 | 459 | | |
459 | 460 | | |
460 | 461 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
297 | 298 | | |
298 | 299 | | |
299 | 300 | | |
| 301 | + | |
300 | 302 | | |
301 | 303 | | |
302 | 304 | | |
303 | | - | |
304 | | - | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
305 | 312 | | |
306 | 313 | | |
307 | 314 | | |
308 | 315 | | |
309 | 316 | | |
| 317 | + | |
310 | 318 | | |
311 | 319 | | |
312 | | - | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
313 | 328 | | |
314 | 329 | | |
315 | 330 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2303 | 2303 | | |
2304 | 2304 | | |
2305 | 2305 | | |
2306 | | - | |
2307 | | - | |
2308 | | - | |
2309 | | - | |
2310 | | - | |
| 2306 | + | |
| 2307 | + | |
| 2308 | + | |
| 2309 | + | |
| 2310 | + | |
| 2311 | + | |
| 2312 | + | |
| 2313 | + | |
| 2314 | + | |
| 2315 | + | |
| 2316 | + | |
| 2317 | + | |
| 2318 | + | |
2311 | 2319 | | |
2312 | 2320 | | |
2313 | 2321 | | |
| |||
2330 | 2338 | | |
2331 | 2339 | | |
2332 | 2340 | | |
2333 | | - | |
| 2341 | + | |
2334 | 2342 | | |
2335 | 2343 | | |
2336 | 2344 | | |
2337 | 2345 | | |
2338 | 2346 | | |
2339 | 2347 | | |
| 2348 | + | |
| 2349 | + | |
| 2350 | + | |
| 2351 | + | |
| 2352 | + | |
| 2353 | + | |
| 2354 | + | |
| 2355 | + | |
| 2356 | + | |
| 2357 | + | |
| 2358 | + | |
| 2359 | + | |
| 2360 | + | |
| 2361 | + | |
| 2362 | + | |
| 2363 | + | |
| 2364 | + | |
2340 | 2365 | | |
2341 | 2366 | | |
2342 | 2367 | | |
| |||
2367 | 2392 | | |
2368 | 2393 | | |
2369 | 2394 | | |
2370 | | - | |
2371 | | - | |
2372 | | - | |
| 2395 | + | |
| 2396 | + | |
| 2397 | + | |
| 2398 | + | |
| 2399 | + | |
| 2400 | + | |
| 2401 | + | |
| 2402 | + | |
2373 | 2403 | | |
2374 | 2404 | | |
2375 | 2405 | | |
| |||
0 commit comments