Repository navigation
Centralize remaining Rust guard write-tool names - #14833
Merged
Merged
Conversation
Co-authored-by: lpcox <[email protected]>
Copilot
AI
changed the title
[WIP] Add tool_names constants for remaining write-tool literals
Centralize remaining Rust guard write-tool names
Oct 13, 2026
lpcox
marked this pull request as ready for review
October 13, 2026 22:03
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The substitutions preserve exact values and sorted operation lists while fully addressing the duplication.
0 open findings
What changed in this PR
Centralizes Rust guard write-tool names to prevent classification drift.
Changes:
- Adds 11 canonical tool-name constants and assertions.
- Replaces duplicated literals across operation lists, label rules, and tests.
- Preserves binary-search ordering.
| File | Description |
|---|---|
labels/constants.rs |
Defines and validates canonical names. |
tools.rs |
Uses constants in write-operation classifications. |
labels/tool_rules.rs |
Uses constants in label matching. |
labels/mod.rs |
Updates label-rule tests. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Write-tool names were duplicated across Rust guard operation lists and label rules, risking inconsistent classification. This change adds canonical constants for the remaining names and uses them at those call sites.
tool_namesconstants with canonical-value assertions.