Skip to content

Normalize whitespace for all required fields in A2AExposedAgentCatalog#6

Merged
rdobrik merged 2 commits intocodex/add-a2a-supportfrom
copilot/sub-pr-1-one-more-time
Mar 18, 2026
Merged

Normalize whitespace for all required fields in A2AExposedAgentCatalog#6
rdobrik merged 2 commits intocodex/add-a2a-supportfrom
copilot/sub-pr-1-one-more-time

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 17, 2026

required() trims and returns the normalized value, but the trimmed result was only used for agentIdname, planName, and planVersion were 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 from required() back onto the spec for all four required string fields:
// Before: trimmed value discarded for name/planName/planVersion
String agentId = required(agent.getAgentId(), "agentId");
required(agent.getName(), "name");
required(agent.getPlanName(), "planName");
required(agent.getPlanVersion(), "planVersion");

// After: spec normalized at construction time
String agentId = required(agent.getAgentId(), "agentId");
agent.setAgentId(agentId);
agent.setName(required(agent.getName(), "name"));
agent.setPlanName(required(agent.getPlanName(), "planName"));
agent.setPlanVersion(required(agent.getPlanVersion(), "planVersion"));

💬 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.

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
Copilot AI requested a review from rdobrik March 17, 2026 20:46
@rdobrik rdobrik marked this pull request as ready for review March 18, 2026 16:06
Copilot AI review requested due to automatic review settings March 18, 2026 16:06
@rdobrik rdobrik merged commit 54a688c into codex/add-a2a-support Mar 18, 2026
1 check passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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, and planVersion in A2AExposedAgentCatalog.
  • Replace the repo’s custom mvnw/mvnw.cmd scripts 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
@rdobrik rdobrik deleted the copilot/sub-pr-1-one-more-time branch March 18, 2026 16:28
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.

3 participants