Skip to content

Docs + windows runner error updates + SDK version bump#463

Merged
bbonaby merged 22 commits into
mainfrom
user/bbonaby/update-docs-and-errors
May 30, 2026
Merged

Docs + windows runner error updates + SDK version bump#463
bbonaby merged 22 commits into
mainfrom
user/bbonaby/update-docs-and-errors

Conversation

@bbonaby

@bbonaby bbonaby commented May 30, 2026

Copy link
Copy Markdown
Collaborator

📖 Description

Round of docs + Windows runner cleanup, bundled into one PR so the docs, validator, error wording, and version bump all land coherently.

  • SDK platform detection (sdk/src/platform.ts): drop the old checkWindowsBuildVersion gate. Windows 24H2+ is now reported as supported with processcontainer default and isolation_session conditionally appended when the host build is ≥ 26300.8553 (Insider Preview gate). Added a _setWindowsBuildQuery test seam and 5 unit tests covering the gate.
  • READMEs (root + SDK): new Platforms table with a "Minimum build" column split per backend on Windows. Root README link for @microsoft/mxc-sdk now points at the npm package page. The SDK 0.4.0-alpha firewall paragraph is replaced with a concise "host allow/block lists are not implemented on Windows" note.
  • Windows runners: AppContainer and BaseContainer validate_runner now reject filesystem.deniedPaths, network.allowedHosts, and network.blockedHosts unconditionally on Windows (AppContainer keeps its DACL-mode exception for deniedPaths). Both runners also log a one-line warning when network.proxy is set (WinHTTP-only proxying; AppContainer-side UAC caveat preserved). Shared error strings live in wxc_common::error.
  • Cleanups: dropped the obsolete deniedPaths warning in wxc/main.rs that contradicted the new reject path.
  • Version bump: workspace + SDK 0.3.00.6.0 to match the new stable schema;.
  • Build pipeline: added wxc-host-prep.exe to the Windows signPattern in .azure-pipelines/templates/Rust.Build.Job.yml.

🔗 References

None.

🔍 Validation

  • cargo test --workspace --lib on x86_64-pc-windows-msvc — all green (454 in wxc_common, including 9 new validate_runner tests).
  • cd sdk; npm run build && npm test — 174 total / 170 pass / 4 skipped / 0 fail.
  • node scripts/check-version-sync.jsVersion sync OK: 0.6.0.
  • Manually verified the registry-based IsolationSession gate against the live host (CurrentBuild / UBR).

✅ Checklist

📋 Issue Type

  • Bug fix
  • Feature
  • Task

Microsoft reviewers: PR builds don't auto-run (ADO policy). Comment /azp run
to start MXC-PR-Build. See docs/pull-requests.md.

bbonaby and others added 16 commits May 29, 2026 19:47
SDK platform detection:

- Replace checkWindowsBuildVersion with isIsoSessionSupported (Insider Preview build 26300.8553+).

- computeSupport on Windows now always marks supported with processcontainer default and conditionally appends windows_sandbox and isolation_session.

Docs:

- Add Platforms table to root README and sdk/README with a Minimum build column; root README now points to the SDK README as the supported integration surface.

- Update troubleshooting wording from build/UBR specifics to pre-24H2; broaden Linux to also list Bubblewrap.

Rust runner validation:

- AppContainer and BaseContainer runners now reject filesystem.deniedPaths, network.allowedHosts, and network.blockedHosts with a clear 'not yet supported on Windows' error (AppContainer still permits deniedPaths when running in DACL mode).

- Error strings live as shared pub(crate) const in script_runner.rs so both runners surface identical wording; doc-comment explains the AppContainer + ALL APPLICATION PACKAGES access model.

- Both runners log a one-line warning when network.proxy is configured: WinHTTP-only proxying, with the AppContainer-specific UAC caveat preserved.

Build pipeline:

- Add wxc-host-prep.exe to the Windows signPattern in Rust.Build.Job.yml so it ships alongside the other Windows binaries.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…xample, trim shared error doc

- Platforms table: split Windows minimum-build cell across two lines using <br> for clarity.

- platform.ts: drop redundant isoSessionSupportedCache (getPlatformSupport already memoizes).

- README permissiveLearningMode example: add version/containerId/containment, replace bogus 'script' with process.commandLine, note debug-builds-only.

- script_runner.rs: trim the shared error doc comment to just state what the constants are and why they're shared.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… defaults

- Merge brings PR 455: 0.6.0-alpha promoted to stable, dev schema renamed to 0.7.0-dev, Linux default backend now bubblewrap, supported schema range extended through 0.7.

- Bump src/Cargo.toml [workspace.package].version 0.3.0 -> 0.6.0 to match the stable schema.

- Bump sdk/package.json 0.3.0 -> 0.6.0 (npm install regenerated sdk/package-lock.json).

