@@ -169,47 +169,85 @@ Official source URLs:
169169 - Current evidence:
170170 ` test/e2e/mcp/src/test/java/org/apache/shardingsphere/test/e2e/mcp/support/transport/client/AbstractProcessMCPStdioInteractionClient.java:117 `
171171 sends ` notifications/initialized ` .
172- - Current evidence:
173- ` test/e2e/mcp/src/test/java/org/apache/shardingsphere/test/e2e/mcp/support/transport/client/MCPHttpInteractionClient.java:49-70 `
174- and ` AbstractHttpProgrammaticRuntimeE2ETest.java:49-52 ` initialize HTTP sessions without the notification.
175- - Target: HTTP helper lifecycle contract, HTTP E2E contract, and a sourced exception note if the SDK transport handles it internally.
172+ - Closure evidence:
173+ ` test/e2e/mcp/src/test/java/org/apache/shardingsphere/test/e2e/mcp/support/transport/MCPInteractionProtocolSupport.java:88 `
174+ and ` MCPHttpTransportTestSupport.java:95 ` serialize JSON-RPC notifications for HTTP helpers.
175+ - Closure evidence:
176+ ` test/e2e/mcp/src/test/java/org/apache/shardingsphere/test/e2e/mcp/support/transport/client/MCPHttpInteractionClient.java:70 `
177+ and ` MCPHttpInteractionClient.java:115-122 ` send ` notifications/initialized ` and require HTTP ` 202 ` after initialize.
178+ - Closure evidence:
179+ ` test/e2e/mcp/src/test/java/org/apache/shardingsphere/test/e2e/mcp/runtime/programmatic/AbstractHttpProgrammaticRuntimeE2ETest.java:53 `
180+ and ` AbstractHttpProgrammaticRuntimeE2ETest.java:70-73 ` apply the same initialized notification to programmatic HTTP E2E setup.
181+ - Closure evidence:
182+ ` test/e2e/mcp/src/test/java/org/apache/shardingsphere/test/e2e/mcp/runtime/programmatic/HttpTransportContractE2ETest.java:56-69 `
183+ proves the HTTP contract path returns a session, protocol version, and accepts the initialized notification.
184+ - Target: closed for HTTP and STDIO lifecycle evidence.
176185
177186- ** MCE-P1-005 Positive completion coverage**
178187 - Source: MCP completion returns successful suggestions for supported argument, prompt, and resource-reference targets.
179188 - Current evidence:
180189 ` mcp/bootstrap/src/test/java/org/apache/shardingsphere/mcp/bootstrap/transport/completion/MCPCompletionSpecificationFactoryTest.java:49-154 `
181190 covers positive unit-level providers and negative cases.
182- - Current evidence:
183- ` test/e2e/mcp/src/test/java/org/apache/shardingsphere/test/e2e/mcp/runtime/production/ProductionH2RuntimeSmokeE2ETest.java:97-100 `
184- has one H2 schema completion smoke.
185- - Target E2E: metadata table, column, index, and sequence completion in ` HttpTransportContractE2ETest `
186- or ` MetadataDiscoveryE2ETest ` ; algorithm completion in encrypt and mask workflow E2E; plan-id completion in workflow approval E2E.
191+ - Closure evidence:
192+ ` mcp/core/src/main/resources/META-INF/shardingsphere-mcp/descriptors/core.yaml:438-498 `
193+ declares resource-reference completion targets for schema, table, column, index, and sequence detail templates.
194+ - Closure evidence:
195+ ` mcp/support/src/main/resources/META-INF/shardingsphere-mcp/descriptors/support.yaml:126-137 `
196+ keeps prompt completion targets limited to declared prompt arguments for ` inspect_metadata ` and ` safe_sql_execution ` .
197+ - Closure evidence:
198+ ` mcp/features/encrypt/src/main/resources/META-INF/shardingsphere-mcp/descriptors/encrypt.yaml:99-106 `
199+ declares encrypt prompt arguments that were already used by encrypt completion targets.
200+ - Closure evidence:
201+ ` mcp/support/src/main/java/org/apache/shardingsphere/mcp/support/descriptor/MCPDescriptorCatalogValidator.java:398-421 `
202+ rejects prompt completion targets that name undeclared prompt arguments.
203+ - Closure evidence:
204+ ` test/e2e/mcp/src/test/java/org/apache/shardingsphere/test/e2e/mcp/runtime/programmatic/HttpTransportCompletionE2ETest.java:45-95 `
205+ covers metadata, algorithm, and current-session workflow ` plan_id ` completion through the HTTP product path.
206+ - Closure evidence:
207+ ` test/e2e/mcp/src/test/java/org/apache/shardingsphere/test/e2e/mcp/runtime/production/HttpProductionProxyEncryptWorkflowE2ETest.java:52 `
208+ and ` HttpProductionProxyMaskWorkflowE2ETest.java:51-52 ` cover production Proxy algorithm completion using standard prompt references.
209+ - Target: closed for 016 positive E2E coverage; package 015 remains owner for broader completion dispatch/API generalization.
187210
188211- ** MCE-P1-006 Resource URI encoding boundaries**
189212 - Source: MCP resources use URI templates, and resource-not-found should be surfaced as protocol errors.
190213 - Current evidence:
191214 ` mcp/support/src/main/java/org/apache/shardingsphere/mcp/support/resource/MCPUriTemplateUtils.java:83-90 `
192215 percent-encodes URI variables.
193- - Current evidence:
194- ` mcp/core/src/main/java/org/apache/shardingsphere/mcp/core/resource/uri/MCPUriPattern.java:127-140 `
195- decodes URI variables.
196- - Current evidence:
197- ` mcp/core/src/test/java/org/apache/shardingsphere/mcp/core/resource/uri/MCPUriPatternTest.java:73-78 `
198- and ` mcp/core/src/test/java/org/apache/shardingsphere/mcp/core/tool/handler/metadata/SearchMetadataToolServiceTest.java:196-203 `
199- already cover encoded value parsing at unit scope.
200- - Target E2E: ` MetadataDiscoveryE2ETest ` product-level encoded spaces, encoded slashes,
201- reserved characters, malformed encoding, missing variables, and unsupported resources.
216+ - Closure evidence:
217+ ` mcp/support/src/main/java/org/apache/shardingsphere/mcp/support/resource/MCPUriTemplateUtils.java:103-130 `
218+ decodes UTF-8 path segments, preserves literal ` + ` , and rejects malformed percent-encoding.
219+ - Closure evidence:
220+ ` mcp/core/src/main/java/org/apache/shardingsphere/mcp/core/resource/uri/MCPUriPattern.java:134-146 `
221+ rejects raw template markers and resource URIs with invalid path-segment encoding.
222+ - Closure evidence:
223+ ` mcp/support/src/test/java/org/apache/shardingsphere/mcp/support/resource/MCPUriTemplateUtilsTest.java:58-72 `
224+ and ` mcp/core/src/test/java/org/apache/shardingsphere/mcp/core/resource/uri/MCPUriPatternTest.java `
225+ cover encoded spaces, encoded slashes, reserved characters, literal plus signs, malformed encoding, and unexpanded template variables at unit scope.
226+ - Closure evidence:
227+ ` test/e2e/mcp/src/test/java/org/apache/shardingsphere/test/e2e/mcp/runtime/programmatic/MetadataDiscoveryE2ETest.java:190-218 `
228+ covers encoded resource URIs, malformed encoding, and unexpanded template variables through the HTTP product path.
229+ - Target: closed for resource URI encoding product evidence.
202230
203231- ** MCE-P1-007 Session and transaction isolation**
204232 - Source: Streamable HTTP sessions and DELETE lifecycle behavior.
205- - Current evidence:
206- ` test/e2e/mcp/src/test/java/org/apache/shardingsphere/test/e2e/mcp/runtime/programmatic/HttpTransportSessionLifecycleE2ETest.java:39-79 `
207- covers delete and missing-session behavior.
208- - Current evidence:
209- ` test/e2e/mcp/src/test/java/org/apache/shardingsphere/test/e2e/mcp/runtime/programmatic/ExecuteQueryTransactionE2ETest.java:87-98 `
210- covers cross-database transaction switching in one session.
211- - Target: two-client HTTP isolation, transaction cleanup after DELETE, workflow approval cleanup,
212- and completion-plan isolation across sessions.
233+ - Closure evidence:
234+ ` test/e2e/mcp/src/test/java/org/apache/shardingsphere/test/e2e/mcp/runtime/programmatic/HttpTransportSessionLifecycleE2ETest.java:82-99 `
235+ covers DELETE isolation across two HTTP sessions.
236+ - Closure evidence:
237+ ` test/e2e/mcp/src/test/java/org/apache/shardingsphere/test/e2e/mcp/runtime/programmatic/ExecuteQueryTransactionE2ETest.java:101-124 `
238+ covers transaction isolation across sessions and rollback cleanup after session DELETE.
239+ - Closure evidence:
240+ ` test/e2e/mcp/src/test/java/org/apache/shardingsphere/test/e2e/mcp/runtime/programmatic/HttpTransportApprovalSafetyE2ETest.java:141-155 `
241+ rejects workflow approval from a different session.
242+ - Closure evidence:
243+ ` test/e2e/mcp/src/test/java/org/apache/shardingsphere/test/e2e/mcp/runtime/programmatic/HttpTransportCompletionE2ETest.java:77-95 `
244+ verifies ` plan_id ` completion returns only current-session plans.
245+ - Closure evidence:
246+ ` mcp/core/src/main/java/org/apache/shardingsphere/mcp/core/workflow/WorkflowSessionSnapshotResolver.java:32-50 ` ,
247+ ` InMemoryWorkflowSessionContext.java:60 ` ,
248+ ` WorkflowExecutionToolHandler.java:74 ` , and ` WorkflowValidationToolHandler.java:60 `
249+ enforce session-owned workflow snapshots before continuing, applying, or validating a plan.
250+ - Target: closed for two-client session, workflow completion, transaction cleanup, and DELETE behavior evidence.
213251
214252- ** MCE-P1-008 Registry manifest schema**
215253 - Source: MCP Registry publishes server metadata through ` server.json ` ; the official schema URL is dated ` 2025-12-11 ` .
0 commit comments