Downscope internal Rust guard tool helpers and centralize GitHub test scope usage#9778
Conversation
pub functions in tools.rs to pub(crate)There was a problem hiding this comment.
Pull request overview
Restricts internal Rust guard helpers and standardizes GitHub scope references without changing behavior.
Changes:
- Downscopes five tool-classification helpers to
pub(crate). - Replaces three test literals with
scope_names::GITHUB.
Show a summary per file
| File | Description |
|---|---|
guards/github-guard/rust-guard/src/tools.rs |
Restricts helper visibility to the crate. |
guards/github-guard/rust-guard/src/lib.rs |
Uses the shared GitHub scope constant in tests. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Medium
🔒 mcpg Read-Only Stress — gVisorSurface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Notes:
Overall: PASS
|
🔒 mcpg Read-Only Stress — default AWFSurface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Notes:
Overall: PASS Run: §29830718685
|
🔒 mcpg Read-Only Stress — docker-sbx\n\nSurface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations\nIsolation runtime: docker-sbx (KVM-isolated microVM)\n\n| Part | Surface | Op | Result | Expected | Status |\n|------|---------|----|--------|----------|--------|\n| A | MCP | reads (list_issues/list_prs/get_file/list_commits) | data returned | ALLOWED | ✅ |\n| B | MCP | writes (reaction/star/issue/comment/branch/file/PR) |
|
This trims unnecessary public surface in the Rust guard by restricting five crate-internal tool classification helpers to
pub(crate). It also removes three test-only"github"string outliers in favor of the sharedscope_names::GITHUBconstant.API surface
guards/github-guard/rust-guard/src/tools.rs:is_write_operationis_read_write_operationis_merge_operationis_delete_operationis_blocked_toolis_lock_operationandis_unlock_operation.Test constant consistency
"github"literals inguards/github-guard/rust-guard/src/lib.rstests withscope_names::GITHUB.Illustrative change
pubfunctions in tools.rs topub(crate)#9777