Skip to content

fix(server): recover failed terminal enqueues - #1185

Merged
ehsavoie merged 7 commits into
a2aproject:mainfrom
kabir:fix/1183-agent-emitter-terminal-event
Sep 28, 2026
Merged

ehsavoie merged 7 commits into
a2aproject:mainfrom
kabir:fix/1183-agent-emitter-terminal-event

Conversation

@kabir

@kabir kabir commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator

Description

Roll back the emitter terminal latch when enqueueing fails, and preserve fallback InternalError delivery after an interrupted enqueue by restoring the worker interrupt only after reporting the error.

  • Followed the contributing guide
  • Used a Conventional Commit title
  • Verified with mvn -pl server-common test (526 tests passed)
  • Updated READMEs where needed (none needed)

Fixes #1183 🦕

@ehsavoie
ehsavoie self-requested a review September 28, 2026 11:12
@kabir
kabir force-pushed the fix/1183-agent-emitter-terminal-event branch from ec93811 to a35a752 Compare September 28, 2026 11:54
kabir and others added 2 commits September 28, 2026 13:17
- Invoke onClose() inside synchronized block for atomic state updates
- Deduplicate isFinalEvent() into parent EventQueue
- Skip closed child queues during event dispatch
- Decrement submittedFinalEvents instead of resetting to zero
- Reset pendingFinalEvents in clearAwaitingFinalEvent()
- Handle enqueue timeout and max-retries gracefully in DefaultRequestHandler

Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com>
@ehsavoie
ehsavoie merged commit dabca6c into a2aproject:main Sep 28, 2026
15 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.

[Bug]: AgentEmitter remains terminal when terminal event enqueue fails

2 participants