Skip to content

Reject a blank ProcessContainer proxy peer - #1348

Open
Gudge (MGudgin) wants to merge 1 commit into
mainfrom
user/gudge/reject-blank-proxy-peer
Open

Gudge (MGudgin) wants to merge 1 commit into
mainfrom
user/gudge/reject-blank-proxy-peer

Conversation

@MGudgin

@MGudgin Gudge (MGudgin) commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

📖 Description

Reject a blank ProcessContainer proxy peer

This PR makes the config parser reject an empty or whitespace-only
processContainer.network.allowedProxyPeer. The parser previously treated a
blank peer as absent when detecting network fields but as present during
proxy validation, allowing it to reach BaseContainer as a proxy identity.
Both paths now agree and reject blank peers early.

Details

  • Reject blank peers before the proxy and host-loopback checks with the
    diagnostic "processContainer.network.allowedProxyPeer must not be blank".
  • Treat any present allowedProxyPeer as a ProcessContainer network field,
    including for pre-0.8 contracts where the field is unsupported.
  • Preserve non-blank identities exactly as authored, and test every
    registered contract from 0.8 onward without hardcoded future versions.
  • Describe the non-blank requirement consistently in the schema and
    ProcessContainer networking documentation.

🔗 References

🔍 Validation

Tests (from src/ on Windows, against the amended commit)

  • cargo fmt --all -- --check — passed.
  • cargo check --workspace --all-targets --quiet — passed.
  • cargo clippy --workspace --all-targets --all-features --quiet -- -D warnings — passed.
  • cargo test -p wxc_common --quiet — passed (918 library tests and 83 other
    crate tests); covers blank and non-blank peers across registered contracts.
  • Linux and macOS were not verified locally; GitHub Actions runs native CI.

✅ 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 docs/pull-requests.md.

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 docs/pull-requests.md
for the steps.

Microsoft Reviewers: Open in CodeFlow

@MGudgin
Gudge (MGudgin) requested review from a team and a balanced review from Copilot September 30, 2026 16:13
@MGudgin
Gudge (MGudgin) requested a review from a team as a code owner September 30, 2026 16:13
@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.

Copilot review overview

🟢 Approval recommended

Validation, contract coverage, and documentation consistently implement the intended behavior.

Review effort: Balanced
Findings: None

What changed in this PR

Rejects blank ProcessContainer proxy identities during shared network-policy parsing.

Changes:

  • Validates empty and whitespace-only allowedProxyPeer values.
  • Adds cross-contract parser coverage and preserves valid values verbatim.
  • Documents the non-empty requirement.
File Description
src/​core/​wxc_common/​src/​network_parser.rs Adds blank-peer validation.
src/​core/​wxc_common/​src/​config_parser.rs Adds multi-version parser tests.
docs/​schema.md Clarifies proxy identity requirements.
docs/​sandbox-policy/​0.8.0/​networking/​networking.md Updates networking guidance.
docs/​process-container/​networking.md Documents non-empty peer behavior.
docs/​process-container/​examples/​0.8.0-schema.md Updates schema example guidance.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI balanced review requested due to automatic review settings September 30, 2026 16:35
@MGudgin
Gudge (MGudgin) force-pushed the user/gudge/reject-blank-proxy-peer branch from 64e294c to 422f64d Compare September 30, 2026 16:35

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.

Copilot review overview

🟢 Approval recommended

The validation is correct and well tested; remaining feedback concerns minor wording precision.

Review effort: Balanced
Findings: 5 Low severity

Open (5)

Comment thread docs/process-container/examples/0.8.0-schema.md Outdated
Comment thread docs/process-container/networking.md Outdated
Comment thread docs/sandbox-policy/0.8.0/networking/networking.md Outdated
Comment thread docs/schema.md Outdated
Comment thread src/core/wxc_common/src/network_parser.rs Outdated
Gudge (MGudgin) pushed a commit that referenced this pull request Sep 30, 2026
This PR adds a handoff for the v1 SDK and JSON-only FFI ingress stack and
updates the ingress plan to match what was built. It records the pull
requests, branches, worktrees, and backups, the design decisions and their
reasons, review status, open items, and working notes for a new session.

Details

* Add docs/version-aware-stack-session-handoff-2026-09-30.md covering
  #1271, #1348, and #1349-#1353, the backend-based experimental opt-in,
  JSON-only ingress, V1 namespaces and MxcPlatform, the pinned SDK target,
  Node export conditions, shared goldens, and E0.
* Mark the plan adopted, replace the planned branch table with the opened
  pull requests, record the unified experimental check, the serde removal,
  the V1 writer location, and E0, and add the namespace, goldens, and E0
  decisions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 33217f7b-dc7d-4da0-af5f-018fef64013c
Generated-with: claude-opus-5.5
This PR makes the config parser reject an empty or whitespace-only
processContainer.network.allowedProxyPeer. The parser treated a blank peer
as absent when detecting network fields but as present in the proxy
checks, so a blank peer could pass validation and reach BaseContainer as
the proxy identity. Both paths now agree, and a blank peer fails early.

Details

* network_parser.rs rejects a blank peer with "processContainer.network.
  allowedProxyPeer must not be blank" before the proxy and host-loopback
  checks, for every contract with the field.
* Any present allowedProxyPeer now counts as a ProcessContainer network
  field, so pre-0.8 contracts still reject it as unsupported.
* Non-blank peers are preserved exactly as authored.
* Parser tests use registered 0.8+ contracts to survive version promotion.
* The schema and ProcessContainer networking docs state that the peer
  must be non-blank.

Tests

* New parser tests cover empty and whitespace-only peers on every registered
  contract from 0.8 onward, non-blank preservation, and pre-0.8 rejection.
* cargo fmt --all -- --check; cargo clippy --workspace --all-targets
  --all-features -- -D warnings; cargo test for wxc_common, mxc_engine,
  and wxc.
* A simulated CI merge passed all 949 wxc_common library tests;
  wxc-exec --dry-run with a blank peer rejects it with the new message.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 33217f7b-dc7d-4da0-af5f-018fef64013c
Generated-with: gpt-5.5
Copilot-Session: 0b73bdac-b73e-4e23-9d96-b6acd031ebf9
Generated-with: gpt-6-sol
Copilot AI balanced review requested due to automatic review settings September 30, 2026 18:54
@MGudgin
Gudge (MGudgin) force-pushed the user/gudge/reject-blank-proxy-peer branch from 422f64d to 76eb8cc Compare September 30, 2026 18:54

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.

Copilot review overview

🟢 Approval recommended

The validation, contract coverage, and documentation consistently implement the stated behavior without unresolved issues.

Review effort: Balanced
Findings: None

Resolved since last review (5)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

:shipit:

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