ci: add Rust guard unit tests to CI pipeline#3396
Merged
Conversation
Agent-Logs-Url: https://github.com/github/gh-aw-mcpg/sessions/09753d19-a90d-4682-b032-ab7efb068562 Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add Rust guard unit tests to CI pipeline
ci: add Rust guard unit tests to CI pipeline
Apr 8, 2026
This was referenced Apr 9, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Rust guard unit tests (guards/github-guard/rust-guard) to the main CI workflow so guard regressions are caught automatically, and ensures downstream smoke/larger tests are gated on those Rust tests.
Changes:
- Expanded PR path filters to include
guards/**so guard-only changes trigger CI. - Added a new
rust-guard-testjob that runscargo test --libfor the Rust guard. - Updated downstream “trigger” jobs to require
rust-guard-testin theirneedslist.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/ci.yml | Adds guard path filtering, introduces a Rust test job, and gates downstream workflows on it. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/1 changed files
- Comments generated: 1
|
|
||
| - name: Run Rust guard unit tests | ||
| working-directory: guards/github-guard/rust-guard | ||
| run: cargo test --lib |
There was a problem hiding this comment.
Since guards/github-guard/rust-guard commits a Cargo.lock, consider running tests with --locked so CI fails if the lockfile is out of date (prevents silently resolving different dependency versions than what’s committed).
Suggested change
| run: cargo test --lib | |
| run: cargo test --locked --lib |
This was referenced Apr 9, 2026
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.
The 251 Rust unit tests for
guards/github-guard/rust-guard(DIFC security guard compiled to WASM) were not part of CI — only ran locally. This let regressions like #3314 slip through.Changes to
.github/workflows/ci.ymlguards/**topull_requestpaths so guard changes trigger CIrust-guard-testjob: runscargo test --libin parallel with existing Go jobsactions-rust-lang/setup-rust-toolchain@a0b538fa(same pinned SHA asrelease.lock.yml)cache-workspaces: guards/github-guard/rust-guardsmoke-copilot-pr,smoke-copilot,large-payload-tester,language-support-testernow requirerust-guard-testin addition to existing jobs