- Update README.md and sdk/README.md Platforms tables to reflect bubblewrap as the Linux default and schema 0.6.0-alpha for macOS.

- Resolve sdk/README.md conflict, keeping our Minimum-build column.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Version bump:

- src/Cargo.toml [workspace.package].version 0.3.0 -> 0.6.0 (matches stable schema).

- sdk/package.json 0.3.0 -> 0.6.0; npm install regenerated sdk/package-lock.json.

- scripts/check-version-sync.js passes.

Tests:

- appcontainer_runner: add 5 validate_runner tests covering deniedPaths in BFS (reject) vs DACL (accept) modes, allowedHosts/blockedHosts rejection, and the all-empty-policy case.

- base_container_runner: add 4 validate_runner tests covering the same policy fields; the empty-policy case is guarded on hosts where the BaseContainer API isn't present.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…vailability gate

- Extract a WindowsBuildQuery seam in platform.ts so the IsolationSession version check (build 26300.8553+) can be exercised deterministically without depending on the host's actual build.

- Add 5 unit tests covering the gate: below threshold, exactly at threshold, newer major, registry-unavailable, and the 'processcontainer is always the default on Windows now that the SDK build gate is removed' regression guard.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…AC warning

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
script_runner.rs is platform-agnostic; cfg-gating Windows-only constants under it was a layering smell. Move them into a new wxc_common::windows_policy_errors module declared under the existing cfg(target_os = windows) block in lib.rs, alongside the other Windows-only modules. No per-item cfg gates needed; both runners now use crate::windows_policy_errors::*.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…erShell

- Drop the dedicated windows_policy_errors module; put the two pub(crate) const strings in error.rs (the obvious place readers look for error-related stuff) behind per-item cfg(target_os=windows) gates.

- README ETW-tracing example now uses PowerShell instead of Python and sets policy.ui.allowWindows=true since PowerShell needs win32k at startup.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… only

The 0.4.0-alpha legacy AppContainer path natively honors blockedHosts (Windows Firewall) and deniedPaths (DACL on Tier 3 hosts), so the strict reject we surface for BaseContainer (0.5.0-alpha+) must not fire on 0.4 configs. Use is_base_container_version() to scope both runners checks.

Also reword the error strings from "on Windows" to "on this Windows backend" so they accurately describe the BaseContainer-era scope.

Added two legacy-schema tests (one per runner) confirming 0.4 configs with deniedPaths/allowedHosts/blockedHosts pass through validate_runner unchanged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…DK 0.4 heads-up

- Root README: drop the "supported integration surface" claim; just note the SDK exists and link to its README.

- SDK README: replace the 0.4-specific firewall/proxy/elevation paragraph with a concise statement that host allow/block lists are not implemented on Windows; point at defaultNetworkPolicy / network.proxy as alternatives.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…bsolete test configs

The SDK README now states host allow/block lists are not implemented on Windows (period), so the runner-side schema gate that exempted 0.4.0-alpha was inconsistent with the docs. Remove the gate from both AppContainer and BaseContainer runners; restore the original on-Windows error wording.

Test configs whose entire purpose was exercising the now-rejected fields are deleted:

- tests/examples/02_filesystem_access.json (deniedPaths)

- tests/examples/03_network_restricted.json (allowedHosts)

- tests/examples/04_combined_restrictions.json (both)

- tests/configs/network_{both,capabilities,default,firewall}_test.json (allowedHosts variants)

tests/examples/11_localhost_proxy_processcontainer.json keeps its proxy assertions; the allowedHosts entry is dropped.

Drop the legacy-schema unit tests added in the previous commit; revert the request helpers to ExecutionRequest::default().

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… reject path

The warning told users to enable BaseContainer (via --experimental or schema 0.5+) to make deniedPaths work, which is the exact configuration that now errors out. Removing it.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…mplemented)

Per Alex: keep these as forward-looking regression coverage. They currently fail with our not-yet-supported errors; future work will make them pass.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
sdk/tests/integration/package-lock.json regenerated; mxc-sdk link now resolves at 0.6.0.

