Skip to content

fix: improve correctness and remove dead code across modules - #954

Merged
kabir merged 1 commit into
a2aproject:mainfrom
ehsavoie:fixes
Jun 29, 2026
Merged

kabir merged 1 commit into
a2aproject:mainfrom
ehsavoie:fixes

Conversation

@ehsavoie

Copy link
Copy Markdown
Collaborator
  • Fix null subject handling in server routes: use UnauthenticatedUser
    instead of AuthenticatedUser with empty string when subject is null
  • Handle uppercase hex digits in HtmlEscapeUtils unicode unescaping
    (< in addition to <), with tests
  • Extract buildPost() in REST transports to serialize the request body
    once instead of twice (once for logging, once for sending)
  • Add Message event handling in AuthorizationRequestHandlerDecorator to
    extract taskId from streaming messages
  • Remove deprecated A2AClientHTTPError constructors
  • Remove unused methods and fields: Utils_v0_3.unmarshalFrom(),
    Utils_v0_3.rethrow(), ServerCallContext.modelConfig,
    RequestContext.Builder getters, AsyncExecutorProducer.logPoolStats()

@ehsavoie
ehsavoie requested a review from kabir June 29, 2026 07:53

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces several cleanups, bug fixes, and robustness improvements across the SDK. Key changes include handling uppercase hex digits in HTML unescaping, ignoring CancellationException in the HTTP client's async error handling, deferring CDI context destruction for streaming endpoints in multi-version routes, and removing various unused methods, fields, and deprecated constructors. Feedback on these changes suggests optimizing the HTML unescaping utility with a fast-path check to avoid redundant string allocations, and limiting the exception cause traversal depth in the HTTP client to prevent potential infinite loops from circular references.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@ehsavoie
ehsavoie force-pushed the fixes branch 2 times, most recently from 605a42d to 5a8c308 Compare June 29, 2026 08:37
@ehsavoie

Copy link
Copy Markdown
Collaborator Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request refactors several components, including extracting shared POST request building logic in RestTransport (and its v0.3 compat counterpart), simplifying user authentication fallback to UnauthenticatedUser in server routes, removing various unused or deprecated methods and fields across the codebase, and adding support for retrieving task IDs from Message events in authorization handling. Additionally, HtmlEscapeUtils was updated to handle uppercase hex digits. Review feedback suggests simplifying the custom parsing loop in HtmlEscapeUtils by chaining standard String.replace calls, and adding defensive null checks in RestTransport to prevent potential NullPointerExceptions when serializing payloads.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

- Fix null subject handling in server routes: use UnauthenticatedUser
  instead of AuthenticatedUser with empty string when subject is null
- Handle uppercase hex digits in HtmlEscapeUtils unicode unescaping
  (< in addition to <), with tests
- Extract buildPost() in REST transports to serialize the request body
  once instead of twice (once for logging, once for sending)
- Add Message event handling in AuthorizationRequestHandlerDecorator to
  extract taskId from streaming messages
- Remove deprecated A2AClientHTTPError constructors
- Remove unused methods and fields: Utils_v0_3.unmarshalFrom(),
  Utils_v0_3.rethrow(), ServerCallContext.modelConfig,
  RequestContext.Builder getters, AsyncExecutorProducer.logPoolStats()

Signed-off-by: Emmanuel Hugonnet <[email protected]>
@kabir
kabir merged commit 12f5808 into a2aproject:main Jun 29, 2026
13 checks passed
@ehsavoie
ehsavoie deleted the fixes branch July 28, 2026 12:36
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