Skip to content

feat(testing): make SellerA2AClient event drain configurable#763

Closed
sangilish wants to merge 2 commits into
adcontextprotocol:mainfrom
sangilish:feat/python-a2a-max-events-698
Closed

feat(testing): make SellerA2AClient event drain configurable#763
sangilish wants to merge 2 commits into
adcontextprotocol:mainfrom
sangilish:feat/python-a2a-max-events-698

Conversation

@sangilish
Copy link
Copy Markdown
Contributor

Summary

Refs #698.

This makes the A2A seller test harness event-drain budget configurable. SellerA2AClient.invoke() now accepts a keyword-only max_events argument that defaults to the existing hard cap of 32, so current callers keep the same behavior while tests for noisier A2A flows can opt into a larger drain budget.

What changed

  • Added max_events: int = 32 to SellerA2AClient.invoke().
  • Replaced the hardcoded 32-event drain loop with the caller-provided cap.
  • Updated the exhaustion error to report both timeout_seconds and max_events.
  • Added regression coverage for default-cap exhaustion and success with a larger cap.

Testing

Passed:

  • uv run python -m pytest tests/test_seller_a2a_client.py -q
  • uv run ruff check src/adcp/testing/harness.py tests/test_seller_a2a_client.py
  • uv run mypy src/adcp/testing tests/test_seller_a2a_client.py
  • uv run python -m pytest -q

Attempted broader checks:

  • uv run ruff check fails on pre-existing unrelated lint issues outside this PR's files (26 errors reported).
  • uv run mypy src tests fails on pre-existing unrelated type issues outside this PR's files (1688 errors in 160 files reported).

@github-actions
Copy link
Copy Markdown
Contributor

IPR Policy Agreement Required

@sangilish — thanks for the contribution. Before this PR can be merged, the AgenticAdvertising.Org IPR Policy requires your agreement.

To agree, post a new comment on this PR with the exact phrase:

I have read the IPR Policy

Your signature is recorded once and covers all contributions to AAO repositories. See signatures/README.md for what gets recorded and why.

@sangilish
Copy link
Copy Markdown
Contributor Author

I have read the IPR Policy

@github-actions
Copy link
Copy Markdown
Contributor

IPR Policy — signed

Thanks, @sangilish. Your agreement to the IPR Policy is recorded at signatures/ipr-signatures.json and applies to all AAO repositories.

aao-ipr-bot Bot pushed a commit to adcontextprotocol/adcp that referenced this pull request May 20, 2026
@sangilish
Copy link
Copy Markdown
Contributor Author

I have read the IPR Policy

@bokelley
Copy link
Copy Markdown
Contributor

Thanks, @sangilish — IPR acknowledgment noted.


Generated by Claude Code

@bokelley
Copy link
Copy Markdown
Contributor

Thanks @sangilish — IPR acknowledgment noted.


Generated by Claude Code

@sangilish sangilish marked this pull request as ready for review May 20, 2026 22:54
@sangilish
Copy link
Copy Markdown
Contributor Author

This is ready for review now. CI is green, and I kept the change scoped to #698 with the default behavior preserved.

@bokelley
Copy link
Copy Markdown
Contributor

Acknowledged — thanks for the heads-up. Noted that CI is green, default cap is preserved, and scope is limited to #698. No action needed from this routine; the PR is queued for human review.


Generated by Claude Code

Copy link
Copy Markdown
Contributor

@bokelley bokelley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Updated against main and rechecked the touched A2A harness surfaces locally.

@bokelley
Copy link
Copy Markdown
Contributor

Superseded by #829, which merged the same patch from a base-repo branch so the required CodeQL check could run. Thanks again @sangilish.

@bokelley bokelley closed this May 23, 2026
auto-merge was automatically disabled May 23, 2026 13:17

Pull request was closed

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.

2 participants