Skip to content

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

Open
LukeSantossz wants to merge 2 commits intoAutoMQ:mainfrom
LukeSantossz:fix/router-out-size-validation
Open

fix(zerozone): add response size validation in RouterOut.handleRouter…#3261
LukeSantossz wants to merge 2 commits 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.

superhx
superhx previously approved these changes Mar 30, 2026
@superhx
Copy link
Copy Markdown
Collaborator

superhx commented Apr 20, 2026

@LukeSantossz Hi, the CI check has failed. Could you please take a look and fix it.

- Remove unused import CompletableFuture
- Replace assertEquals(null, ...) with assertNull(...)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@LukeSantossz LukeSantossz marked this pull request as draft April 20, 2026 03:17
@LukeSantossz LukeSantossz marked this pull request as ready for review April 20, 2026 03:18
@LukeSantossz
Copy link
Copy Markdown
Author

@LukeSantossz Hi, the CI check has failed. Could you please take a look and fix it.

Hey @superhx, I've sent a new commit that should fix the CI/CD tests — could you confirm it works?

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