Skip to content

Add denied-path precedence regression coverage - #1567

Open
Gudge (MGudgin) wants to merge 1 commit into
mainfrom
user/gudge/fix-denied-paths-precedence
Open

Gudge (MGudgin) wants to merge 1 commit into
mainfrom
user/gudge/fix-denied-paths-precedence

Conversation

@MGudgin

@MGudgin Gudge (MGudgin) commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

📖 Description

This PR adds regression coverage for identical-path deniedPaths precedence
through the published 1.0.0 MXC request JSON loader. The scenarios verify
that denied entries override readonly and readwrite grants while unrelated
grants and the deny entry survive normalization.

Details

  • Cover deny versus readonly, readwrite, and both allow lists.
  • Extend the existing contract request tests using existing fixture paths.

These are loader/normalization assertions. The existing ProcessContainer
filesystem-grants-denials-and-aliases workload separately exercises actual
deny-versus-readwrite enforcement on hosts with native denied-path support.

🔗 References

🔍 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

📋 Issue Type

  • Bug fix
  • Feature
  • Task

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 GitHub
Actions build; it runs on merge to main, and Microsoft reviewers with write access can trigger it
on a PR with /azp run. See pull request builds.

If the dependency-feed-check check fails on a new dependency, the crate must be added to
the feed before the PR can pass. See pull request builds
for the steps.

Microsoft Reviewers: Open in CodeFlow

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
Copilot AI balanced review requested due to automatic review settings October 23, 2026 17:54
@MGudgin
Gudge (MGudgin) requested a review from a team as a code owner October 23, 2026 17:54
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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

This branch has not been deployed

No deployments
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.

3 participants