Skip to content

Retire pre-v0.9 runtime compatibility vestiges - #1397

Merged
Gudge (MGudgin) merged 1 commit into
mainfrom
user/gudge/retire-network-compatibility
Oct 6, 2026
Merged

Gudge (MGudgin) merged 1 commit into
mainfrom
user/gudge/retire-network-compatibility

Conversation

@MGudgin

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

Copy link
Copy Markdown
Member

📖 Description

This PR removes pre-v0.9 compatibility from request normalization and backend execution. It deletes redundant default-environment and network markers, unreachable host-list/proxy paths, the built-in test proxy, and obsolete CLI testing switches while preserving directional enforcement and caller-managed proxy behavior. It also redacts non-string proxy values before diagnostics are logged.

Details

  • Remove old-version paths in Windows, VM, LXC, Bubblewrap, and Seatbelt backends.
  • Drop unrepresentable shared runtime fields and retired proxy/testing plumbing.
  • Preserve immutable published schemas, supported external proxies, and network audits.
  • Redact non-string proxy diagnostics and clarify supported networking guidance.

🔗 References

Alternative to the stacked sequence #1421, #1422, #1423, #1424, and #1426. Merge this PR or the stack, not both. Follows #1382 and #1383.

🔍 Validation

Tests

  • From src/, cargo fmt --all -- --check: passed.
  • cargo check --workspace --all-targets --all-features --quiet: passed.
  • cargo clippy --workspace --all-targets --all-features --quiet -- -D warnings: passed.
  • cargo test --workspace --quiet: passed.
  • cargo test -p mxc-sdk --lib --features wslc,isolation_session,microvm,hyperlight --quiet: 3,293 passed, 3 ignored.
  • cargo test -p mxc-sdk --lib non_string_proxy_values_in_comments_are_redacted --quiet: 1 passed on Windows.
  • cargo check -p mxc-sdk --all-targets --target x86_64-apple-darwin --quiet: passed.
  • Debian WSL, from src/, cargo check -p mxc-sdk --all-targets --quiet: passed.
  • Debian WSL, cargo test -p mxc-sdk --lib lxc::common --quiet -- --test-threads=1: 302 passed.
  • Debian WSL, cargo test -p mxc-sdk --lib bubblewrap::common --quiet -- --test-threads=1: 301 passed.
  • Debian WSL, cargo build -p lxc -p unix_test_proxy --quiet: passed; bash ../tests/scripts/run_bwrap_directional_test.sh: nine checks passed.
  • node --test scripts/versioning/tests/check-contract-codegen.test.js: 9 passed; node scripts/versioning/check-contract-codegen.js --check: passed on the combined commit.
  • Native macOS execution and live LXC container tests were not run locally.

✅ 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

