Commit 9aad4e3
committed
fix(teams): track wait_until invocation explicitly to detect deduped messages
The previous fix (17009a9) used ``processing_done.done()`` to detect
whether a chat task was scheduled, but ``_resolve_processing`` registers
a ``done_callback`` on the task that fires only on task COMPLETION —
not at the moment ``wait_until`` is invoked. So my check
prematurely resolved ``processing_done`` immediately after
``process_message`` returned (before the task had a chance to run),
which broke 2 tests:
- test_caller_wait_until_raise_does_not_kill_native_streaming
- test_same_thread_concurrent_handlers_clobber_active_stream
Fix: track a separate ``wait_until_invoked`` flag inside
``_chained_wait_until``. After ``process_message`` returns, only resolve
``processing_done`` if ``wait_until`` was NEVER called — that's the
true signal that no chat task was scheduled (deduped/dropped).
23 native-streaming tests pass; full suite passes (modulo the
pre-existing unrelated github_webhook failure).
https://claude.ai/code/session_01FyMxQn2BEAzmwKS1GZczKj1 parent 17009a9 commit 9aad4e3
1 file changed
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
458 | 458 | | |
459 | 459 | | |
460 | 460 | | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
461 | 466 | | |
462 | 467 | | |
| 468 | + | |
| 469 | + | |
463 | 470 | | |
464 | 471 | | |
465 | 472 | | |
| |||
494 | 501 | | |
495 | 502 | | |
496 | 503 | | |
497 | | - | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
498 | 509 | | |
499 | 510 | | |
500 | 511 | | |
| |||
0 commit comments