-
Notifications
You must be signed in to change notification settings - Fork 19
Guard coverage: classify create_agent_task as read-write and blocked
#3139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -62,6 +62,9 @@ pub const READ_WRITE_OPERATIONS: &[&str] = &[ | |||||||||
| "issue_write", | ||||||||||
| "sub_issue_write", | ||||||||||
| "update_gist", | ||||||||||
| // Pre-emptive entries for anticipated future MCP tools (no equivalent tool today) | ||||||||||
|
||||||||||
| // Pre-emptive entries for anticipated future MCP tools (no equivalent tool today) | |
| // Additional guarded read-write operations, including supported tool mappings that remain blocked |
Copilot
AI
Apr 4, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test asserts !is_write_operation("create_agent_task"), which bakes in the current implementation detail that read-write ops are excluded from is_write_operation. Since is_write_operation is only used as part of operation classification (and could reasonably be broadened to include read-write ops in the future), consider removing this assertion or instead asserting that the labeled operation is "read-write" / that it’s not explicitly listed in WRITE_OPERATIONS.
| !is_write_operation("create_agent_task"), | |
| "create_agent_task should not be in WRITE_OPERATIONS (it is in READ_WRITE_OPERATIONS)" | |
| !WRITE_OPERATIONS.contains(&"create_agent_task"), | |
| "create_agent_task should not be explicitly listed in WRITE_OPERATIONS (it is in READ_WRITE_OPERATIONS)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apply_tool_labelsnow has a dedicatedcreate_agent_taskarm to apply repo-visibility secrecy, but there’s no unit test exercising this new labeling behavior. Please add a test (similar totest_apply_tool_labels_transfer_repository_secrecy_inherits_repo_visibilityinlabels/mod.rs) to ensure thecreate_agent_taskarm is hit and continues to apply repo-visibility secrecy as intended.