Skip to content

Upstream Merge - #192

Merged
Sandeep-BA merged 12 commits into
redbus-labs:mainfrom
google:main
Aug 19, 2026
Merged

Upstream Merge#192
Sandeep-BA merged 12 commits into
redbus-labs:mainfrom
google:main

Conversation

@Sandeep-BA

Copy link
Copy Markdown
Collaborator

Please ensure you have read the contribution guide before creating a pull request.

Link to Issue or Description of Change

1. Link to an existing issue (if applicable):

  • Closes: #issue_number
  • Related: #issue_number

2. Or, if no issue exists, describe the change:

If applicable, please follow the issue templates to provide as much detail as
possible.

Problem:
A clear and concise description of what the problem is.

Solution:
A clear and concise description of what you want to happen and why you choose
this solution.

Testing Plan

Please describe the tests that you ran to verify your changes. This is required
for all PRs that are not small documentation or typo fixes.

Unit Tests:

  • I have added or updated unit tests for my change.
  • All unit tests pass locally.

Please include a summary of passed java test results.

Manual End-to-End (E2E) Tests:

Please provide instructions on how to manually test your changes, including any
necessary setup or configuration. Please provide logs or screenshots to help
reviewers better understand the fix.

Checklist

  • I have read the CONTRIBUTING.md document.
  • My pull request contains a single commit.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have manually tested my changes end-to-end.
  • Any dependent changes have been merged and published in downstream modules.

Additional context

Add any other context or screenshots about the feature request here.

MiloszSobczyk and others added 12 commits August 10, 2026 02:41
`StreamHandler.handleEvent` called `ResponseConverter.clientEventToEvent` with no
guard, so a conversion failure escaped into the transport's read loop and
whether the caller saw anything at all depended on what that loop did with it.

On the default JSON-RPC/SSE transport it does terminate today, but only by
accident of an implementation detail: the throw escapes the body subscriber in
`JdkA2AHttpClient` and the JDK's own line-subscriber adapter catches it, cancels
the subscription and re-signals it as `onError`. Nothing in the A2A client
guarantees that - `Client` catches only `A2AClientError` and the SSE listener
only `JsonProcessingException` - and a gRPC `StreamObserver` or a custom
`A2AHttpClient` need not behave the same way. The error also arrives mislabelled
as `Failed to communicate with the remote agent` when the connection was fine
and the payload was not.

Fail the flow in the handler with a message that names the real cause, then
rethrow so the transport still tears the connection down as it does today.

The rethrow is skipped in exactly one case: synchronous dispatch, where
`Client.sendMessage` invokes the consumer inline and `Flowable.create` has
already failed the flow, so throwing into it would only add an undeliverable
through `RxJavaPlugins`. That case is identified by both being inside the
`sendMessage` call and running on the subscribe thread. Each condition alone
misses a different transport, and both misses silently leak the connection:
thread identity alone misses a transport that delivers on the subscribe thread
after `sendMessage` returns, and the `sendMessage` window alone misses a
transport thread that delivers while the call is still on the stack.

`handleError` is idempotent, so a transport that re-signals cannot double-report
to the subscriber.

Behaviour change for non-streaming callers: a conversion failure previously
reached the subscriber as the raw `IllegalArgumentException`, because
`Flowable.create` passed the throw straight through. It is now wrapped in
`A2AClientError` with the original as the cause, which is what makes the two
paths consistent.

PiperOrigin-RevId: 962031390
Introduce an adk.build.directory property (default ${project.basedir}/target)
used as the build output directory, so the location can be relocated with
-Dadk.build.directory=... without changing the default.

PiperOrigin-RevId: 962178122
… and interrupted task states

PiperOrigin-RevId: 964059169
… IDs on AUTH_REQUIRED state

PiperOrigin-RevId: 965910141
@Sandeep-BA
Sandeep-BA merged commit 25969b2 into redbus-labs:main Aug 19, 2026
1 of 6 checks passed
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.

7 participants