feat: AC-1~AC-4 — session policy, structured errors, contract disambiguation, intent docs - #5
Merged
Merged
Conversation
…ontract disambiguation, intent docs AC-1: Add mcphub.control.add_session_rule endpoint (REQ-7.5.1) AC-2: Structured failure responses with error_code/reason/next_action/fallback_tools (REQ-5.6.1) AC-3: Contract-based multi-candidate disambiguation via disambiguates_from (REQ-5.3.3/5.3.8) AC-4: Inject _intent property into all tool inputSchemas (REQ-5.5.4) QA/Reviewer fixes: - REQ-5.6.2: error_code enum compliance (provider_unreachable/provider_error) - REQ-5.5.5/5.10.3: intent annotation secret scrub via SecretScanner - REQ-7.5.2: conditional priority boost (negative opt-out) - Policy filtering in fallback_tools to prevent hidden tool leakage - Unsafe cast guard in schema _intent injection - Sanitized provider error reason (no e.getMessage exposure) - vt_test.go routing failure codes aligned to REQ-5.6.2 enum Tests: 149 -> 166 (+17 new), 0 failures
YumaKakuya
approved these changes
Apr 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mcphub.control.add_session_rule(REQ-7.5.1)error_code,reason,next_action,fallback_tools(REQ-5.6.1)disambiguates_fromentries (REQ-5.3.3/5.3.8)_intentproperty injected into all toolinputSchemafor AI discoverability (REQ-5.5.4)QA/Reviewer Fixes (3 rounds)
provider_unreachable/provider_error)SecretScannerfallback_toolsto prevent hidden tool name leakage_intentinjectione.getMessage()exposure)vt_test.gorouting failure codes aligned to REQ-5.6.2 enumTest Results
Files Changed (8)
McpHandler.javaControlHandler.javaPolicyEngine.javaCapabilityRegistry.javafindByCapabilityId()helperMcpHandlerTest.javaControlHandlerTest.javaPolicyEngineTest.javaintegration/vt_test.go