You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "terrymanu (via GitHub)" <gi...@apache.org> on 2026/06/29 16:11:11 UTC
[PR] Rename session attribution object to identity [shardingsphere]
terrymanu opened a new pull request, #38957:
URL: https://github.com/apache/shardingsphere/pull/38957
Rename MCPSessionAttribution to MCPSessionIdentity and update the session binding APIs to use identity terminology.
Keep session attribution source configuration and transport diagnostics unchanged because they are external configuration and error surfaces.
Add focused value-semantics tests for MCPSessionIdentity and update the affected MCP session and HTTP transport tests.
For #35294.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Rename session attribution object to identity [shardingsphere]
Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu merged PR #38957:
URL: https://github.com/apache/shardingsphere/pull/38957
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Rename session attribution object to identity [shardingsphere]
Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu commented on PR #38957:
URL: https://github.com/apache/shardingsphere/pull/38957#issuecomment-4834690732
### Summary
**Review Result: Mergeable**
Reason: This result is code-scope only for a Code Correctness Review. CI not reviewed by request. The PR consistently renames the MCP session value object and internal session binding API from attribution terminology to identity terminology, while preserving the external `sessionAttributionSource` configuration and `session_attribution_mismatch` diagnostic surfaces.
### Evidence
- `mcp/api/src/main/java/org/apache/shardingsphere/mcp/api/session/MCPSessionIdentity.java:26` defines the renamed value object with the same `subject`, `source`, and `attributes` fields and Lombok value semantics.
- `mcp/api/src/main/java/org/apache/shardingsphere/mcp/api/MCPHandlerContext.java:29` updates the handler context contract to `findSessionIdentity()`, and the old `findSessionAttribution()` symbol is no longer present in the PR head.
- `mcp/core/src/main/java/org/apache/shardingsphere/mcp/core/session/MCPSessionManager.java:46` stores `MCPSessionIdentity`, `bindSessionIdentity()` keeps the same existing-binding consistency check at lines 69-73, and `closeSession()` still removes the session-scoped identity at line 119.
- `mcp/bootstrap/src/main/java/org/apache/shardingsphere/mcp/bootstrap/transport/server/http/SessionAttributionResolver.java:52` and line 70 now resolve `MCPSessionIdentity`, but the resolver/config terminology remains attribution-source oriented, preserving the YAML and transport configuration surface.
- `mcp/bootstrap/src/main/java/org/apache/shardingsphere/mcp/bootstrap/transport/server/http/validator/ShardingSphereServerTransportSecurityValidator.java:61` still validates the session-bound value against the current request value, and the external HTTP error category/messages remain unchanged at lines 72-77.
- Tests cover the renamed value object and affected behavior: `mcp/api/src/test/java/org/apache/shardingsphere/mcp/api/session/MCPSessionIdentityTest.java:31`, `mcp/core/src/test/java/org/apache/shardingsphere/mcp/core/session/MCPSessionManagerTest.java:139`, and `mcp/bootstrap/src/test/java/org/apache/shardingsphere/mcp/bootstrap/transport/server/http/validator/ShardingSphereServerTransportSecurityValidatorTest.java:39`.
### Review Details
- Review Focus: Code Correctness Review. CI not reviewed by request.
- Reviewed Scope: PR #38957 latest head `723693ba58362a21710720e39b5a966ea27c1e28`; base `d9ed0bb2320c26f8eda320eb6afb2e67aaa1ff35`; merge-base `d9ed0bb2320c26f8eda320eb6afb2e67aaa1ff35`. Reviewed all 12 files reported by GitHub `/pulls/38957/files`; local triple-dot file list matched GitHub exactly.
- Not Reviewed Scope: GitHub Actions/check-runs and Actions logs; MCP E2E runtime behavior beyond local module verification.
- Verification: Fetched the PR head and base refs read-only. Verified no remaining `MCPSessionAttribution`, `findSessionAttribution`, `bindSessionAttribution`, or `sessionAttributions` references in the PR head. Ran `./mvnw -pl mcp/api,mcp/support,mcp/core,mcp/features/encrypt,mcp/features/mask,mcp/bootstrap,mcp/registry -am install -DskipITs -Dspotless.skip=true -Dsurefire.failIfNoSpecifiedTests=false -B -ntp` against a PR-head source snapshot; exit code 0, `BUILD SUCCESS`.
- Release Note / User Docs: Not required for this PR. The change is a Java API/internal naming cleanup in the MCP module, and the user-facing YAML key, docs wording, startup diagnostics, and transport error category remain unchanged.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org