Skip to content

Add W365 Agents Phase 1 development request contract - #1697

Merged
Branden Bonaby (bbonaby) merged 5 commits into
mainfrom
users/tbyfield/w365a-phase1-contracts
Nov 10, 2026
Merged

Branden Bonaby (bbonaby) merged 5 commits into
mainfrom
users/tbyfield/w365a-phase1-contracts

Conversation

@tbyfield

@tbyfield tbyfield commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

📖 Description

Introduces the Phase 1 Windows 365 for Agents request contract in development version 1.1.0-alpha.

  • Adds containment: "w365_agents" for provision, with optional w365Agents.provision settings: required poolId when supplied, optional userType (Local, HumanUser, or Agentic), and optional userObjectId.
  • Adds private adapters and contract/parser fixtures that preserve optional-field presence and reject invalid, unknown, null, and wrong-phase settings.
  • Regenerates the development JSON schema and TypeScript contract definitions, and updates the containment-policy and codegen documentation.

This is a contract-only change. Provision returns backend_unavailable; later phases use the existing request contracts and normal ID dispatch, with w365: IDs currently returning unsupported_containment. No backend execution, network calls, Cargo feature changes, or typed W365 SDK authoring APIs are introduced. Published contracts remain unchanged.

Accepting the three user-type values does not implement session authentication or checkout; those behaviors remain backend work.

Checkout/release and readiness/execution remain separate Phase 2/3 changes. The per-phase endpoint/token settings described in the design are deferred to those phases for review alongside the corresponding runtime behavior; they are not part of this initial contract slice.

🔗 References

Refs #1615

🔍 Validation

Local validation for the single commit bfaa2c90, based on 2ff2b893:

  • From src/: cargo test -p mxc-sdk --features schema-gen --test mxc_contract_v1_1_0_alpha -q — passed, 386 tests.
  • From src/: cargo test -q -p mxc-sdk --features schema-gen --lib w365_agents — passed, 4 tests.
  • From src/: cargo fmt --all -- --check — passed.
  • From the repository root: node scripts/versioning/check-contract-codegen.js — passed; all three contract artifact sets match and validate, and published schemas match origin/main.
  • git diff 2ff2b893 HEAD --check — passed.

Earlier local validation before the Local and Agentic user-type additions:

  • From src/: cargo build --workspace — passed.
  • From src/: cargo test --workspace -q — passed.
  • From sdk/node/: npm test — passed.
  • From sdk/dotnet/: dotnet test --solution Microsoft.Mxc.Sdk.slnx — passed, 0 failures and 114 skipped tests.
  • From sdk/node/: npm run test:integration — not passing locally. The first run could not locate mxc_ffi.dll; a rerun with the workspace debug DLL had 17 passed and 13 failed, involving unavailable packaging/PTy artifacts and offline Python setup. These failures did not exercise W365; full Node integration validation remains incomplete.

The new contract scenarios are included in the existing versioning CI test selection. No live W365 infrastructure is needed or exercised by this slice.

✅ Checklist

  • Signed the Contributor License Agreement
  • Linked to an issue
  • For features or changes requiring a spec: linked the issue with maintainer-applied feature-accepted
  • For implementation: linked the required approved and merged design/API spec, or explained why no spec is required
  • Feature issue remains open unless this PR completes all agreed implementation, validation, and documentation
  • Updated documentation (if applicable)
  • Updated Copilot instructions (if build, architecture, or conventions changed)
  • If this PR changes Cargo.lock, the dependency-feed-check check passes (see pull request builds)

CLA status has not been verified locally. Copilot-instruction and dependency-feed updates are not applicable: this change does not alter build conventions or Cargo.lock.

📋 Issue Type

  • Bug fix
  • Feature
  • Task
Microsoft Reviewers: Open in CodeFlow

Add provision-only W365 settings, private adapters, contract fixtures, and generated schema and TypeScript artifacts. Keep the backend unavailable and published contracts unchanged.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 6, 2026 17:42
@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.

🟡 Changes recommended

The userType validation accepts "Local" and "Agentic" despite the agreed contract allowing only "HumanUser", requiring correction or an approved design change.

1 open issue
What changed in this PR

Adds the first Windows 365 for Agents contract slice to MXC’s 1.1.0-alpha development contract, preparing for the backend work tracked in #1615. Published contracts remain unchanged, and W365 execution remains unavailable.

Changes:

  • Adds W365 provision request types, validation, parsing, and private adapters that preserve optional-field presence.
  • Adds fixtures and parser/SDK checks for accepted inputs, rejected settings, and unavailable execution.
  • Regenerates development schema and TypeScript definitions and documents the contract-only scope.
