Skip to content

Migrate CrossDeviceExperiences shared directives to v3 - #3844

Open
Ramses Sanchez-Hernandez (ramsessanchez) wants to merge 25 commits into
powershell-v3from
ramsessanchez-crossdeviceexperiences-v3-migration
Open

Ramses Sanchez-Hernandez (ramsessanchez) wants to merge 25 commits into
powershell-v3from
ramsessanchez-crossdeviceexperiences-v3-migration

Conversation

@ramsessanchez

@ramsessanchez Ramses Sanchez-Hernandez (ramsessanchez) commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

N/A

Changes proposed in this pull request

Final post-#3886 revalidation passed on the normally merged target. This existing PR remains DRAFT by the user's current choice; no readiness flip or PR merge was performed. The previous implicit-refetch header failure is preserved as historical evidence, not relabeled as a pass. New positive tests require exactly one PATCH: 204 succeeds with no output and no GET, while 200 returns the actual typed response. Optional retrieval is an independent caller GET with its own inputs and errors; there is no new readback flag.

Preserve the CrossDeviceExperiences shared directive's complete original source intent. Actual legacy/current v1.0 select zero operations. Actual legacy/current beta select the same two operations below: 2 original matches, 2 unique method/normalized-path survivors, 0 removals, no missed successors. Current aligned IDs use the existing finite literal mapping schema without reserved Legacy fields.

Selected beta operation Current and original legacy operation ID
DELETE /users/{user-id}/devices/{device-id}/registeredOwners/$ref user.device_DeleteRegisteredOwnerGraphBPreRef
DELETE /users/{user-id}/devices/{device-id}/registeredUsers/$ref user.device_DeleteRegisteredUserGraphBPreRef

Suppress only these exact collection DELETEs. Preserve published DirectoryObjectByRef item nouns, item-reference DELETEs, collection GET/POST, original client/spec routes, defaults and all reviewed neighbors. Keep the original shared AutoRest directive active. Earlier zero-compatible-ID absence claims are superseded by the preserved corrections and complete source-set proof, not silently repeated.

Scope is only shared src/CrossDeviceExperiences/CrossDeviceExperiences.md cmdlet directives. src/readme.graph.md and every profile-local directive remain ignored. Parameter aliases/transforms and schema/response directives remain deferred; none occur in this shared file. Required profiles: v1.0 then beta, no exclusions or legacy fallback. No variant groups, new flags, routing policies, broad suppressions, unmerged #3881 overlay, issue #3897 optional-query expansion, or unrelated naming changes.

Current integration and preserved commit boundaries