Copilot AI balanced review requested due to automatic review settings October 5, 2026 21:33
@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) left a comment •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Follow-up on October 5, 2026 (PR head 566c850): Reverified the 18 filed findings: 16 addressed, the retired-schema deletion concern (#14 in the attribution ledger) is moot after restoring those artifacts and clarifying the rule, and the backend-guide claim (#22) is only partially addressed. The LXC guide is fixed, but the Bubblewrap guide still claims impossible direct-request runtime rejections; that remaining portion has a new inline comment at docs/bwrap-support/bubblewrap-backend.md:16 (comment 4189887434). The unchanged NanVix roadmap parenthetical from the broader source review now has its own general PR comment (6005307614).

All nine original review threads were already resolved when checked. The review below describes the earlier 7a2c10f tree and is retained as historical evidence; its findings are not all currently open.


Review summary

Reviewed the fetched 7a2c10f head against the PR's 058b5c5 base, including the 119-file diff and nearby tests. No attributable High-severity security or policy-enforcement issue was established. ScriptRunner::run already validates Hyperlight requests before execute (src/core/wxc_common/src/script_runner.rs:32-48); omitted-network deny defaults remain in the touched backends; validateStableHistory still rejects edits/removals of retained published schemas, with floor-boundary tests at scripts/versioning/tests/check-contract-codegen.test.js:233-265. No third-party dependency was added. This is a COMMENT review, not a request to block the draft.

Findings without an added-line anchor

  • Medium (documentation drift) — deleted networking specification still has readers. docs/process-container/networking.md:254 says to see "the parent doc on the last 4"; docs/bwrap-support/bubblewrap-backend.md:386-387 invokes the GA networking spec, and docs/schema.md:47,55 refers to its shared model-2 policy. Attribution: newly_exposed_by_change — this PR deletes docs/sandbox-policy/0.8.0/networking/networking.md, making these retained references unusable. Fix: Move the needed connectivity-model/out-of-scope explanation to retained documentation and point these references there.
  • Low (simplicity) — AppContainer NetworkManager is now a forwarding layer. src/backends/process_container/common/src/network_manager.rs:12-53 contains only ProxyCoordinator, forwards proxy_address/stop_all, and checks enablement before forwarding start. Attribution: newly_exposed_by_change — removing the firewall implementation leaves the existing layer without a separate resource responsibility. Fix: Own the coordinator directly at its one production caller, keeping the enablement check.
  • Low (simplicity) — LXC retains a hostname-expansion pipeline for CIDRs. src/backends/lxc/common/src/network_iptables.rs:97-113,579-610 still holds ResolvedDestinations vectors and formats/reparses destination strings after this PR removes hostname expansion. Attribution: newly_exposed_by_change — the multi-address case that justified these structures is gone. Fix: Carry typed CIDR/family through lowering and remove the redundant resolution stage.
  • Low (release instructions) — the stable-schema deletion exception is documented inconsistently. .github/copilot-instructions.md:77 still says never edit schemas/stable/, while this PR deliberately deletes three below-floor files and docs/versioning.md:161-164 now permits below-floor deletion. Attribution: introduced_by_change — the exception and deleted artifacts are new; the unchanged instruction now conflicts with them. Fix: If below-floor deletion is approved, update the contributor instruction to distinguish removal of retired artifacts from mutation of retained schemas.
  • Low (maintainability) — an orphaned doc comment describes the wrong field. src/core/wxc_common/src/models.rs:949-951 now places "Whether backends supply the default process.env block" above container_id. Attribution: introduced_by_change — removing the compatibility field stranded its old comment. Fix: Remove that line.
  • Low (maintainability) — dead host-list error constant. src/core/wxc_common/src/error.rs:66-70 is byte-identical to the base, but HOST_LISTS_NOT_SUPPORTED_MSG lost both call sites in this PR and still describes retired allowedHosts/defaultPolicy fields. Attribution: newly_exposed_by_change — the PR removed its remaining users. Fix: Delete the constant.
  • Low (documentation) — remaining legacy vocabulary in WSLc diagnostics and roadmap. src/backends/wslc/common/src/wsl_container_runner.rs:896-910 still tells direct callers to supply network.proxy's URL form rather than runtimeConfig.networkProxy, and docs/linux-wsl-roadmap-june-2026.md:341 says removed WSLc rule builders are "retained". Attribution: newly_exposed_by_change — the wire forms and functions these unchanged lines describe were removed by this PR; the roadmap is byte-identical to the base, while the WSLc message survives unchanged inside a modified file. Fix: Update the diagnostic and roadmap to match supported policy and removed implementation.
  • Low (documentation) — workflow and .NET source comments retain retired labels. .github/workflows/Build.Linux.Job.yml:181-183 still calls the test proxy builtinTestServer; sdk/dotnet/Microsoft.Mxc.Sdk/V1/ContainerRequestSections.cs:181,197,209 still labels the directional fields schema 0.8 while this PR updates the generated reference to supported directional policy. Attribution: newly_exposed_by_change — these byte-identical comments become misleading after the built-in proxy/schema retirement. Fix: Update the workflow and XML docs along with the reference.

Verified pre-existing; not attributed to this PR

  • Windows direct-request proxy fallback (src/backends/process_container/common/src/base_container_runner.rs:347-350) and Bubblewrap remote-proxy resolution (src/backends/bubblewrap/common/src/proxy_network.rs:343-379) are already present at the base without a newly reachable path established here.
  • The old authoring-guide pointer to nonexistent createConfigFromPolicy() predates this PR; its new link accurately promises only the supported request shape.
  • Historical Windows Firewall rules could already outlive a crash or intentionally preserved policy; the old manager tracked only rules created during its own lifetime, so this PR does not establish a new upgrade-only failure.

The GitHub combined diff endpoint returned HTTP 406 (>20,000 lines). The review uses the fetched PR head, whose OID and merge-base exactly match GitHub's head/base metadata. Inline anchors below were checked against added lines in that local PR diff. No host-dependent runtime tests were run for this attribution pass.

Comment thread src/backends/hyperlight/common/src/lib.rs Outdated
Comment thread src/backends/lxc/common/src/lxc_runner.rs Outdated
Comment thread tests/scripts/run_bwrap_directional_test.sh Outdated
Comment thread src/backends/process_container/common/src/appcontainer_runner.rs Outdated
Comment thread src/mxc-sdk/src/backends/windows_sandbox/lifecycle/policy.rs
Comment thread src/core/wxc_common/src/unix_proxy_coordinator.rs Outdated
Comment thread scripts/versioning/check-contract-codegen.js Outdated
Comment thread docs/lxc-support/lxc-backend.md Outdated

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 wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

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

🔵 Needs a closer look

Cross-platform network enforcement and cleanup changes need final human review supported by native-host validation.

Review effort: Balanced
Findings: 1 Low severity

Open (1)

Comment thread docs/telemetry/telemetry.md Outdated
Copilot AI balanced review requested due to automatic review settings October 5, 2026 22:54
@MGudgin

Copy link
Copy Markdown
Member Author

Addressed the unanchored findings from the review summary:

  • Restored the connectivity-model and out-of-scope explanation in supported documentation, corrected the retired typed-request claims, and updated the WSLc diagnostic/roadmap and Linux workflow/.NET comments (ad4862ddb, a3b604bf1).
  • Removed the ownerless Unix proxy coordinator and forwarding-only AppContainer network manager; lowered LXC rules as typed CIDRs (192f929a8, 59e0403fa, a3b604bf1).
  • Clarified the published-schema retention rule, removed the orphaned model comment and unused host-list error, and distinguished AppContainer from BaseContainer network-audit timing (fcdcce53d, ad4862ddb, 566c85027).
  • As requested later, restored the v0.6-v0.8 JSON schemas byte-for-byte (2f96b17c1); the historical docs/sandbox-policy/ guides remain removed. The contract-codegen gate passes with the schemas restored.

I replied to and resolved the nine anchored review threads separately. The latest executable tree passed local workspace/Linux checks and the native macOS job on the prior head; the subsequent commits affect only schema artifacts and documentation.

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

🔵 Needs a closer look

Security-sensitive cross-platform networking and cleanup changes need human review of native-host validation, including the untested live LXC path.

Review effort: Balanced
Findings: None

Resolved since last review (1)

Copilot AI balanced review requested due to automatic review settings October 5, 2026 23:03

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

🔵 Needs a closer look

Cross-platform network enforcement and proxy lifecycle changes need final human review with the pending native-host validation results.

Review effort: Balanced
Findings: None

Comment thread docs/bwrap-support/bubblewrap-backend.md Outdated
@MGudgin

Copy link
Copy Markdown
Member Author

Low (documentation drift) — NanVix's roadmap comparison still names a removed egress filter. docs/linux-wsl-roadmap-june-2026.md:515 says NanVix has a "per-guest egress filter". This PR removes the NanVix allow/block host-list filter and its guest-filter flags (src/backends/nanvix/runner/src/lib.rs); the current backend accepts only the supported all-deny or unrestricted directional posture, not per-destination egress filtering.

Attribution: newly_exposed_by_change — the unchanged roadmap sentence becomes inaccurate because this PR removes the filter. The per-guest scoping point remains valid: each guest has its own VM. Fix: retain that per-guest scoping explanation, but remove the filter claim or describe the current all-or-nothing network posture.

This sentence is outside the PR's added lines, so I am leaving it as a general comment rather than forcing an inline anchor. The previously filed WSLc roadmap observation has been addressed separately.

Copilot AI balanced review requested due to automatic review settings October 6, 2026 16:17
@MGudgin
Gudge (MGudgin) force-pushed the user/gudge/retire-network-compatibility branch from 566c850 to 521eb53 Compare October 6, 2026 16:17
@MGudgin

Copy link
Copy Markdown
Member Author

Addressed the NanVix roadmap comment (6005307614) in 521eb53. The comparison now retains per-guest scoping but describes NanVix networking as coherent all-deny or unrestricted; it no longer claims a per-destination egress filter. The same sentence also reflects Hyperlight networking under supported contracts.

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

🔵 Needs a closer look

Cross-platform enforcement changes require human review, especially with an unresolved redaction flaw and unexecuted live LXC/macOS validation.

Review effort: Balanced
Findings: 1 High severity

Open (1)

Comment thread src/mxc-sdk/src/core/mxc_common/diagnostic.rs
Copilot AI balanced review requested due to automatic review settings October 6, 2026 21:18
@MGudgin
Gudge (MGudgin) force-pushed the user/gudge/retire-network-compatibility branch from 521eb53 to 5102a7a Compare October 6, 2026 21:18
@MGudgin Gudge (MGudgin) changed the title Retire pre-v0.9 network compatibility paths Remove remaining pre-v0.9 runtime vestiges Oct 6, 2026
@MGudgin
Gudge (MGudgin) changed the base branch from main to user/gudge/retire-network-unix October 6, 2026 21:19
@MGudgin
Gudge (MGudgin) marked this pull request as ready for review October 6, 2026 21:19
@MGudgin
Gudge (MGudgin) requested a review from a team as a code owner October 6, 2026 21:19

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

🔵 Needs a closer look

Cross-platform sandbox networking and proxy ownership changes warrant human review, especially with native macOS and live LXC runtime validation not run locally.

Review effort: Balanced
Findings: 1 High severity · 2 Low severity

Open (3)

Comment thread docs/linux-wsl-roadmap-june-2026.md Outdated
Comment thread docs/linux-wsl-roadmap-june-2026.md Outdated
Copilot AI balanced review requested due to automatic review settings October 6, 2026 21:25
@MGudgin
Gudge (MGudgin) force-pushed the user/gudge/retire-network-compatibility branch from 355ab53 to aa593ee Compare October 6, 2026 21:34

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

🔵 Needs a closer look

Cross-platform network-enforcement changes warrant human review, with native macOS and live LXC runtime validation still unreported.

Review effort: Balanced
Findings: 1 High severity · 3 Low severity

Open (4)

Comment thread docs/windows-sandbox/windows-sandbox.md Outdated
Copilot AI balanced review requested due to automatic review settings October 6, 2026 21:36

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

🔵 Needs a closer look

Cross-platform enforcement changes warrant human review, particularly with native macOS and live LXC execution unvalidated locally.

Review effort: Balanced
Findings: 1 High severity · 4 Low severity

Open (5)

Comment thread docs/schema.md Outdated
Copilot AI balanced review requested due to automatic review settings October 6, 2026 21:54
@MGudgin
Gudge (MGudgin) force-pushed the user/gudge/retire-network-compatibility branch from aa593ee to e5136d7 Compare October 6, 2026 21:54
@MGudgin
Gudge (MGudgin) force-pushed the user/gudge/retire-network-compatibility branch from e5136d7 to da25e80 Compare October 6, 2026 21:57

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

🔵 Needs a closer look

Cross-platform network-enforcement changes need human review, particularly with live LXC and native macOS validation outstanding.

Review effort: Balanced
Findings: 1 Low severity

Open (1)
Resolved since last review (5)

@@ -280,7 +281,10 @@ proxy peer identity, and host-loopback allow fail with a typed unsupported-polic
## 3. WFP enforcement

PSEC applies outbound WFP filters in the OS's elevated context and owns their lifetime. AppContainer fallback does not
install directional WFP filters.
install directional WFP filters. It uses capabilities for supported direction
defaults and keeps the external runtime proxy setup. Its network audit records retain the firewall fields with
Copilot AI balanced review requested due to automatic review settings October 6, 2026 22:05

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

🔵 Needs a closer look

Cross-platform isolation changes warrant human review, especially with native macOS and live LXC execution not validated locally.

Review effort: Balanced
Findings: 1 Low severity

Open (1)

This PR removes pre-v0.9 compatibility from request normalization and
backend execution. It deletes redundant default-environment and network
markers, unreachable host-list/proxy paths, the built-in test proxy, and
obsolete CLI testing switches while preserving directional enforcement and
caller-managed proxy behavior.

Details

* Keep supported directional policy and external runtime proxies fail closed.
* Redact non-string proxy diagnostics before writing to a sink.
* Preserve immutable published schemas and clarify backend guidance.

Tests

* cargo fmt --all -- --check and cargo test --workspace --quiet: passed.
* cargo check --workspace --all-targets --all-features --quiet: passed.
* cargo clippy --workspace --all-targets --all-features --quiet --
  -D warnings: passed.
* Feature suite: 3293 passed, 3 ignored; redaction regression passed.
* Linux LXC/Bwrap: 603 passed; host suite and macOS target check passed.
* Schema history: 9 passed; contract codegen check passed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 7570a662-a429-46d2-aa24-47fae6655cc4
Generated-with: gpt-6-sol
Copilot AI balanced review requested due to automatic review settings October 6, 2026 22:46
@MGudgin
Gudge (MGudgin) force-pushed the user/gudge/retire-network-compatibility branch from da25e80 to c51a59d Compare October 6, 2026 22:46

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

🔵 Needs a closer look

Cross-platform network enforcement changes warrant human review, particularly with native macOS and live LXC validation still outstanding.

Review effort: Balanced
Findings: 1 Low severity

Open (1)


## `Microsoft.Mxc.Sdk.V1.NetworkEgressPolicy`

Schema-0.8 outbound network policy.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

thank you for this!

@MGudgin
Gudge (MGudgin) merged commit 622d4f1 into main Oct 6, 2026
31 checks passed
@MGudgin
Gudge (MGudgin) deleted the user/gudge/retire-network-compatibility branch October 6, 2026 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants