Normalize whitespace for all required fields in A2AExposedAgentCatalog#6
Merged
rdobrik merged 2 commits intocodex/add-a2a-supportfrom Mar 18, 2026
Merged
Conversation
Co-authored-by: rdobrik <8812511+rdobrik@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] [WIP] Address feedback on A2A runtime integration implementation
Normalize whitespace for all required fields in A2AExposedAgentCatalog
Mar 17, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses A2A exposed-agent routing mismatches by normalizing whitespace for required string fields at catalog construction time. It also updates build tooling by introducing the standard Apache Maven Wrapper scripts/config (including committing the wrapper jar).
Changes:
- Normalize and persist trimmed values for
agentId,name,planName, andplanVersioninA2AExposedAgentCatalog. - Replace the repo’s custom
mvnw/mvnw.cmdscripts with the standard Apache Maven Wrapper scripts. - Add Maven Wrapper configuration under
.mvn/wrapper/(properties + wrapper jar).
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
camel-agent-core/src/main/java/io/dscope/camel/agent/a2a/A2AExposedAgentCatalog.java |
Persists normalized (trimmed) values back onto agent specs during catalog construction. |
mvnw |
Replaced with standard Maven Wrapper POSIX shell script. |
mvnw.cmd |
Replaced with standard Maven Wrapper Windows batch script. |
.mvn/wrapper/maven-wrapper.properties |
Adds Maven Wrapper configuration (distribution + wrapper URL). |
.mvn/wrapper/maven-wrapper.jar |
Adds the Maven Wrapper jar as a committed binary artifact. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
23
to
+27
| String agentId = required(agent.getAgentId(), "agentId"); | ||
| required(agent.getName(), "name"); | ||
| required(agent.getPlanName(), "planName"); | ||
| required(agent.getPlanVersion(), "planVersion"); | ||
| agent.setAgentId(agentId); | ||
| agent.setName(required(agent.getName(), "name")); | ||
| agent.setPlanName(required(agent.getPlanName(), "planName")); | ||
| agent.setPlanVersion(required(agent.getPlanVersion(), "planVersion")); |
Comment on lines
23
to
+27
| String agentId = required(agent.getAgentId(), "agentId"); | ||
| required(agent.getName(), "name"); | ||
| required(agent.getPlanName(), "planName"); | ||
| required(agent.getPlanVersion(), "planVersion"); | ||
| agent.setAgentId(agentId); | ||
| agent.setName(required(agent.getName(), "name")); | ||
| agent.setPlanName(required(agent.getPlanName(), "planName")); | ||
| agent.setPlanVersion(required(agent.getPlanVersion(), "planVersion")); |
| # specific language governing permissions and limitations | ||
| # under the License. | ||
| distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.13/apache-maven-3.9.13-bin.zip | ||
| wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.0/maven-wrapper-3.3.0.jar |
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.
required()trims and returns the normalized value, but the trimmed result was only used foragentId—name,planName, andplanVersionwere validated but the spec retained the original (potentially whitespace-padded) values, causing silent mismatches during later lookups and routing.Changes
A2AExposedAgentCatalog: Set the trimmed return value fromrequired()back onto the spec for all four required string fields:💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.