Skip to content

fix(a2a): preserve completed status update messages - #3784

Merged
jujn merged 1 commit into
agentscope-ai:mainfrom
pengmoubuaixuexi:fix/a2a-completed-status-fallback
Oct 27, 2026
Merged

jujn merged 1 commit into
agentscope-ai:mainfrom
pengmoubuaixuexi:fix/a2a-completed-status-fallback

Conversation

@pengmoubuaixuexi

Copy link
Copy Markdown
Contributor

AgentScope-Java Version

2.1.0-SNAPSHOT, based on main@16cb024ae62a10db2aedc2371f4d729194ffda82 (A2A Java SDK 1.4.0.Final).

Description

Closes #3783.

A completed TaskStatusUpdateEvent can contain the answer in status.message with no artifacts. TaskUpdateEventHandler currently returns an empty message in this case, while the full TaskEvent path retains the status message.

Use the final status message when a completed update has no artifacts. Preserve artifact priority and the existing no-output completion behavior. The regression checks both call() and streamEvents() terminal results, plus artifact priority and completion without either output source. Update the English and Chinese A2A guides.

Validation

  • Before the production fix, the new public-API regression fails on upstream main: expected: <status-only answer> but was: <> (1 test, 1 failure).
  • After the fix, all 3 new regression tests pass.
  • A2A client and server clean verify: 140 + 179 tests, 0 failures/errors/skips, including Spotless and packaging. Dependencies were built from the same checkout with tests skipped before running the two affected module suites. On Windows, a clean build with process-local JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8 avoids an incremental Javadoc encoding error.
  • Docs: 13 tests and build validation pass. Broken-link checking returns 2,218 links in 326 files; the unmodified baseline produces the identical list.
  • git diff --check: pass.
mvn -B -T1C -pl :agentscope-extensions-a2a-client -am \
  '-Dtest=A2aAgentTest#testCompletedTaskUpdate*' \
  -Dsurefire.failIfNoSpecifiedTests=false test
mvn -B -T1C -pl :agentscope-extensions-a2a-server -am -DskipTests install
# Run with JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8 on this Windows machine:
mvn -B -T1C -pl :agentscope-extensions-a2a-client,:agentscope-extensions-a2a-server clean verify
# In docs/:
npm test
npm run validate
npm run broken-links

Broader reactor verification was attempted but is not green locally: Core's two symbolic-link tests cannot create links with this Windows account. A second attempt excluding those two methods encountered an unrelated GracefulShutdownTest.StateAndConfigTests.defaultConfig assertion (expected null, got PT0.1S). Core production/test sources are unchanged. Repository-wide verification remains for CI.

The regression uses controlled SDK callbacks, without a real remote agent, transport, or model service. Investigation, implementation, and verification used Codex assistance.

Checklist

  • Code formatted with Spotless.
  • All affected A2A client/server tests pass; broader Core limitations are disclosed above.
  • No public API or Javadoc contract changes.
  • English and Chinese documentation updated.
  • Diff reviewed and ready for maintainer review.

Copilot AI balanced review requested due to automatic review settings October 27, 2026 00:20
@mintlify

mintlify Bot commented Oct 27, 2026

Copy link
Copy Markdown

Preview approval required

This pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit a541591.

Approve preview

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@guslegend0510 guslegend0510 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.

LGTM

@jujn
jujn merged commit 00e4a66 into agentscope-ai:main Oct 27, 2026
7 checks passed
chickenlj pushed a commit that referenced this pull request Nov 13, 2026
Backport the verified fix to the 2.0.x implementation and retain its existing public contracts where the upstream kernel differs.

(cherry picked from commit 00e4a66)
Backport-review-patch: d05e82e29a68b54d1a10cc3a3c6fa27eeb1da6ad
Constraint: No AgentScope Service or SDK migration
Confidence: high
Not-tested: Whole-repository verification pending after lane integration
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.

[Bug]: Completed A2A status updates lose their response message when artifacts are empty

4 participants