You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds a rust-guard-test CI job that runs the 251 Rust unit tests for guards/github-guard/rust-guard on every PR and push. Until now, these tests only ran locally via make test-unit in the guard directory — they were not part of the automated CI pipeline.
Motivation
The Rust guard (guards/github-guard/) is a security-critical DIFC (Decentralized Information Flow Control) component compiled to WASM and loaded at runtime. Without CI coverage, regressions like the one fixed in #3314 (misuse of to_lowercase()) can slip through unnoticed until a manual local test run.
Added guards/** to pull_request path filters — Rust guard changes now trigger CI
New rust-guard-test job (runs in parallel with unit-test, lint, integration-test):
Checkout, set up Rust stable toolchain
Uses actions-rust-lang/setup-rust-toolchain@a0b538fa0b742a6aa35d6e2c169b4bd06d225a98 (same SHA as release.yml)
cache-workspaces: guards/github-guard/rust-guard for Cargo caching
Runs cargo test --lib in guards/github-guard/rust-guard (native unit tests; no WASM target needed)
Downstream trigger jobs (smoke-copilot-pr, smoke-copilot, large-payload-tester, language-support-tester) now also require rust-guard-test to pass before triggering
Test Status
✅ 251 Rust unit tests pass locally: cargo test --lib in guards/github-guard/rust-guard
✅ YAML validated (no syntax errors)
✅ No Go code changed; no Go tests affected
Warning
Protected Files — Push Permission Denied
This was originally intended as a pull request, but the patch modifies protected files. A human must create the pull request manually.
The push was rejected because GitHub Actions does not have workflows permission to push these changes, and is never allowed to make such changes, or other authorization being used does not have this permission.
Create the pull request manually
# Download the patch from the workflow run
gh run download 24135660709 -n agent -D /tmp/agent-24135660709
# Create a new branch
git checkout -b repo-assist/eng-rust-guard-ci-2026-04-08-33c0639e7f84fc00 main
# Apply the patch (--3way handles cross-repo patches)
git am --3way /tmp/agent-24135660709/aw-repo-assist-eng-rust-guard-ci-2026-04-08.patch
# Push the branch and create the pull request
git push origin repo-assist/eng-rust-guard-ci-2026-04-08-33c0639e7f84fc00
gh pr create --title '[Repo Assist] ci: add Rust guard unit tests to CI pipeline' --base main --head repo-assist/eng-rust-guard-ci-2026-04-08-33c0639e7f84fc00 --repo github/gh-aw-mcpg
🤖 This is an automated draft PR from Repo Assist.
Summary
Adds a
rust-guard-testCI job that runs the 251 Rust unit tests forguards/github-guard/rust-guardon every PR and push. Until now, these tests only ran locally viamake test-unitin the guard directory — they were not part of the automated CI pipeline.Motivation
The Rust guard (
guards/github-guard/) is a security-critical DIFC (Decentralized Information Flow Control) component compiled to WASM and loaded at runtime. Without CI coverage, regressions like the one fixed in #3314 (misuse ofto_lowercase()) can slip through unnoticed until a manual local test run.The 251 Rust unit tests cover:
allow_onlyscope enforcement (public, owner, repo, prefix, multi)Changes
.github/workflows/ci.ymlguards/**topull_requestpath filters — Rust guard changes now trigger CIrust-guard-testjob (runs in parallel withunit-test,lint,integration-test):stabletoolchainactions-rust-lang/setup-rust-toolchain@a0b538fa0b742a6aa35d6e2c169b4bd06d225a98(same SHA asrelease.yml)cache-workspaces: guards/github-guard/rust-guardfor Cargo cachingcargo test --libinguards/github-guard/rust-guard(native unit tests; no WASM target needed)smoke-copilot-pr,smoke-copilot,large-payload-tester,language-support-tester) now also requirerust-guard-testto pass before triggeringTest Status
cargo test --libinguards/github-guard/rust-guardWarning
Protected Files — Push Permission Denied
This was originally intended as a pull request, but the patch modifies protected files. A human must create the pull request manually.
Protected files
The push was rejected because GitHub Actions does not have
workflowspermission to push these changes, and is never allowed to make such changes, or other authorization being used does not have this permission.Create the pull request manually