Skip to content

Normalize directional network input directly - #1383

Merged
Gudge (MGudgin) merged 1 commit into
mainfrom
user/gudge/directional-network-normalization
Oct 5, 2026
Merged

Gudge (MGudgin) merged 1 commit into
mainfrom
user/gudge/directional-network-normalization

Conversation

@MGudgin

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

Copy link
Copy Markdown
Member

This PR removes obsolete legacy network-format selection after #1382 retires
pre-v0.9 contracts. Shared normalization now applies the directional network
sections directly, without changing runtime compatibility or policy identity.

Details

  • Remove unreachable legacy parser, backend checks, and loopback-only tests.
  • Keep directional defaults, proxy validation, and state-aware network presence.
  • Assert that all supported one-shot contracts reject legacy network fields.

Test

  • cargo fmt --manifest-path .\src\Cargo.toml --all -- --check — passed.
  • cargo test --manifest-path .\src\Cargo.toml -p wxc_common -p bwrap_common -p nanvix_runner --quiet — passed (922 shared-crate tests plus backend and integration groups).
  • cargo check --manifest-path .\src\Cargo.toml --workspace --all-targets --quiet — passed.
  • cargo clippy --manifest-path .\src\Cargo.toml -p wxc_common --all-targets -- -D warnings — passed.
  • cargo clippy --manifest-path .\src\Cargo.toml --workspace --all-targets -- -D warnings — failed on pre-existing clippy::unnecessary_sort_by in src/backends/process_container/common/src/appcontainer_runner.rs:117; unchanged by this PR.
Microsoft Reviewers: Open in CodeFlow

@MGudgin
Gudge (MGudgin) requested a review from a team as a code owner October 3, 2026 02:25
@azure-pipelines

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

@MGudgin
Gudge (MGudgin) force-pushed the user/gudge/remove-schema-0-6-to-0-8 branch from c6b5471 to 987197b Compare October 5, 2026 16:38
Base automatically changed from user/gudge/remove-schema-0-6-to-0-8 to main October 5, 2026 18:35
@MGudgin
Gudge (MGudgin) requested a review from a team October 5, 2026 18:35
This PR removes legacy network-format selection after the pre-v0.9
contracts are retired. Shared normalization applies directional policy
and proxy sections without changing runtime compatibility or policy identity.

Details

* Remove unreachable legacy parsing and validation paths.
* Keep directional defaults and state-aware network presence behavior.
* Test exact-contract rejection of legacy fields and update versioning docs.

Tests

* cargo fmt --manifest-path .\src\Cargo.toml --all -- --check: passed.
* cargo test --manifest-path .\src\Cargo.toml -p wxc_common -p
  bwrap_common -p nanvix_runner --quiet: passed.
* cargo check --manifest-path .\src\Cargo.toml --workspace --all-targets
  --quiet: passed.
* cargo clippy --manifest-path .\src\Cargo.toml -p wxc_common
  --all-targets -- -D warnings: passed.
* Workspace Clippy fails on the unchanged process_container_common
  unnecessary_sort_by lint in appcontainer_runner.rs:117.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ff6d3538-5272-492f-aba0-5f7ef9feda2f
Generated-with: gpt-6-sol
@MGudgin
Gudge (MGudgin) force-pushed the user/gudge/directional-network-normalization branch from 7c737c3 to 34ba787 Compare October 5, 2026 18:37
Copilot AI balanced review requested due to automatic review settings October 5, 2026 18:37

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 simplified path matches all registered contracts and preserves directional defaults, proxy validation, and state-aware presence semantics.

Review effort: Balanced
Findings: None

What changed in this PR

Simplifies network normalization now that pre-v0.9 contracts are retired.

Changes:

  • Removes legacy network format selection and validation.
  • Normalizes directional networking directly.
  • Adds legacy-field rejection coverage and updates documentation.
File Description
network_parser.rs Removes legacy parsing and directly handles directional policy.
network_parser_loopback_spec_tests.rs Removes obsolete legacy loopback tests.
network_parser_ingress_default_tests.rs Updates parser invocation.
config_parser.rs Simplifies normalization and adds contract rejection tests.
docs/​versioning.md Documents directional-only normalization.

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

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:

@jsidewhite

Copy link
Copy Markdown
Member

validator.rs still contains "pub const LEGACY: Self = Self(0);"

@MGudgin

Copy link
Copy Markdown
Member Author

Jeff Whiteside (@jsidewhite) Good catch. NetworkPolicySupport::LEGACY is a leftover zero-bit name, and the runtime policy still has other legacy fields read by backend fallbacks. #1383 is scoped to removing the now-unreachable legacy input-normalization path; I don't want to expand this approved, green PR into a cross-backend runtime-model rewrite. We'll remove LEGACY, the obsolete runtime fields, and dependent backend paths/tests in a focused follow-up PR after #1383, preserving directional defaults, proxy handling, and state-aware presence semantics. Thanks for calling out the remaining cleanup.

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