You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updates the Bubblewrap test suite to schema 0.9.0-alpha, keeping 0.7/0.8 coverage for legacy compatibility and retiring the 0.6 cases.
Why 0.9 fixes#1273. Below 0.9 a Bubblewrap container receives no environment at all (--clearenv with nothing put back), so RHEL's bash falls back to a fabricated PATH that omits /usr/sbin — and the proxy test's iptables invocation fails to resolve. Schema 0.9 introduces the backend default environment block, which supplies a PATH that includes the system sbin directories. Thanks to this + the proxy rework below, the test now passes.
Proxy rework.run_bwrap_network_proxy_test.sh now starts a secondunix-test-proxy as the real loopback endpoint, alongside the existing control listener. The legacy builtinTestServer cases stay on 0.7/0.8, where they still belong.
Config moves: five 0.6 configs rebased to 0.7 (legacy proxy shape, no slirp4netns needed), the rest to 0.9. Also fixes a silent false-pass in bubblewrap_network_firewall_cidr.json.
e2e_bubblewrap_characterization.rs: a policy grant is not adopted as the working directory; a relative process.cwd is anchored to the sandbox root from 0.9 (asserting cwd and HOME agree); a missing command fails promptly rather than hanging.
linux-bubblewrap.test.ts: two 0.9 proxy tests (routing through runtimeConfig.networkProxy, and egress confined to the proxy endpoint). The existing proxy block was migrated 0.6 → 0.7 and relabeled as the legacy shape.
npx tsc --noEmit (sdk/node/tests/integration) — clean for linux-bubblewrap.test.ts; the remaining errors are pre-existing in wslc-state-aware.test.ts, which this PR does not touch
All 309 versioned tests/configs/*.json validated against schemas/stable with AJV, honoring config-validation-exemptions.json — 0 problems
This checks only that a slirp4netns path exists, but proxy-only startup also requires an executable slirp plus usable unshare, nsenter, iptables, and ip6tables. A host missing any of those passes this gate and fails both tests as an environmental error. Use the existing fail-closed getPlatformSupport().bubblewrapNetwork.proxyEnforcement capability result, which probes the complete dependency set, to decide whether to skip.
Overstated loopback requirement for legacy proxy URLs
docs/bwrap-support/bubblewrap-backend.md:678
This loopback requirement is only true for runtimeConfig.networkProxy. Legacy network.proxy.url still accepts hostname/routable endpoints and pins them into the sandbox (the retained schema-0.8 hostname case in tests/scripts/run_bwrap_network_proxy_test.sh:400-475 exercises exactly that). As written, this now incorrectly tells 0.6–0.8 users that every external proxy must listen on loopback; scope the restriction to the directional field and preserve the legacy URL behavior.
The reason will be displayed to describe this comment to others. Learn more.
Copilot review overview
🔵 Needs a closer look
The new schema documentation incorrectly presents default HOME behavior as unconditional despite explicit environment overrides.
Review effort: Balanced Findings: None
Previously missed (1)
In code that hasn't changed since last review
Clarify HOME behavior with explicit process.env and cwd
docs/schema.md:285
This overstates the HOME behavior. In 0.9, an explicit process.env with inheritDefaultEnv: false is used verbatim, so cwd does not necessarily become HOME; similarly, callers may explicitly set HOME even when cwd is absent. Describe this as the backend default rather than an unconditional result.
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
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
Updates the Bubblewrap test suite to schema
0.9.0-alpha, keeping 0.7/0.8 coverage for legacy compatibility and retiring the 0.6 cases.Why 0.9 fixes #1273. Below 0.9 a Bubblewrap container receives no environment at all (
--clearenvwith nothing put back), so RHEL's bash falls back to a fabricatedPATHthat omits/usr/sbin— and the proxy test'siptablesinvocation fails to resolve. Schema 0.9 introduces the backend default environment block, which supplies aPATHthat includes the system sbin directories. Thanks to this + the proxy rework below, the test now passes.Proxy rework.
run_bwrap_network_proxy_test.shnow starts a secondunix-test-proxyas the real loopback endpoint, alongside the existing control listener. The legacybuiltinTestServercases stay on 0.7/0.8, where they still belong.Config moves: five 0.6 configs rebased to 0.7 (legacy proxy shape, no slirp4netns needed), the rest to 0.9. Also fixes a silent false-pass in
bubblewrap_network_firewall_cidr.json.Added coverage: https://github.com/microsoft/mxc/actions/runs/36192718659/job/108266579735
e2e_bubblewrap_characterization.rs: a policy grant is not adopted as the working directory; a relativeprocess.cwdis anchored to the sandbox root from 0.9 (assertingcwdandHOMEagree); a missing command fails promptly rather than hanging.linux-bubblewrap.test.ts: two 0.9 proxy tests (routing throughruntimeConfig.networkProxy, and egress confined to the proxy endpoint). The existing proxy block was migrated 0.6 → 0.7 and relabeled as the legacy shape.🔗 References
Resolves #1273
🔍 Validation
CI test shows all green for bubblewrap:
Run from the Windows checkout:
cargo fmt -p wxc_e2e_tests -- --check— cleannpx tsc --noEmit(sdk/node/tests/integration) — clean forlinux-bubblewrap.test.ts; the remaining errors are pre-existing inwslc-state-aware.test.ts, which this PR does not touchtests/configs/*.jsonvalidated againstschemas/stablewith AJV, honoringconfig-validation-exemptions.json— 0 problemsbash -non both changed shell scripts — clean✅ Checklist
Cargo.lock, thedependency-feed-checkcheck passes (see docs/pull-requests.md)📋 Issue Type