You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test(a2a): assert TaskResult content for rejected and auth-required states (#270)
* test(a2a): assert TaskResult content for rejected and auth-required states
Closes#263 (item 3 — test coverage gaps for A2A 1.0 states).
Prior tests for TASK_STATE_REJECTED and TASK_STATE_AUTH_REQUIRED only
asserted adapter.active_task_id behavior. These new tests also capture
the full TaskResult: status, data, message, and metadata["status"].
The gap-documenting test (adcp_error DataPart not extracted for
non-COMPLETED states) explicitly asserts data=None today and flags the
future fix path in a comment.
https://claude.ai/code/session_01MxALGppjocjuZzDVp48tps
* test(a2a): address review — strict xfail + parity assertions
Acting on code-reviewer feedback on this PR:
- Convert the gap-documenting test from a passing assertion of buggy
behavior to ``pytest.mark.xfail(strict=True)`` asserting the desired
post-fix behavior. Strict mode flips the test to failure when someone
fixes the gap, so we keep the regression-trip benefit without the
test name reading as endorsement of the bug.
- Split the original mixed-payload test into two: one strict-xfail for
the structured-error extraction we want, one passing test that pins
the TextPart-extraction half (regression guard for the human message
surfacing across REJECTED with a DataPart present).
- Add ``task_id``/``context_id`` assertions to the REJECTED test for
parity with the AUTH_REQUIRED test — the else-branch in
``_process_task_response`` always sets both, regardless of state.
- Add ``result.error is None`` and ``result.success is True`` assertions
to both REJECTED and AUTH_REQUIRED tests. The ``success=True`` line
is annotated as ``# FIXME: semantically wrong for REJECTED`` so
future-us has a hook for the eventual fix.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments