Repository navigation
Add denied-path precedence regression coverage - #1567
Open
Gudge (MGudgin) wants to merge 1 commit into
Open
Gudge (MGudgin) wants to merge 1 commit into
Gudge (MGudgin) wants to merge 1 commit into
Conversation
This PR adds regression coverage for identical-path deniedPaths precedence through the published 1.0.0 JSON loader. The scenarios check that denied entries override readonly and readwrite grants while unrelated grants survive normalization. Details * Cover deny versus readonly, readwrite, and both allow lists. * Exercise the supported JSON loader in the existing contract test suite. Tests * `cargo fmt --all -- --check` passed. * `cargo check -p mxc-sdk --test mxc_contract_v1_0_0` and `cargo clippy -p mxc-sdk --test mxc_contract_v1_0_0 -- -D warnings` passed. * `cargo test -p mxc-sdk --test mxc_contract_v1_0_0 request::` passed (21 tests, including three deny-conflict scenarios). * `cargo test -p mxc-sdk --lib config_parser` passed (117 tests). Refs: #145 Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: c6fbefd8-db77-43f3-b288-1d8f761ada3a Generated-with: gpt-6.1-sol
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused test-only addition checks the intended normalization behavior without changing production code, and no blocking issues were identified.
No open issues 🎉
What changed in this PR
Adds regression coverage for the denied-path precedence introduced in #551 through the published 1.0.0 MXC request JSON loader. Production behavior is unchanged.
Changes:
- Tests denied paths overriding readonly grants, readwrite grants, and both together.
- Verifies normalization preserves unrelated grants and the denied entry, using existing fixture directories.
| File | Description |
|---|---|
src/mxc-sdk/tests/mxc_contract/v1_0_0/request.rs |
Adds three denied-path conflict scenarios to the existing request tests. |
Review effort: Balanced
Branden Bonaby (bbonaby)
approved these changes
Oct 26, 2026
This branch has not been deployed
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.
📖 Description
This PR adds regression coverage for identical-path
deniedPathsprecedencethrough the published
1.0.0MXC request JSON loader. The scenarios verifythat denied entries override readonly and readwrite grants while unrelated
grants and the deny entry survive normalization.
Details
These are loader/normalization assertions. The existing ProcessContainer
filesystem-grants-denials-and-aliasesworkload separately exercises actualdeny-versus-readwrite enforcement on hosts with native denied-path support.
🔗 References
tests/scripts/run_processcontainer_policy_tests.ps1,filesystem-grants-denials-and-aliases.🔍 Validation
cargo fmt --all -- --check— passed.cargo check -p mxc-sdk --test mxc_contract_v1_0_0— passed.cargo clippy -p mxc-sdk --test mxc_contract_v1_0_0 -- -D warnings— passed.cargo test -p mxc-sdk --test mxc_contract_v1_0_0 request::— passed:21 tests, including the new test's three deny-conflict scenarios.
cargo test -p mxc-sdk --lib config_parser— passed: 117 tests.Validated on Windows x64. Linux/macOS and live backend enforcement suites
were not run for this test-only change.
✅ Checklist
Cargo.lock, thedependency-feed-checkcheck passes (see pull request builds)📋 Issue Type
GitHub Actions runs the PR validation build automatically. The ADO pipeline
(
MXC-PR-Build) is the Azure version of the PR pipeline, kept in parity with the GitHubActions build; it runs on merge to
main, and Microsoft reviewers with write access can trigger iton a PR with
/azp run. See pull request builds.If the
dependency-feed-checkcheck fails on a new dependency, the crate must be added tothe feed before the PR can pass. See pull request builds
for the steps.
Microsoft Reviewers: Open in CodeFlow