Repository navigation
[Repo Assist] refactor(rust-guard): add tool_names constants for GPG/SSH key and workflow-toggle tools - #14633
Conversation
…rkflow-toggle tools Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
The refactor consistently replaces targeted literals while preserving sorted operation buckets and existing behavior.
0 open findings
What changed in this PR
Centralizes additional Rust guard tool names to prevent literal drift without changing behavior.
Changes:
- Adds eight canonical tool-name constants and assertions.
- Reuses constants across operation buckets, label rules, and tests.
- Applies Rust formatting updates.
| File | Description |
|---|---|
labels/constants.rs |
Defines and verifies new constants. |
tools.rs |
Uses constants in classifications and tests. |
labels/tool_rules.rs |
Uses constants in labeling rules and tests. |
labels/mod.rs |
Uses the agent-task constant and applies formatting. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
🔒 mcpg Read-Only Stress — default AWF (normal container isolation)Surface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Overall: INCONCLUSIVE No write leaked through any surface. Part B is
|
|
@copilot merge main and resolve conflicts |
…ey-workflow-tool-names-a2903d9231cca8ad # Conflicts: # guards/github-guard/rust-guard/src/tools.rs Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Merged |
🤖 This is an automated PR from Repo Assist.
Closes #14626
Adds
tool_namesconstants (ADD_GPG_KEY,ADD_SSH_KEY,DELETE_GPG_KEY,DELETE_SSH_KEY,DISABLE_WORKFLOW,ENABLE_WORKFLOW,SYNC_FORK,CREATE_AGENT_TASK) and replaces the duplicated raw literals intools.rs,labels/tool_rules.rsandlabels/mod.rs. Constant-value assertions added to the constants test module. Pure refactor, no behaviour change; sorted-bucket tests still pass.Test Status
cargo fmtcleancargo test(rust-guard): 675 passed, 0 failedAdd this agentic workflow to your repo
To install this agentic workflow, run