Repository navigation
Conversation
🧪 Code Coverage (vs
|
| Base | PR | Delta | |
|---|---|---|---|
| src/a2a/server/agent_execution/active_task.py | 95.81% | 96.04% | 🟢 +0.23% |
| src/a2a/server/agent_execution/active_task_registry.py | 97.78% | 97.89% | 🟢 +0.12% |
| Total | 93.03% | 93.06% | 🟢 +0.03% |
Generated by coverage-comment.yml
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
DefaultRequestHandlerV2 ignores the deprecated
queue_manageroption, so applications cannot configure its local event-buffer capacity. Add keyword-onlymax_event_queue_size, defaulting to 1024, to the handler, registry and ActiveTask. Forward it to both event sources, the agent's default sink and every local subscriber tap, and reject nonpositive values at construction.The capacity counts events per buffer, including internal lifecycle markers. The default sink keeps backpressure and full subscriber taps keep eviction. Pending requests, shared storage and cross-replica streams are outside this setting.
Small capacities can evict a send request's subscription before it receives a direct Message. Preserve the validated Message and any consumer error or cancellation so the fallback completes correctly without waiting for producer cleanup. Task responses retain the existing stored-snapshot fallback, which can be non-terminal after eviction; the API docstrings explain this behavior.
Regressions cover capacity propagation, backpressure and recovery, slow-subscriber eviction with fast and late subscribers, direct-Message validation/error/cancellation paths, and local and cross-replica send/subscribe/cancel behavior.
Validation
On base
e12d494b, Python 3.12.15:./scripts/lint.sh: passed, with three existing ty warnings in client files.uv run pytest -p fixture_output_drain: 2358 passed, 199 skipped, 3 xfailed, 1 xpassed.uv run pytest -p fixture_output_drain --cov=src --cov-report=term-missing --cov-fail-under=88: the same test counts, 93.19% coverage.The temporary local
fixture_output_drainplugin continuously drains stdout/stderr from the two cross-version fixture servers. On this host, undrained pipes caused four cross-version timeouts on the earlier unchanged base as well as the candidate; draining the pipes made all four pass without changing assertions or deadlines. The fixture and plugin are not changed or added by this PR.The 199 skips are 99 PostgreSQL and 99 MySQL cases without test database DSNs, plus one SQLite row-lock case. The existing xfail/xpass cases reference #869.
Fixes #1339