Skip to content

feat: AC-1~AC-4 — session policy, structured errors, contract disambiguation, intent docs - #5

Merged
YumaKakuya merged 1 commit into
mainfrom
feat/ac-1-4
Apr 25, 2026
Merged

YumaKakuya merged 1 commit into
mainfrom
feat/ac-1-4

Conversation

@sorted-ai-bot

Copy link
Copy Markdown
Collaborator

Summary

  • AC-1: Session-scoped policy rule injection via mcphub.control.add_session_rule (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 using disambiguates_from entries (REQ-5.3.3/5.3.8)
  • AC-4: _intent property injected into all tool inputSchema for AI discoverability (REQ-5.5.4)

QA/Reviewer Fixes (3 rounds)

  • 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 value opt-out)
  • Policy filtering in fallback_tools to prevent hidden tool name 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

Test Results

  • 166 tests, 0 failures (was 149)
  • Go build: PASS

Files Changed (8)

File Change
McpHandler.java AC-2/3/4 + scrub + structured errors
ControlHandler.java AC-1 endpoint
PolicyEngine.java Priority boost fix
CapabilityRegistry.java findByCapabilityId() helper
McpHandlerTest.java +11 tests
ControlHandlerTest.java +6 tests
PolicyEngineTest.java +2 tests
integration/vt_test.go Error code enum alignment

…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
YumaKakuya merged commit 0326ec0 into main Apr 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants