fix(workspace): async test pollution in inbox_wrappers + push-mode queue delivery_mode #323

Closed
core-qa wants to merge 1 commits from fix/qa-307-test-a2a-inbox-wrappers-asyncio-refactor into main

1 Commits

Author SHA1 Message Date
902e367ab8 fix(workspace): async test pollution in inbox_wrappers + push-mode queue delivery_mode
Some checks failed
Secret scan / Scan diff for credential-shaped strings (pull_request) Failing after 1s
sop-tier-check / tier-check (pull_request) Failing after 1s
audit-force-merge / audit (pull_request) Has been skipped
Two fixes:

1. test_a2a_tools_inbox_wrappers.py — replace _run() helper (which used
asyncio.get_event_loop().run_until_complete()) with @pytest.mark.asyncio
decorated async def methods. The _run() approach created a nested event
loop that bypassed pytest-asyncio's lifecycle management, causing 14 tests
to fail when run in the full suite (exit 1) while passing in isolation.
Fixes regression introduced in abc3affc.

2. a2a_response.py — push-mode Queued variants now carry
delivery_mode="push" (not the poll-mode default "poll"). The push-mode
branch was returning Queued(method=method) without setting delivery_mode,
so callers got the wrong value. Updated Queued dataclass docstring to
document both poll and push modes.

Tests added in test_a2a_response.py:
- test_push_mode_queued_returns_queued_variant
- test_push_mode_queued_extracts_method
- test_push_mode_queued_default_method
- test_push_mode_queued_logs_info
- test_push_mode_takes_precedence_over_poll_mode

Also updated TestRegressionGate.test_every_fixture_classifies_to_expected_variant
to enumerate the 3 new push-mode fixtures.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

Refs: #307, #308
2026-05-10 13:03:24 +00:00