Skip to content

Generate config-relative Gate policy paths#13

Merged
haasonsaas merged 1 commit intomainfrom
jh/mcp-openapi-config-relative-gate
Apr 14, 2026
Merged

Generate config-relative Gate policy paths#13
haasonsaas merged 1 commit intomainfrom
jh/mcp-openapi-config-relative-gate

Conversation

@haasonsaas
Copy link
Copy Markdown
Collaborator

Summary

  • generate policies/mcp_tool_allowlist.rego references relative to gate/connector.yaml
  • update the generated Gate README to clarify the config stays portable across working directories
  • lock the CLI scaffold test to the new connector path shape

Testing

  • npm run check
  • npm test
  • git diff --check

Pairs with evalops/gate path-resolution fixes so generated Gate configs work cleanly from a Gate checkout.

@cursor
Copy link
Copy Markdown

cursor bot commented Apr 14, 2026

PR Summary

Low Risk
Low risk: changes only the generated Gate scaffold output (policy path string) and tightens a CLI scaffold test, with no runtime request-handling logic impacted.

Overview
Generated Gate connector configs now reference the allowlist policy via a config-relative path (policies/mcp_tool_allowlist.rego) instead of gate/policies/..., making gate/connector.yaml portable across working directories.

The generated Gate README is updated to call out this portability, and the CLI generate scaffold test is updated to assert the new policy path shape.

Reviewed by Cursor Bugbot for commit cf511fa. Bugbot is set up for automated code reviews on this repo. Configure here.

@haasonsaas haasonsaas merged commit 8d12a86 into main Apr 14, 2026
5 checks passed
@haasonsaas haasonsaas deleted the jh/mcp-openapi-config-relative-gate branch April 14, 2026 01:05
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.

Reviewed by Cursor Bugbot for commit cf511fa. Configure here.

"",
"policies:",
" - path: \"gate/policies/mcp_tool_allowlist.rego\"",
" - path: \"policies/mcp_tool_allowlist.rego\"",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recording dir path not updated for config-relative resolution

Medium Severity

The policy path was changed from gate/policies/mcp_tool_allowlist.rego to policies/mcp_tool_allowlist.rego to account for gate-connector resolving paths relative to the config file (gate/connector.yaml). However, the recording.dir value ".data/gate-mcp-recordings" was not similarly adjusted. If gate-connector resolves all relative paths against the config location, this recording dir now resolves to gate/.data/gate-mcp-recordings instead of the project-root .data/gate-mcp-recordings. It likely needs to be "../.data/gate-mcp-recordings" to preserve the original behavior.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit cf511fa. Configure here.

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