File Description
src/​mxc-sdk/​tests/​mxc_contract/​v1_1_0_alpha/​w365_agents.rs Tests contract validation and unavailable execution.
src/​mxc-sdk/​tests/​mxc_contract/​v1_1_0_alpha/​fixtures/​w365_agents_provision/​valid/​omitted.json Covers omitted settings.
src/​mxc-sdk/​tests/​mxc_contract/​v1_1_0_alpha/​fixtures/​w365_agents_provision/​valid/​minimal.json Covers pool-only settings.
src/​mxc-sdk/​tests/​mxc_contract/​v1_1_0_alpha/​fixtures/​w365_agents_provision/​valid/​local-user.json Covers the Local user type.
src/​mxc-sdk/​tests/​mxc_contract/​v1_1_0_alpha/​fixtures/​w365_agents_provision/​valid/​empty-wrapper.json Covers an empty settings wrapper.
src/​mxc-sdk/​tests/​mxc_contract/​v1_1_0_alpha/​fixtures/​w365_agents_provision/​valid/​complete.json Covers complete provision settings.
src/​mxc-sdk/​tests/​mxc_contract/​v1_1_0_alpha/​fixtures/​w365_agents_provision/​valid/​agentic-user.json Covers the Agentic user type.
src/​mxc-sdk/​tests/​mxc_contract/​v1_1_0_alpha/​fixtures/​w365_agents_provision/​invalid/​wrong-phase.json Rejects settings for another phase.
src/​mxc-sdk/​tests/​mxc_contract/​v1_1_0_alpha/​fixtures/​w365_agents_provision/​invalid/​unsupported-user-type.json Rejects unknown user types.
src/​mxc-sdk/​tests/​mxc_contract/​v1_1_0_alpha/​fixtures/​w365_agents_provision/​invalid/​unknown-setting.json Rejects unknown provision fields.
src/​mxc-sdk/​tests/​mxc_contract/​v1_1_0_alpha/​fixtures/​w365_agents_provision/​invalid/​null-settings.json Rejects null provision settings.
src/​mxc-sdk/​tests/​mxc_contract/​v1_1_0_alpha/​fixtures/​w365_agents_provision/​invalid/​missing-pool.json Rejects settings without a pool ID.
src/​mxc-sdk/​tests/​mxc_contract/​v1_1_0_alpha/​fixtures/​w365_agents_provision/​invalid/​local-policy.json Rejects local filesystem policy.
src/​mxc-sdk/​tests/​mxc_contract/​v1_1_0_alpha/​fixtures/​w365_agents_provision/​invalid/​invalid-guid.json Rejects malformed GUIDs.
src/​mxc-sdk/​tests/​mxc_contract/​v1_1_0_alpha/​fixtures/​w365_agents_provision/​invalid/​guid-trailing-newline.json Rejects GUIDs with trailing newlines.
src/​mxc-sdk/​tests/​mxc_contract/​v1_1_0_alpha/​fixtures/​w365_agents_provision/​invalid/​array-wrapper.json Rejects array settings wrappers.
src/​mxc-sdk/​tests/​mxc_contract/​v1_1_0_alpha/​fixtures/​stop/​valid/​w365-agents.json Covers stop requests with W365 IDs.
src/​mxc-sdk/​tests/​mxc_contract/​v1_1_0_alpha/​fixtures/​stop/​invalid/​w365-settings.json Rejects W365 settings during stop.
src/​mxc-sdk/​tests/​mxc_contract/​v1_1_0_alpha/​fixtures/​start/​valid/​w365-agents.json Covers start requests with W365 IDs.
src/​mxc-sdk/​tests/​mxc_contract/​v1_1_0_alpha/​fixtures/​start/​invalid/​w365-settings.json Rejects W365 settings during start.
src/​mxc-sdk/​tests/​mxc_contract/​v1_1_0_alpha/​fixtures/​start/​invalid/​w365-array-settings.json Rejects array-valued start settings.
src/​mxc-sdk/​tests/​mxc_contract/​v1_1_0_alpha/​fixtures/​exec/​valid/​w365-agents.json Covers execution request fields with W365 IDs.
src/​mxc-sdk/​tests/​mxc_contract/​v1_1_0_alpha/​fixtures/​exec/​invalid/​w365-settings.json Rejects W365 settings during execution.
src/​mxc-sdk/​tests/​mxc_contract/​v1_1_0_alpha/​fixtures/​deprovision/​valid/​w365-agents.json Covers deprovision requests with W365 IDs.
src/​mxc-sdk/​tests/​mxc_contract/​v1_1_0_alpha/​fixtures/​deprovision/​invalid/​w365-settings.json Rejects W365 settings during deprovision.
src/​mxc-sdk/​tests/​mxc_contract/​v1_1_0_alpha/​fixtures.rs Registers W365 provision fixtures.
src/​mxc-sdk/​tests/​mxc_contract/​v1_1_0_alpha.rs Includes the W365 test module.
src/​mxc-sdk/​src/​core/​mxc_contract/​registry.rs Registers the development W365 request root.
src/​mxc-sdk/​src/​core/​mxc_contract/​dev/​state_aware/​w365_agents.rs Defines W365 request types and GUID validation.
src/​mxc-sdk/​src/​core/​mxc_contract/​dev/​state_aware/​provision/​mod.rs Adds the W365 provision variant.
src/​mxc-sdk/​src/​core/​mxc_contract/​dev/​state_aware/​provision/​containment.rs Recognizes the W365 containment name.
src/​mxc-sdk/​src/​core/​mxc_contract/​dev/​state_aware/​mod.rs Exports W365 lifecycle contract types.
src/​mxc-sdk/​src/​core/​mxc_contract/​dev/​schema.rs Adds W365 schema dispatch and checks.
src/​mxc-sdk/​src/​core/​mxc_contract/​dev/​request.rs Routes development W365 provision parsing.
src/​mxc-sdk/​src/​core/​mxc_contract/​dev/​primitives.rs Adds object-only optional deserialization.
src/​mxc-sdk/​src/​core/​mxc_contract/​dev/​mod.rs Re-exports W365 development types.
src/​mxc-sdk/​src/​core/​mxc_common/​state_aware_input.rs Prevents contract-only inputs from becoming executable operations.
src/​mxc-sdk/​src/​core/​mxc_common/​sdk_input.rs Updates tests for fallible input extraction.
src/​mxc-sdk/​src/​core/​mxc_common/​config_parser.rs Parses W365 provision and propagates unavailable errors.
src/​mxc-sdk/​src/​core/​mxc_common/​config_contract_adapters/​v1_0/​state_aware_tests/​common.rs Updates the published-contract test helper.
src/​mxc-sdk/​src/​core/​mxc_common/​config_contract_adapters/​v0_9/​state_aware_tests/​common.rs Updates the legacy-contract test helper.
src/​mxc-sdk/​src/​core/​mxc_common/​config_contract_adapters/​dev/​w365_agents.rs Adds private settings adaptation and presence tests.
src/​mxc-sdk/​src/​core/​mxc_common/​config_contract_adapters/​dev/​state_aware.rs Adapts W365 provision requests into private inputs.
src/​mxc-sdk/​src/​core/​mxc_common/​config_contract_adapters/​dev/​state_aware_tests/​common.rs Updates the development-contract test helper.
src/​mxc-sdk/​src/​core/​mxc_common/​config_contract_adapters/​dev/​mod.rs Registers the private W365 adapter module.
sdk/​node/​src/​generated/​v1_1_0_alpha/​wire.ts Adds generated W365 TypeScript definitions.
schemas/​dev/​mxc-config.schema.1.1.0-alpha.json Adds generated W365 schema definitions and routing.
docs/​development/​build-and-test/​schema-codegen.md Updates request-root counts and backend coverage.
docs/​containment-policy/​dev/​policy.md Documents W365 settings and unavailable runtime behavior.

