Skip to content

Align W365 requests with the lifecycle architecture - #1737

Open
Gudge (MGudgin) wants to merge 1 commit into
mainfrom
user/gudge/fix-w365-availability-dispatch
Open

Gudge (MGudgin) wants to merge 1 commit into
mainfrom
user/gudge/fix-w365-availability-dispatch

Conversation

@MGudgin

@MGudgin Gudge (MGudgin) commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

This PR aligns W365 Agents development requests with the existing container lifecycle architecture. Contract adapters normalize requests and preserve field presence, API entry points validate the request kind, and backend resolution decides availability. This separation also restores the expected SDK errors and executor exit codes and diagnostics for unavailable W365 provision requests.

Details

  • Replace the W365-specific parsing refusal with a normalized lifecycle operation, preserving wrapper and provision-settings presence.
  • Integrate W365 with the shared backend representation and engine metadata.
  • Move the availability refusal to backend resolution, before opt-in checks.
  • Cover SDK request-kind validation and executor exit codes and rejection logs, and document the corrected development-contract behavior.

Tests

  • Confirmed the SDK regression fails before the fix and passes afterward.
  • cargo fmt --all -- --check: passed.
  • cargo clippy -q -p mxc-sdk -p wxc --all-targets --features schema-gen -- -D warnings: passed.
  • Development contract tests: 389 passed; lifecycle API tests: 16 passed.
  • Focused adapter, operation, registry, and opt-in unit tests: 134 passed.
  • Built wxc-exec; executor lifecycle tests: 6 passed, including all four W365 experimental/dry-run combinations and exit-code/log assertions.
  • Broad SDK library suite: 2492 passed, 98 failed, 1 ignored. Failures include sandbox-denied filesystem, native security, and registry access; full host-dependent validation remains incomplete.
Microsoft Reviewers: Open in CodeFlow

This PR aligns W365 Agents development requests with the existing container
lifecycle architecture. Contract adapters normalize requests and preserve
field presence, API entry points validate the request kind, and backend
resolution decides availability. This separation also restores the expected
SDK errors and executor exit codes and diagnostics for unavailable W365
provision requests.

Details

* Replace the W365-specific parsing refusal with a normalized lifecycle
  operation, preserving wrapper and provision-settings presence.
* Integrate W365 with the shared backend representation and engine metadata.
* Move the availability refusal to backend resolution, before opt-in checks.
* Cover SDK request-kind validation and executor exit codes and rejection
  logs, and document the corrected development-contract behavior.

Tests

* Confirmed the SDK regression fails before the fix and passes afterward.
* cargo fmt --all -- --check: passed.
* cargo clippy -q -p mxc-sdk -p wxc --all-targets --features schema-gen
  -- -D warnings: passed.
* Development contract tests: 389 passed; lifecycle API tests: 16 passed.
* Focused adapter, operation, registry, and opt-in unit tests: 134 passed.
* Built wxc-exec; executor lifecycle tests: 6 passed, including all four
  W365 experimental/dry-run combinations and exit-code/log assertions.
* Broad SDK library suite: 2492 passed, 98 failed, 1 ignored. Failures
  include sandbox-denied filesystem, native security, and registry access;
  full host-dependent validation remains incomplete.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b321ba7f-10b7-4ee1-a0ea-b377c27a87ce
Generated-with: gpt-6.1-sol
@MGudgin
Gudge (MGudgin) requested review from a team and a balanced review from Copilot November 11, 2026 23:47
@MGudgin
Gudge (MGudgin) requested a review from a team as a code owner November 11, 2026 23:47
@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.

🟢 Approval recommended

No active review issues were identified for the W365 lifecycle integration.

No open issues 🎉

What changed in this PR

This PR routes W365 Agents development requests through MXC’s existing container lifecycle flow while keeping the backend unavailable. It separates request normalization, SDK request-kind validation, and backend availability checks to restore the intended errors and executor diagnostics.

Changes:

  • Preserve W365 wrapper and provision-settings presence in normalized lifecycle requests.
  • Add shared backend metadata and reject unavailable W365 provisioning during backend resolution.
  • Add SDK and executor regressions and document the corrected behavior.
File Description
src/​mxc-sdk/​tests/​wxc_e2e_tests_e2e_state_aware.rs Tests availability errors, exit codes, and logs across opt-in and dry-run combinations.
src/​mxc-sdk/​tests/​mxc_contract/​v1_1_0_alpha/​w365_agents.rs Tests lifecycle adaptation and SDK request-kind error precedence.
src/​mxc-sdk/​src/​core/​mxc_engine/​run.rs Rejects W365 create-and-run execution as an unsupported phase.
src/​mxc-sdk/​src/​core/​mxc_engine/​experimental.rs Adds W365 to experimental-backend test coverage.
src/​mxc-sdk/​src/​core/​mxc_engine/​backend_registry.rs Registers W365 metadata without advertising operational availability.
src/​mxc-sdk/​src/​core/​mxc_common/​wire.rs Adds shared W365 containment recognition.
src/​mxc-sdk/​src/​core/​mxc_common/​state_aware_operation.rs Represents W365 provisioning while preserving settings presence.
src/​mxc-sdk/​src/​core/​mxc_common/​state_aware_dispatch.rs Returns W365 unavailability during backend resolution.
src/​mxc-sdk/​src/​core/​mxc_common/​policy_identity.rs Excludes W365 provision settings from policy identity hashing.
src/​mxc-sdk/​src/​core/​mxc_common/​models.rs Adds W365 backend and normalized provision models.
src/​mxc-sdk/​src/​core/​mxc_common/​config_parser.rs Integrates W365 into lifecycle normalization and test snapshots.
src/​mxc-sdk/​src/​core/​mxc_common/​config_contract_adapters/​dev/​w365_agents.rs Converts provision settings into the shared model and updates adapter tests.
src/​mxc-sdk/​src/​core/​mxc_common/​config_contract_adapters/​dev/​state_aware.rs Produces a lifecycle operation instead of rejecting W365 during adaptation.
src/​mxc-sdk/​src/​core/​mxc_common/​cmdline.rs Assigns W365 the Windows command-processing context.
docs/​containment-policy/​dev/​policy.md Documents request acceptance, availability errors, and executor diagnostics.

Review effort: Balanced

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.

2 participants