Repository navigation
Centralize remaining Rust guard tool names - #14835
Conversation
Co-authored-by: lpcox <[email protected]>
There was a problem hiding this comment.
🟢 Approval recommended
The changes consistently centralize literals without altering behavior and safely address cleanup lock poisoning.
0 open findings
What changed in this PR
Centralizes remaining Rust guard tool names and makes cache-test cleanup resilient to mutex poisoning.
Changes:
- Added and adopted eight canonical tool-name constants.
- Reused constants across DIFC rules and tests.
- Added non-panicking cache cleanup for tests.
| File | Description |
|---|---|
labels/constants.rs |
Defines and verifies new constants. |
labels/tool_rules.rs |
Uses constants in rules and tests. |
labels/mod.rs |
Updates integration-style label tests. |
labels/backend.rs |
Adds safe cache cleanup helper. |
tools.rs |
Uses the constant for synthetic writes. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
@copilot merge main and resolve conflicts |
…d-tool-names-constants-again # Conflicts: # guards/github-guard/rust-guard/src/labels/backend.rs Co-authored-by: lpcox <[email protected]>
Merged |
Several tool names were still raw string literals in DIFC rules and tests, making typos easy to miss. Cache-test cleanup also used
lock().unwrap(), which could cause cascading panics after mutex poisoning.