Normal target 6475f3f5beb4908d39ea356db32bf1e0fd3273cb (#3886), merged by 257c103cc89606126abb492b0bec67472cbf8613. All prior source corrections and separate generation commits remain intact; no rebase, amendment, cherry-pick or force-push.

  • aea9950edf9ccf84fe67754c1a3c693276bf9028: own positive no-GET/result/header/ShouldProcess tests plus actual required-query source audit. API profile remains separate from the three GeneratorConfig run settings, with both profiles and derived data on/off covered.
  • 829134260ba275182953072aac60a349db27bb80: separate combined full v1.0 client/cmdlet/project/lock regeneration, removing two implicit PATCH GET branches and retaining current GET input metadata. Unchanged client/projects/locks are not fabricated deltas.
  • 5d1ad6b7cbcb736ef4e6a2d8d37e62a10a55b4af: separate combined full beta regeneration, removing six implicit PATCH GET branches and retaining current GET metadata, 117 exports, exact suppressions and independent item nouns. Client/projects/locks remain unchanged where identical.

All normal manifests were regenerated and require Authentication 2.41.2 without RequiredAssemblies. Wrapper bins and normally packed nupkgs contain only client/runtime/module DLLs; Authentication owns the complete sole Kiota/RMS/UriTemplate/serializer closure. No bin/obj, DLL, nupkg, log, TRX or session artifact is committed. Full uncapped Git scope, including deleted/renamed paths, was checked: 1,505 owned files relative to the target, no other-module/global changes.

Profile Compatible spec Git blob Actual legacy spec Git blob
v1.0 45b8333713754594abb65e3abf293a47ce194881 d3c154f50de2c35fdfc46578f6988d7cfc1938ac
beta fb1efe20aaa60a0d7bb63c66aa3f6b5cf6c83389 b4d46b00016bf459fd7537063eedcd6e0893eff2

Required-query and mutation audit

Actual v1.0 has zero required-query operations. Beta has two, both native @id inputs on the two original suppressed collection DELETEs. There are zero surviving required-query operations, so no public QueryId route is revived merely to test the framework. Both client/spec routes remain present. Surviving item DELETE/no-query neighbors remain bodyless, with their original mandatory path IDs; compiled metadata confirms zero unexpected Query* inputs. Optional OData bindings remain unchanged. The shared required-query regression suite is included in current tests, but no synthetic fixture is substituted for a full module acceptance gate.

Fresh source, full build and package results

Use the accepted normally built adapted Authentication 2.41.2 package first on process-local PSModulePath, not stock Gallery or old 2.38.1. All 64 file SHA256s match its manifest; physical Authentication nupkg SHA256 is 2FC09BFE6B70D313BC56DF8ADCCFB1976FB4E90A1898BF8A916B4B8B792898EB. Auth/runtime/templates/builder inputs remain source-equivalent to the accepted package. Toolchain: Kiota 1.36.1+fd3bf87790149b87f40f7eae1a5feb9016625943, process-local cap 1, PowerShell 7/Core, .NET 10.0.403. No global installation, dependency preload, shim or closure copy.

Exact current targeted command, passed 175/175 with actual nonempty TRX counters (total/executed/passed 175, failed/not-executed 0), after nonincremental unit-project build:

dotnet build .\tools\WrapperGenerator.Tests\WrapperGenerator.Tests.csproj --no-incremental --no-restore --nologo -v minimal
dotnet test .\tools\WrapperGenerator.Tests\WrapperGenerator.Tests.csproj --no-build --no-restore --filter 'FullyQualifiedName~CrossDeviceExperiencesDirectiveMigrationTests|FullyQualifiedName~CmdletConfiguratorTests|FullyQualifiedName~NamingTests|FullyQualifiedName~DerivedCollisionResolutionsTests|FullyQualifiedName~RequiredQueryTests|FullyQualifiedName~PatchOperationTests' --nologo --verbosity minimal --logger 'trx;LogFileName=targeted.trx' --results-directory $BuildEvidence

$BuildEvidence is the new owner artifact folder post3886-6475-final. $Queue is the unchanged coordinator Invoke-QueuedModuleBuild.ps1 four-mutex queue. Both full profiles ran sequentially after the authored correction with no SkipKiota, GenerateOnly, NoCollisionData, or fallback.

Exact command/check Result
Module-only dotnet test with --no-build --no-restore --filter FullyQualifiedName~CrossDeviceExperiencesDirectiveMigrationTests --logger 'trx;LogFileName=module.trx' Passed 16/16 actual-spec module cases.
pwsh -NoProfile -File .\tools\Get-WrapperDirectiveMigrationInventory.ps1 -Module CrossDeviceExperiences -FailOnUnresolved -AsJson Passed, one row Mapped / CmdletConfigurator, v1.0 zero operations and beta exactly two. No unreviewed candidate or waiver.
pwsh -NoProfile -NonInteractive -File $Queue -RepoRoot $PWD.Path -Module CrossDeviceExperiences -ApiVersion v1.0 -Configuration Release Passed, exit 0, OK, 16 exports, 87.4 seconds.
Same full queue command with -ApiVersion beta Passed, exit 0, OK, 117 exports, 487.6 seconds. Queue wait is not misreported as module build time.
dotnet build .\src\CrossDeviceExperiences\wrapper\<profile>\Microsoft.Graph.Wrapper.CrossDeviceExperiences.csproj -c Release --no-incremental --no-restore --nologo -v minimal after each full run Passed, both profiles; prevents old incremental DLLs from substituting for new output.
Normal dotnet pack --no-build --no-restore using completed full outputs and normal nuspec/file/dependency layout Passed both profiles; three owned DLLs and Auth minimum 2.41.2, fresh unpacked-manifest imports export 16/117. Nupkg SHA256s: v1.0 42A4CE7C9B0C01C9133F4B22BAA240051FC4AD13A5DB42826802D5A07303D15A; beta 16E41A3EFD6C56B21BBF2EE8E82D5ADBC3EECCA8F8E850CD8C3C17290AFD5A4C.

Guarded real compiled runtime acceptance: PASS

Corrected runtime artifacts and canonical scalar handoff.json are in the new owner folder post3886-6475-memory-final, referencing unchanged full-build/TRX/package artifacts from post3886-6475-final by absolute paths and SHA256. Older unguarded initial runtime proofs/scripts remain untouched and are not used as new memory-isolation evidence. This was a probe-only setup correction: no Auth/source/full-build/TRX/generation rerun was done for it.

The secondary-runspace normal module import was observed to reset the shared store to DiskDataStore. The existing Set-MgTestDataStore helper is now reapplied after the last import and before Connect, followed by actual reflected GraphSession.DataStore guards before HTTP, request-context changes, reconnect and Disconnect/logout. Every guarded phase records Microsoft.Graph.Authentication.Test.Mocks.MockDataStore on the actual shared instance (27 guards per v1.0 proof, 39 per beta proof). No credential I/O is inferred merely from the earlier datastore type.

Exact runtime command per profile/cloud, passed all four final-head processes:

pwsh -NoProfile -NonInteractive -File $MemoryEvidence\Test-CompiledTransport.ps1 -RepoRoot $PWD.Path -Profile <v1.0|beta> -Environment <Global|USGov> -ResultPath $MemoryEvidence\compiled-<profile>-<cloud>.json

These normal-manifest probes use real Connect-MgGraph, the actual GraphHttpClientFactory token pipeline, and a test-only offline terminal, not a bare marker client. No live Graph/OAuth requests or credential-store use is required.

  • PATCH 204: success, zero output, exactly one PATCH, no GET, while GET is deliberately configured to reject 403. Native typed body, selected path IDs/profile and generic headers are captured. No ReadBack, Refetch or PassThru flag.
  • PATCH 200: exactly one PATCH, actual typed UserActivity response, no follow-up request. Explicit caller GET separately proves independent headers/select query/result and independent 403 error; neither constrains the earlier mutation.
  • Retained routes/defaults/binders: 3 v1.0 / 11 beta neighbors, two beta suppression absences and both published item nouns pass exact compiled GraphRoute checks. Public default List/item GET routing, encoded IDs, optional query bindings and initial headers pass. Typed VisualInfo/UntypedNode POST JSON and results, bodyless DELETE, retained beta reference GET/POST @odata.id/item DELETE If-Match, and the existing typed provision action pass real captures.
  • Safety/lifecycle: WhatIf and genuine declined Confirm send zero HTTP, exactly one prompt per declined mutation (3 v1.0 / 8 beta per cloud). Invalid typed/incompatible bindings fail before HTTP. Adapter reuse, alternating profiles, request-context invalidation, reconnect and disconnected NoGraphSession are verified. Final captures contain 14 authenticated requests per v1.0/cloud and 21 per beta/cloud.
  • Roots/identity: generated beta uses /beta, USGov uses graph.microsoft.us/<profile>, while the real shared factory client retains its original global /v1.0/ BaseAddress. Profile switching does not mutate it. One normal Authentication/Kiota/RMS/UriTemplate identity loads from the accepted package in the expected Default/private contexts; no copied dependency closure or preloads.

The old implicit-refetch-header failure is user-superseded, not a remaining blocker: there is intentionally no implicit GET to forward headers to. Its old raw evidence was not changed. The new positive one-operation gate passed on current compiled output.

Honest remaining scope limits

Raw current parity: v1.0 passes 16/16 routes; beta fails exit 1 with 117 mismatches, 115 solely the existing Mg/MgBeta prefix and two existing recent()/provision naming differences. No normalized-prefix raw pass, broad naming sweep, or operation suppression is introduced. Existing NU1903/obsolete-API/generated-model warnings remain unrelated. No live tenant certification, unrelated full-suite claim, unmerged #3881 behavior, or issue #3897 optional-query expansion is claimed.

All new old-target/failure/build/runtime evidence is preserved. Canonical new post3886-6475-memory-final\handoff.json has actual scalar counters, current head, full uncapped Git scope, per-profile commits/timings, original build/TRX/Auth64/package hashes and guarded actual HTTP/context/datastore proof paths. PR stays DRAFT by explicit choice despite successful final gates.

Other links

Record expected absence of both historical operation-ID suppressions in compatible v1.0 and beta specs. Preserve live beta device-reference operations and pin reviewed evidence in module-specific tests.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Run full Kiota 1.36.1 and wrapper generation against the compatible v1.0 spec, then build Release with 16 compiled exports. Client and cmdlet sources and projects are otherwise byte-identical after Git newline normalization; only the Kiota lock description hash changes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Preserve item and collection delete operations by applying the published DirectoryObjectByRef nouns to the two exact item paths. Record this generation prerequisite separately from the absent historical selector and pin distinct names without adding any suppression.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Run full Kiota 1.36.1 and wrapper generation against the compatible beta spec, then build Release successfully with 119 compiled exports. Commit the new beta client, cmdlets, generated projects, and both Kiota locks together. Preserve all item and collection reference deletes; baseline beta naming-prefix and recent-function parity differences remain documented limitations.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Correct the beta absence audit by matching the original selector against actual legacy operation IDs and bridging both exact method/path survivors to compatible IDs. Suppress only the two collection reference DELETEs; retain published item-reference nouns and unaffected methods. Record canonical Legacy evidence and source-set regression coverage.

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

Full queued Kiota 1.36.1 and wrapper Release generation with Authentication 2.38.1 succeeds with 16 compiled exports. All generated client/cmdlet sources, projects, and locks are identical after Git newline normalization; preserve the required separate profile boundary without fabricated source edits.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Full queued Kiota 1.36.1 and wrapper Release generation with Authentication 2.38.1 succeeds with 117 compiled exports. Combined client/cmdlet/project/lock regeneration removes exactly two collection-reference DELETE cmdlets; all other generated outputs are unchanged. Verify 11 neighboring routes, both published item-delete nouns, and both suppressed route absences in compiled exports.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Refresh current compatible IDs and spec evidence after the normal powershell-v3 merge. Prove literal selector equality with the complete original legacy survivor set: zero in v1.0, two exact beta collection deletes, no removals. Use supported literal mapping schema and preserve corrected suppressions, item nouns, and neighbors.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Run the full queued Kiota 1.36.1 cap1 and wrapper Release pipeline against current compatible spec 45b8333 with official Authentication 2.38.1. Compiled module exports 16 cmdlets and preserves all three reviewed neighbor routes. Combined profile regeneration updates only the client lock description hash; all generated sources/projects and wrapper lock remain unchanged after Git newline normalization.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Run the full queued Kiota 1.36.1 cap1 and wrapper Release pipeline against compatible spec fb1efe2 with official Authentication 2.38.1. Preserve all 117 compiled exports, exactly two collection-delete suppressions, eleven reviewed neighbors, and both published item-reference delete nouns. Commit combined current client/cmdlet/project/lock regeneration, including schema-model updates from the current target spec; unchanged outputs are not fabricated.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@ramsessanchez
Ramses Sanchez-Hernandez (ramsessanchez) marked this pull request as ready for review October 27, 2026 19:06
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use GeneratorConfig only for run settings and pass apiVersion separately to naming, suppression, and generation-service callers. Exercise both profiles with derived data enabled and disabled, the complete literal/legacy source set, exact collection DELETE suppression, item nouns, and generated neighbor routes against actual module specs.

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

Full queued Kiota 1.36.1 cap1 and wrapper Release pipeline on merged #3849 target 08e409a succeeds with Authentication 2.38.1: exit 0, OK, 16 compiled exports, all three reviewed neighbor routes verified. Combined client/cmdlet/project/lock regeneration is byte-identical after Git newline normalization; preserve the required separate profile generation boundary without fabricated source changes.

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

Full queued Kiota 1.36.1 cap1 and wrapper Release pipeline on merged #3849 target 08e409a succeeds with Authentication 2.38.1: exit 0, OK, 117 compiled exports. Fresh compiled checks verify eleven neighbors, both collection DELETE absences, both published item nouns, and WhatIf/Confirm safety. Combined client/cmdlet/project/lock regeneration is byte-identical after Git newline normalization; preserve the required separate profile generation boundary without fabricated changes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@ramsessanchez
Ramses Sanchez-Hernandez (ramsessanchez) marked this pull request as ready for review October 30, 2026 01:30
…idation

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

Verify actual service generation for both profiles with derived data on/off emits the explicit current profile into GetRequestAdapter and never the bare default-root call. Preserve complete literal/legacy selector equality, exact collection DELETE suppressions, published item nouns and neighbors. Combined103tests/TRX and ordinary strict gate pass on normally merged844672 Authentication2.41.2.

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

Full queued Kiota1.36.1/cap1 plus wrapper Release pipeline on normal844672 succeeds with16exports and accepted packaged Authentication2.41.2. Combined profile regeneration emits explicit v1.0 adapter roots and updated project pruning so Authentication owns the entire Kiota closure; unchanged client and locks are included in the full run, not fabricated deltas.

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

Full queued Kiota1.36.1/cap1 plus wrapper Release pipeline on normal844672 succeeds with117exports and accepted packaged Authentication2.41.2. Combined profile regeneration emits explicit beta adapter roots and updated project pruning so Authentication owns the entire Kiota closure; retain exact two collection DELETE suppressions, published item nouns and eleven neighbors. Real authenticated factory probes preserve beta service roots and typed/safety semantics; unmerged3886 generic PATCH refetch-header loss is documented, not hidden or overlaid.

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

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Pin the normally merged single-operation PATCH contract in both module profiles/data modes: one PATCH call, no GET/readback flag, native typed result only, one early ShouldProcess and own headers. Audit actual required queries: zero surviving required-query routes; beta @id belongs solely to the two original suppressed collection DELETEs, so do not revive them. Combined175targetedTRX and ordinarystrict pass; priorrefetch proofs remain historical.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Full queued Kiota1.36.1cap1 plus wrapper Release generation on normal6475 succeeds with16exports, followed by nonincremental Release assurance and real factory transport: PATCH204one/noobject/NOGET evenGET403, PATCH200one/actualtypedmodel and independent explicitGET. Combined client/cmdlet/project/lock regeneration removes old readback branches and includes current generated GET metadata changes; unchanged client/projects/locks are not fabricated deltas.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Full queued Kiota1.36.1cap1 plus wrapper Release generation on normal6475 succeeds with117exports, followed by nonincremental Release assurance. Combined client/cmdlet/project/lock regeneration removes all six hidden PATCH GET branches and retains current GET input metadata, exact two original collection DELETE suppressions and independent published item nouns. Guarded realAuthfactory beta probe verifies onePATCH/noobject204 with GET403, onePATCH/typed200, independent explicitGET and typed reference/action/safety/lifecycle behavior; clients/projects/locks unchanged where identical.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@ramsessanchez
Ramses Sanchez-Hernandez (ramsessanchez) marked this pull request as ready for review November 13, 2026 00:07

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.

1 participant