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/28 16:47:59 UTC

[PR] Improve model-facing workflow guidance [shardingsphere]

terrymanu opened a new pull request, #38946:
URL: https://github.com/apache/shardingsphere/pull/38946

   - require confirmation before SQL side-effect execution
   - expose metadata search truncation counts and narrowing actions
   - add planning runtime metadata and completion targets
   - refresh workflow recovery prompts and model contract baseline
   
   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] Improve model-facing workflow guidance [shardingsphere]

Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu commented on PR #38946:
URL: https://github.com/apache/shardingsphere/pull/38946#issuecomment-4828292630

   ### Summary
   **Review Result: Mergeable**
   
   **Reason:** Based on code review only, I found no implementation, contract, or test issue that should block merge. The model-facing workflow guidance changes are consistent: side-effect execution now requires explicit user confirmation, large metadata search results expose truncation and narrowing guidance, and workflow preview approval is represented with dependent next actions.
   
   ### Evidence
   - `database_gateway_execute_update` preview now returns `ask_user -> tool_call`, using `depends_on` to make execution depend on user confirmation instead of allowing the model to treat preview as execution approval: `mcp/core/src/main/java/org/apache/shardingsphere/mcp/core/tool/handler/execute/ExecuteUpdateToolHandler.java:130`.
   - The production MySQL E2E assertion is aligned with the new side-effect preview contract, checking `ask_user`, `execution_approved`, `tool_call`, `depends_on`, and `execution_mode=execute`: `test/e2e/mcp/src/test/java/org/apache/shardingsphere/test/e2e/mcp/runtime/production/AbstractProductionMySQLRuntimeE2ETest.java:319`.
   - Metadata search now returns `total_match_count`, `returned_count`, and `truncated`, and truncated results include narrowing guidance plus an `ask_user` next action; implementation and tests are aligned: `mcp/core/src/main/java/org/apache/shardingsphere/mcp/core/tool/handler/metadata/SearchMetadataToolService.java:87`, `mcp/core/src/main/java/org/apache/shardingsphere/mcp/core/tool/handler/metadata/SearchMetadataToolHandler.java:116`, `mcp/core/src/test/java/org/apache/shardingsphere/mcp/core/tool/handler/metadata/SearchMetadataToolHandlerTest.java:166`.
   - Workflow preview in review-then-execute mode is also represented as `ask_user -> tool_call`, with tests covering `approved_steps` and `depends_on`: `mcp/core/src/main/java/org/apache/shardingsphere/mcp/core/workflow/WorkflowExecutionService.java:295`, `mcp/core/src/test/java/org/apache/shardingsphere/mcp/core/workflow/WorkflowExecutionServiceTest.java:248`.
   - Descriptor and baseline contract files are synchronized with the new fields and next action contract, reducing the risk of implementation and model-visible contract drift: `mcp/core/src/main/resources/META-INF/shardingsphere-mcp/mcp-descriptors/mcp-descriptor-core.yaml:861`, `test/e2e/mcp/src/test/resources/baseline-contract/model-contract/capabilities.yaml:103`.
   - The `review-pr` skill now treats Spotless/Checkstyle as the ShardingSphere formatting authority and no longer uses `git diff --check` as routine review verification: `.codex/skills/review-pr/SKILL.md:58`.
   
   ### Review Details
   - **Reviewed Scope:** Latest local HEAD `7541508384bc2c50af1b61aa35ed226971554d78`; base/merge-base `b3021d049f129a59e5e87a5822af435dc162be00`. Reviewed the 36 changed files in this PR, focusing on MCP core handlers, workflow execution, descriptors, baseline contract, feature descriptor validators, production/programmatic E2E tests, and the review skill update.
   - **Not Reviewed Scope:** Per request, GitHub Actions results were not used for this conclusion. Manual open-ended real-model experience testing was not performed.
   - **Verification:** This review result is based on code paths, contract files, and test assertions. GitHub Actions status was not used as mergeability evidence.
   - **Release Note / User Docs:** Not required. This PR updates MCP model-facing descriptors, prompts, contract baselines, and tests, without changing user configuration, migration behavior, or compatibility requirements.


-- 
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] Improve model-facing workflow guidance [shardingsphere]

Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu merged PR #38946:
URL: https://github.com/apache/shardingsphere/pull/38946


-- 
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