Skip to content

Model gh codespace stop as a guarded write operation#8764

Draft
lpcox with Copilot wants to merge 2 commits into
mainfrom
copilot/guard-coverage-fix
Draft

Model gh codespace stop as a guarded write operation#8764
lpcox with Copilot wants to merge 2 commits into
mainfrom
copilot/guard-coverage-fix

Conversation

Copilot AI commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

The GitHub guard had a CLI-only coverage gap: gh codespace stop could reach a write endpoint without a modeled guard entry. This change closes that gap by classifying the operation explicitly in the Rust guard’s write-operation set.

  • What changed

    • Added stop_codespace to WRITE_OPERATIONS in guards/github-guard/rust-guard/src/tools.rs
    • Kept the list ordering intact for binary_search-based classification
  • Regression coverage

    • Extended the existing CLI gap regression test to assert that stop_codespace is treated as a write operation
    • Reuses the current pattern for other CLI-only modeled operations rather than introducing new test structure
  • Example

    pub const WRITE_OPERATIONS: &[&str] = &[
        // ...
        "stop_codespace", // gh codespace stop — POST /user|/orgs/.../codespaces/.../stop
        // ...
    ];

Copilot AI changed the title [WIP] Fix guard coverage gap for GitHub CLI operation Model gh codespace stop as a guarded write operation Jul 6, 2026
Copilot AI requested a review from lpcox July 6, 2026 03:43
Copilot finished work on behalf of lpcox July 6, 2026 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[guard-coverage] Guard coverage gap: 1 operation from github-mcp-server / GitHub CLI not fully covered

2 participants