Skip to content

fix(zerozone): add response size validation in RouterOut.handleRouter…#3261

Open
LukeSantossz wants to merge 1 commit intoAutoMQ:mainfrom
LukeSantossz:fix/router-out-size-validation
Open

fix(zerozone): add response size validation in RouterOut.handleRouter…#3261
LukeSantossz wants to merge 1 commit intoAutoMQ:mainfrom
LukeSantossz:fix/router-out-size-validation

Conversation

@LukeSantossz
Copy link
Copy Markdown

@LukeSantossz LukeSantossz commented Mar 26, 2026

Summary

  • Add defensive validation to check if response count matches request count in handleRouterResponse
  • Prevents IndexOutOfBoundsException when response size mismatches
  • Gracefully completes all requests with UNKNOWN_SERVER_ERROR on mismatch
  • Add unit tests for ProxyRequest error handling

Test plan

  • Unit tests added (RouterOutTest.java)
  • CI passes

…Response

Add defensive validation to check if response count matches request count
in handleRouterResponse. Previously, if the response list had fewer items
than the request list, an IndexOutOfBoundsException would be thrown.

Now the method:
- Validates that responses.size() equals proxyRequests.size()
- Logs an error with details when mismatch occurs
- Gracefully completes all requests with UNKNOWN_SERVER_ERROR
- Returns early to prevent the exception

Also adds unit tests for ProxyRequest error handling behavior.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 26, 2026

CLA assistant check
All committers have signed the CLA.

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