Commit 7ccee20
authored
[guard-coverage] Add
Guard coverage drifted after upstream added `set_issue_fields`: it was
not classified as a mutating MCP operation and had no explicit DIFC
labeling path, so it fell through default handling.
This PR adds classification and labeling coverage, and incorporates
review feedback to clarify scope semantics (org-level field definitions
vs repo-scoped issue mutation target).
- **Write-operation classification (`tools.rs`)**
- Added `set_issue_fields` to `READ_WRITE_OPERATIONS`.
- Added a dedicated classification test for `set_issue_fields`.
- Clarified inline comments to avoid implying it is a generic org-scoped
mutation.
- **DIFC labeling (`tool_rules.rs`)**
- Added an explicit `set_issue_fields` match arm in `apply_tool_labels`
(separate from the generic granular issue PATCH group) with documented
scope rationale.
- Labeling remains:
- secrecy: repo visibility scoped
- integrity: writer scoped (`writer_integrity(repo_id, ...)`)
- **Coverage hardening (`labels/mod.rs`, `tools.rs` tests)**
- Added a dedicated DIFC labeling test for `set_issue_fields`.
- Kept granular issue update loop tests focused on `update_issue_*`
tools, with `set_issue_fields` validated independently to prevent scope
ambiguity regressions.
```rust
// Issue custom field mutation (field definitions are org-level; target issue is repo-scoped)
"set_issue_fields", // GraphQL — sets custom field values on a specific repository issue
```
> [!WARNING]
>
>set_issue_fields to github-guard write classification and DIFC rules (#4049)File tree
3 files changed
+61
-0
lines changed- guards/github-guard/rust-guard/src
- labels
3 files changed
+61
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4770 | 4770 | | |
4771 | 4771 | | |
4772 | 4772 | | |
| 4773 | + | |
| 4774 | + | |
| 4775 | + | |
| 4776 | + | |
| 4777 | + | |
| 4778 | + | |
| 4779 | + | |
| 4780 | + | |
| 4781 | + | |
| 4782 | + | |
| 4783 | + | |
| 4784 | + | |
| 4785 | + | |
| 4786 | + | |
| 4787 | + | |
| 4788 | + | |
| 4789 | + | |
| 4790 | + | |
| 4791 | + | |
| 4792 | + | |
| 4793 | + | |
| 4794 | + | |
| 4795 | + | |
| 4796 | + | |
| 4797 | + | |
| 4798 | + | |
| 4799 | + | |
| 4800 | + | |
| 4801 | + | |
| 4802 | + | |
| 4803 | + | |
| 4804 | + | |
| 4805 | + | |
| 4806 | + | |
4773 | 4807 | | |
4774 | 4808 | | |
4775 | 4809 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
533 | 533 | | |
534 | 534 | | |
535 | 535 | | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
536 | 545 | | |
537 | 546 | | |
538 | 547 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
103 | 106 | | |
104 | 107 | | |
105 | 108 | | |
| |||
362 | 365 | | |
363 | 366 | | |
364 | 367 | | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
365 | 383 | | |
366 | 384 | | |
367 | 385 | | |
| |||
0 commit comments