Skip to content

fix(gateway): enforce runtime schemas and sanitize MCP errors - #195

Merged
ZhiXiao-Lin merged 1 commit into
mainfrom
feat/gateway-runtime-boundary
Sep 2, 2026
Merged

ZhiXiao-Lin merged 1 commit into
mainfrom
feat/gateway-runtime-boundary

Conversation

@ZhiXiao-Lin

@ZhiXiao-Lin ZhiXiao-Lin commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary\n- compile every Gateway Tool input/output schema once with fixed JSON Schema 2020-12 semantics\n- reject all external schema retrieval and external $ref, $dynamicRef, $recursiveRef, and $id authority\n- bound request/response bytes, nesting, and collection width before provider dispatch\n- validate input before invoking the host and validate output before returning it to an agent\n- replace provider and transport details with stable, secret-free MCP errors\n\n## Architecture\nThe portable core remains a dependency-light contract crate. Runtime validation is owned by the MCP facade feature, while invocation authority and lifecycle leases stay behind the injected CapabilityGatewayInvocationProvider. Schemas are compiled once per immutable catalog rather than per call.\n\n## Verification\n- cargo fmt --all -- --check\n- cargo test --workspace --all-features --locked -- --test-threads=1\n- cargo clippy --workspace --all-targets --all-features --locked -- -D warnings\n- focused core and Gateway MCP tests after rebasing onto current main

@ZhiXiao-Lin
ZhiXiao-Lin merged commit f0c0c85 into main Sep 2, 2026
7 checks passed
@ZhiXiao-Lin
ZhiXiao-Lin deleted the feat/gateway-runtime-boundary branch September 2, 2026 23:21
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.

1 participant