Skip to content

fix(a2a): apply configured blocking timeouts, echo A2A-Extensions responses, notification subscription lifecycle - #94

Merged
Zhoujie628 merged 3 commits into
project-openan:mainfrom
Zhoujie628:main
Oct 14, 2026
Merged

Zhoujie628 merged 3 commits into
project-openan:mainfrom
Zhoujie628:main

Conversation

@Zhoujie628

@Zhoujie628 Zhoujie628 commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This PR contains 3 commits addressing three correctness issues in the A2A-T server-side Spring wiring.

1. fix: keep workbench notification subscriptions state-independent

Decouples workbench Notification-T subscriptions from workflow Task-T session state; a subscription stays open until a recovery result, explicit cancellation, or workbench shutdown.

2. fix(a2a): apply configured blocking timeouts to the builder-built request handler

  • a2a-java's DefaultRequestHandler.Builder.build() hardcodes blocking-call timeouts (agent=5s / consumption=2s / reconciliation=1s) and never consults A2AConfigProvider (only the CDI @PostConstruct path reads it). Under Spring wiring the configuration is therefore silently ignored: a blocking message:send returns a WORKING snapshot after 5 seconds while the agent keeps running — a silent failure for any real agent task (LLM calls, multi-step workflow steps).
  • Fix: apply the A2AProperties values directly after build() via reflection (fails fast if the SDK field layout changes) and log the effective values.
  • A2AProperties defaults 30/5/1 → 900/960/60 seconds; positive() validation kept (0 remains rejected; disabling blocking is the caller's returnImmediately choice, not a zero timeout).
  • The new test exercises the real build→apply path (reflectively reads back the handler fields, asserting the 5s baseline first) instead of only asserting the ConfigProvider mapping.

3. feat(a2a): echo requested supported extensions via A2A-Extensions response header

Success responses now echo the A2A-Extensions header listing the requested extensions that the AgentCard declares, so extension-aware clients can verify server participation per the A2A extension mechanism. Requested-but-undeclared extensions are not activated and stay out of the list; error responses are unchanged. Covered by MockMvc tests for the supported, unsupported, and no-declaration cases.

Verification

  • Full reactor mvn -B test BUILD SUCCESS (workflow-engine, spring-boot-starter, samples)
  • spotless:apply formatting; google-java-format check passes
  • All three commits carry a DCO Signed-off-by trailer

Follow-up

After merge, publish net.openan.workflow.sdk:spring-boot-starter:0.1.2 to Maven Central (the current Central latest, 0.1.1, still ships the blocking-timeout bug).

Signed-off-by: Zhoujie628 <zhoujie628@users.noreply.github.com>
@Zhoujie628
Zhoujie628 requested a review from a team as a code owner October 13, 2026 22:06
…uest handler

DefaultRequestHandler.Builder.build() hardcodes agent=5s/consumption=2s/
reconciliation=1s and never consults A2AConfigProvider (only the CDI
@PostConstruct path reads it). A builder-assembled handler therefore
returned a WORKING task snapshot after 5 seconds while the agent kept
running, silently breaking blocking message:send for any real agent task
(LLM calls, multi-step workflow steps).

- apply the A2AProperties values directly after build (reflection, fails
  fast if the SDK field layout changes) and log the effective values
- raise A2AProperties defaults 30/5/1 -> 900/960/60 seconds; positive()
  validation kept (0 remains rejected; disabling blocking is the caller's
  returnImmediately choice, not a zero timeout)
- new test exercises the real build->apply path (reads back the handler
  fields) instead of only the ConfigProvider mapping

Signed-off-by: ZhouJie6 <ivo.zhou@huawei.com>
…ponse header

Success responses now carry A2A-Extensions listing the requested extensions
that the agent card declares, so extension-aware clients can verify server
participation per the A2A extension mechanism. Requested-but-undeclared
extensions are not activated and stay out of the list; error responses are
unchanged. Covered by a MockMvc test for the supported, unsupported, and
no-declaration cases.

Signed-off-by: ZhouJie6 <ivo.zhou@huawei.com>
@Zhoujie628 Zhoujie628 changed the title fix: keep workbench notification subscriptions state-independent fix(a2a): apply configured blocking timeouts, echo A2A-Extensions responses, notification subscription lifecycle Oct 14, 2026
@Zhoujie628
Zhoujie628 merged commit c926446 into project-openan:main Oct 14, 2026
3 checks passed
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