Skip to content

Fix async/event lifecycle edge cases - #687

Closed
dmulcahey wants to merge 1 commit into
devfrom
pr/fix-async-event-lifecycle
Closed

Fix async/event lifecycle edge cases#687
dmulcahey wants to merge 1 commit into
devfrom
pr/fix-async-event-lifecycle

Conversation

@dmulcahey

Copy link
Copy Markdown
Contributor

Summary

Fixes async lifecycle edge cases in concurrency limiting, periodic polling cancellation, and async event listener handling.

Failing tests addressed

  • tests/test_async_.py::test_gather_with_limited_concurrency_zero_limit_rejected
  • tests/test_async_.py::test_periodic_cancellation_propagates
  • tests/test_event.py::test_event_base_once_async_multiple_emits_same_tick
  • tests/test_event.py::test_event_base_emit_async_callable_object

Verification

  • pytest (branch-local targeted run): all listed tests pass.

@dmulcahey
dmulcahey force-pushed the pr/fix-async-event-lifecycle branch from 39cf3cf to 1f15a84 Compare February 27, 2026 16:04
@dmulcahey
dmulcahey changed the base branch from dm/codex-issue-exploration to dev February 27, 2026 16:04
@dmulcahey dmulcahey closed this Feb 27, 2026
@dmulcahey dmulcahey reopened this Feb 27, 2026
@codecov

codecov Bot commented Feb 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.51%. Comparing base (9d03d63) to head (1f15a84).
⚠️ Report is 30 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #687      +/-   ##
==========================================
- Coverage   97.51%   97.51%   -0.01%     
==========================================
  Files          62       62              
  Lines       10949    10947       -2     
==========================================
- Hits        10677    10675       -2     
  Misses        272      272              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dmulcahey

dmulcahey commented Feb 27, 2026

Copy link
Copy Markdown
Contributor Author

for:

Updated the periodic decorator to re-raise CancelledError instead of swallowing it, ensuring correct cancellation propagation for periodic tasks.

Is this one we were preventing propagation of on purpose?

@dmulcahey

Copy link
Copy Markdown
Contributor Author

Closing as superseded by the refreshed #829. That PR focuses on the demonstrated event bugs: once-listeners firing more than once and callback-returned awaitables being ignored. The unrelated periodic-cancellation and zero-limit changes from this older PR were not retained because the review did not establish a current need for them.

@dmulcahey dmulcahey closed this Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant