Skip to content

Conversation

@tzolov
Copy link
Collaborator

@tzolov tzolov commented Sep 9, 2025

  • Sort annotated methods by name in all provider classes to ensure consistent processing order
  • Apply sorting to 32 provider classes across tool, resource, prompt, complete, progress, logging, sampling, and elicitation providers
  • Include both sync/async and stateless variants
  • Add test infrastructure improvements with CountDownLatch for better async testing
  • Ensures deterministic behavior across different JVM runs and environments

This change improves reliability by eliminating non-deterministic method ordering that could lead to inconsistent behavior in MCP server implementations.

- Sort annotated methods by name in all provider classes to ensure consistent processing order
- Apply sorting to 32 provider classes across tool, resource, prompt, complete, progress, logging, sampling, and elicitation providers
- Include both sync/async and stateless variants
- Add test infrastructure improvements with CountDownLatch for better async testing
- Ensures deterministic behavior across different JVM runs and environments

This change improves reliability by eliminating non-deterministic method ordering that could lead to inconsistent behavior in MCP server implementations.

Signed-off-by: Christian Tzolov <[email protected]>
@tzolov tzolov added this to the 0.4.0 milestone Sep 9, 2025
@tzolov tzolov merged commit 302c994 into spring-ai-community:main Sep 9, 2025
1 check passed
tzolov added a commit that referenced this pull request Sep 9, 2025
- Sort annotated methods by name in all provider classes to ensure consistent processing order
- Apply sorting to 32 provider classes across tool, resource, prompt, complete, progress, logging, sampling, and elicitation providers
- Include both sync/async and stateless variants
- Add test infrastructure improvements with CountDownLatch for better async testing
- Ensures deterministic behavior across different JVM runs and environments

This change improves reliability by eliminating non-deterministic method ordering that could lead to inconsistent behavior in MCP server implementations.

Signed-off-by: Christian Tzolov <[email protected]>
@tzolov
Copy link
Collaborator Author

tzolov commented Sep 9, 2025

backported to 0.3.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant