fix: address A2A runtime review feedback — interface types, port fallback, reflection, and field normalization#2
Merged
rdobrik merged 3 commits intocodex/add-a2a-supportfrom Mar 18, 2026
Conversation
… issues Co-authored-by: rdobrik <8812511+rdobrik@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add initial A2A runtime integration
fix: address A2A runtime review feedback — interface types, port fallback, reflection, and field normalization
Mar 17, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR appears to simplify bean lookup/binding behavior (removing reflective access to Camel Main internals) and to generalize A2A task event infrastructure from a concrete InMemoryTaskEventService to the TaskEventService abstraction.
Changes:
- Removed reflective registry access from
SampleAdminMcpBindingsand switched toMain.lookup(...). - Updated
AgentA2AProtocolSupportto treat the task event service asTaskEventService(instead ofInMemoryTaskEventService). - Updated the corresponding unit test lookup to use
TaskEventService.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| samples/agent-support-service/src/main/java/io/dscope/camel/agent/samples/SampleAdminMcpBindings.java | Removes reflection-based registry lookup and adjusts lookup/required helpers (currently introduces a compile break). |
| camel-agent-core/src/main/java/io/dscope/camel/agent/a2a/AgentA2AProtocolSupport.java | Switches shared infrastructure and streaming processor wiring to depend on TaskEventService. |
| camel-agent-core/src/test/java/io/dscope/camel/agent/a2a/AgentA2AProtocolSupportTest.java | Aligns test assertions with the new TaskEventService-typed lookup. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
280
to
287
| private static Object lookup(Main main, String name) { | ||
| Object value = lookupFromRegistry(main, name); | ||
| if (value == null) { | ||
| value = main.lookup(name, Object.class); | ||
| } | ||
| Object value = main.lookup(name, Object.class); | ||
| return value != null ? value : new ObjectMapper(); | ||
| } | ||
|
|
||
| private static Object required(Main main, String name) { | ||
| Object value = lookupFromRegistry(main, name); | ||
| if (value == null) { | ||
| value = main.lookup(name, Object.class); | ||
| } | ||
| Object value = main.lookup(name, Object.class); | ||
| if (value == null) { |
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.
Seven issues flagged in PR review #3939584374 across the A2A runtime, tool client, exposed-agent catalog, and sample bindings.
Changes
AgentA2AProtocolSupport— replace hard-codedInMemoryTaskEventServicewithTaskEventServiceinterface in bean lookup,SharedA2AInfrastructurerecord, andSendStreamingMessageProcessor; a pre-boundPersistentA2ATaskEventServicewas silently ignored, causing a split task/event spaceA2AToolClient— check HTTP status code before parsing response body as JSON; previously a non-JSON 4xx/5xx body threw aJsonParseExceptioninstead of a meaningful HTTP errorA2ARuntimeProperties— addagui.rpc.portto the port fallback chain so sample/test configs that drive the server viaagui.rpc.portstay consistent with the A2A advertised URLAgentRuntimeBootstrap— guardticketLifecycleProcessorbinding with a null check; previously overwrote any application-provided processor unconditionallyA2AExposedAgentCatalog— write trimmed values back toname,planName, andplanVersionon the spec; trimmed results were previously computed but discarded, so whitespace-padded configs passed validation but broke routingSampleAdminMcpBindings— removelookupFromRegistrywhich accessedMain.registryviaField.setAccessible; replaced with the publicmain.lookup(name, Object.class)APIdocs/roadmap.md— replace absolute local filesystem path with a repo-relative link💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.