Skipping playground for now: its package.json has a broken file: path (file:../sdk dating back to the PR #459 reorg that moved playground under tests/). Fixing it correctly resolves the SDK link but rewrites ~1k lines of phantom transitive deps the old broken path was pinning. Leaving that for a focused PR.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 30, 2026 04:10
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@bbonaby

bbonaby commented May 30, 2026

Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

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.

Pull request overview

This PR updates MXC’s Windows support/docs posture, tightens Windows runner validation for unsupported policy fields, and bumps Rust/SDK package versions to 0.6.0.

Changes:

  • Removes SDK-side Windows build support gating while separately gating isolation_session.
  • Adds Windows runner validation/errors for unsupported deniedPaths and host allow/block lists, plus proxy warnings.
  • Updates docs, examples, package versions, locks, and Windows signing artifact patterns.

Reviewed changes

Copilot reviewed 12 out of 15 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
README.md Updates platform/build docs and sample config.
sdk/README.md Updates platform matrix, Windows network policy note, and troubleshooting.
sdk/src/platform.ts Refactors Windows build detection and IsolationSession availability gate.
sdk/tests/unit/platform.test.ts Adds unit tests for the new IsolationSession build gate.
src/wxc_common/src/error.rs Adds shared Windows unsupported-policy error strings.
src/wxc_common/src/appcontainer_runner.rs Adds AppContainer validation and proxy warning behavior with tests.
src/wxc_common/src/base_container_runner.rs Adds BaseContainer validation and proxy warning behavior with tests.
src/wxc/src/main.rs Removes obsolete deniedPaths warning.
tests/examples/11_localhost_proxy_processcontainer.json Removes unsupported host allow-list from proxy example.
src/Cargo.toml Bumps Rust workspace version to 0.6.0.
src/Cargo.lock Regenerates workspace crate versions.
sdk/package.json Bumps SDK package version to 0.6.0.
sdk/package-lock.json Regenerates SDK lockfile version metadata.
sdk/tests/integration/package-lock.json Regenerates integration lockfile version metadata.
.azure-pipelines/templates/Rust.Build.Job.yml Adds wxc-host-prep.exe to Windows signing/copy pattern.
Files not reviewed (2)
  • sdk/package-lock.json: Language not supported
  • sdk/tests/integration/package-lock.json: Language not supported

Comment thread src/wxc_common/src/error.rs
Comment thread sdk/README.md Outdated
Comment thread sdk/README.md Outdated
Comment thread README.md Outdated
…fix UI block in README example

- error.rs + sdk/README: defaultNetworkPolicy -> network.defaultPolicy; deny -> block.

- sdk/README troubleshooting: drop the pre-24H2 Windows clause now that computeSupport always reports isSupported on Windows.

- README PowerShell example: top-level ui.disable=false (the actual wire field) instead of the bogus policy.ui.allowWindows.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@bbonaby

bbonaby commented May 30, 2026

Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@bbonaby bbonaby changed the title Docs + Windows runner cleanup; bump SDK and workspace to 0.6.0 Docs + windows runner error updates + SDK version bump May 30, 2026
Comment thread sdk/src/platform.ts
Comment thread sdk/src/platform.ts Outdated
@kanismohammed
kanismohammed requested a review from a team May 30, 2026 04:46
@bbonaby

bbonaby commented May 30, 2026

Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

bbonaby and others added 2 commits May 29, 2026 22:04
baf0f5f

baf0f5f simplified isIsoSessionSupported to `major > 26300` (UBR not verifiable outside Insider Preview). The "exactly 26300.8553 -> included" test still asserted the old `>= 8553` semantics and failed in CI.

Updated the test set: 26300.x is now omitted (regardless of minor), 26400.x is included, plus the existing null and far-below cases.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… band)

Per manager: drop the `major > 26300` fallback; require the specific Insider Preview build that introduced IsolationSession. Future major builds will be added explicitly when they ship support.

Test set: 26300.8552 omitted, 26300.8553 included, 26300.9999 included, 26400.x omitted (gate pinned), null omitted, plus the processcontainer-always regression guard.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@kanismohammed
kanismohammed requested a review from a team May 30, 2026 05:18
#[cfg(target_os = "windows")]
pub(crate) const DENIED_PATHS_NOT_SUPPORTED_MSG: &str =
"filesystem.deniedPaths is not yet supported on Windows. Paths are denied by \
default unless granted via readwritePaths or readonlyPaths. Remove deniedPaths, \

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.

This is slightly misleading - technically it's true, but if there's ALL APPLICATION PACKAGES ace is on the file, then AppContainer can access it.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I can add that in if you want to make it more correct

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.

No, let's just make a mental note for next week to update verbiage somewhere in the docs to make this clear.

@jsidewhite jsidewhite left a comment

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:

@bbonaby

bbonaby commented May 30, 2026

Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

- EXPECTED_WINDOWS_BINARIES: add wxc-host-prep.exe so the "no unexpected binaries" check accepts the binary this PR added to the Windows signPattern. Also auto-generates a "should include wxc-host-prep.exe" sub-test.

- assertDryRunResult: drop the DryRunExpectation enum and the expectDryRunValidationPass wrapper. The previous processmodel.dll heuristic assumed BaseContainer was the only viable route on schema 0.5+, but the dispatcher always falls back to AppContainer+DACL via the default fallback.allowDaclMutation=true. Simplified to a 3-arg helper that only asserts the pass case; failures are real regressions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@bbonaby

bbonaby commented May 30, 2026

Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@bbonaby
bbonaby merged commit 206dd54 into main May 30, 2026
20 checks passed
@bbonaby
bbonaby deleted the user/bbonaby/update-docs-and-errors branch May 30, 2026 06:58
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.

4 participants