Review effort: Balanced

@tbyfield
tbyfield marked this pull request as ready for review November 6, 2026 19:30
@tbyfield
tbyfield requested a review from a team November 6, 2026 19:30
@tbyfield
tbyfield requested a review from a team as a code owner November 6, 2026 19:30
Comment thread docs/containment-policy/dev/policy.md Resolved
tbyfield and others added 3 commits November 6, 2026 14:59
Clarify Local, HumanUser, and Agentic session identities in the design and development policy reference.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Restore shared lifecycle input and existing test helpers; refuse contract-only W365 provision at the adapter boundary.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 6, 2026 23: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.

🟢 Approval recommended

No active review issues block the Windows 365 for Agents development request-contract change.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@bbonaby

Copy link
Copy Markdown
Collaborator

tbyfield, you just have a merge conflict. Once that's fix I should be able to approve.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 9, 2026 17:47

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

There are no active review issues for the development-only Windows 365 request contract.

No open issues 🎉

Review effort: Balanced

@tbyfield

tbyfield commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

Branden Bonaby (@bbonaby) - I've resolved the merge conflict and build is clean (after a few attempts)

@bbonaby
Branden Bonaby (bbonaby) merged commit 37a3e93 into main Nov 10, 2026
53 of 54 checks passed
@bbonaby
Branden Bonaby (bbonaby) deleted the users/tbyfield/w365a-phase1-contracts branch November 10, 2026 17:20
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