Skip to content

Migrate shared Devices.ServiceAnnouncement directives to v3 wrappers - #3866

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

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

Conversation

@ramsessanchez

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

Copy link
Copy Markdown
Contributor

N/A - no linked issue.

Changes proposed in this pull request

  • Migrate only the two shared Devices.ServiceAnnouncement.md cmdlet directives: suppress 22 v1.0 and 31 beta operations, and remove Admin from the 25 surviving service-announcement operation nouns in each profile. Preserve authoritative v1.0 derived names and verbs without redundant per-operation renames. Tests compare the complete original same-profile openApiDocs selector with the compatible specs, including all nine beta final microsoft.graph. action/function qualifier translations with matching parents, methods and both-side kind metadata. Both reviewed finite literal mappings pass ordinary strict inventory; no retired Legacy helper/schema fields or API-absence assertion are used. The normally merged Align operation IDs for required shared directive paths #3847 ID alignment does not change this module's compatible specifications.
  • Normally integrate published Authentication Sync current v2 Authentication into powershell-v3 #3891 at 844672d7c2238f6b29a208f9ba73fe28e9e29cef, preserving every prior migration, API-correction and profile-generation commit. Fully regenerate v1.0 THEN beta on the actual merged target. Generated worker calls now pass their explicit profile to GetRequestAdapter; regenerated projects prune every shared dependency. Normal manifests require adapted Authentication 2.41.2 with no dependency preloads, and wrapper bins contain only their own three DLLs. Authored configuration and GeneratorConfig remain profile-independent; the existing separate oracle/runtime profile context is preserved.
  • Both required full compatible generations, Release builds and normal-manifest offline runtime gates pass. Each profile still exports 30 cmdlets covering exactly 25 surviving routes plus five dispatchers. Keep original shared directives active and annotated; ALL profile-local readmes and src/readme.graph.md remain ignored and untouched. Parameter aliases/transforms and schema/response changes remain deferred; neither class occurs in this shared module file. No global framework fix, unsupported policy activation, unrelated naming change, shim, dependency overlay or copied Authentication/Kiota DLL is included.

Current post-#3891 result: previous RMS runtime blocker resolved

Both profiles now execute all six real compiled POST actions successfully through the adapted Authentication package's real GraphHttpClientFactory authentication pipeline and a test-only terminal HTTP handler. Each POST verifies exact method/URI, application/json messageIds body (including escaping-sensitive string values), generic headers, bearer-handler participation and the declared typed boolean result. All 19 GET workers and ten public dispatcher list/item calls also pass, including typed results, escaped path IDs, default list binding and retained neighboring content/archive/report/count operations.

The complete gate passes independently in Global and USGov for v1.0 and beta. Actual roots are https://graph.microsoft.com/v1.0, https://graph.microsoft.com/beta, https://graph.microsoft.us/v1.0 and https://graph.microsoft.us/beta. The factory's original https://graph.microsoft.com/v1.0/ HttpClient BaseAddress and shared client identity remain unchanged; beta is not accidentally sent to v1.0. Each run verifies six WhatIf calls with zero HTTP, six genuine No confirmations with exactly one prompt each and zero HTTP, 30 rejected unknown-selector bindings, and five rejected incompatible list/item parameter-set bindings before HTTP. Each run makes 35 terminal-handler requests; no live Graph/OAuth requests or credential-store access occur. Test datastore is the repository's existing in-memory MockDataStore.

Loaded Authentication/Kiota/RMS/UriTemplate/Multipart assemblies have one identity each, the correct packaged source and expected load contexts (Authentication/Loader in Default, shared dependency closure in Microsoft.Graph.Authentication). Normal wrapper bin ownership is exactly three DLLs, with no dependency preloads. The earlier Authentication 2.38.1 missing Microsoft.IO.RecyclableMemoryStream failure is historical evidence, not a current blocker. No manual DLL injection or old #3878 retention/preload workaround was used; unmerged #3881/#3882/#3886 changes were not overlaid.

Current target, tooling, hashes and additive history

Current normal base: powershell-v3 at 844672d7c2238f6b29a208f9ba73fe28e9e29cef. Normal merge: 755d93d08c6a0d50ee8bb025571b3b37ccb73fe0. Separate current combined profile-generation commits: v1.0 356f8d6b3a59fb1cdd6811756e231015a436989c; beta/current PR head 5ed09762018a45d2f0073535b42e0de773f76bab. Both were full Kiota/client/cmdlet/project/manifest runs: clients and lock files are unchanged; each profile's actual committed delta is 25 explicit-profile worker calls plus the generated project dependency-ownership correction (26 files). Manifests/binaries are regenerated and hashed as uncommitted validation outputs. Existing module source/tests need no additional correction.

Original migration 004fe9c40d, original v1.0/beta generation 61acd7d2aa / b840d8ae48, earlier integration 8f6ee2a73c, ledger/source correction 04857b0df6, generation eaa3d54beb / 132fe6469c, #3849 merge afb90a263e and explicit-profile API correction 1f63f474c0 remain intact. No rebase, amend, squash, force push, new PR or PR merge was performed. The existing non-draft state was unchanged. No binaries, bin/obj or session evidence are committed.

Compatible spec blobs remain v1.0 66bc6a0aaa679f286420bef098c24b3237713163 and beta ccb85afb6e58981eace70039d057557b427cf45a. Current source/spec SHA256s and generated source Git blobs/SHA256s are recorded in the evidence directory. Shipping Authentication/Core/Loader/runtime/emitter/templates/builder source is byte-identical to the verified #3891 production producer 7ce0b474; final #3891's later Xml update is test-only.

Tooling: isolated Kiota 1.36.1+fd3bf87790149b87f40f7eae1a5feb9016625943, .NET SDK 10.0.403, PowerShell 7/Core, process-local Kiota parallelism 1. The normal locally built adapted Authentication 2.41.2 package from actual merged production source is used, not stock gallery 2.41.2 or old 2.38.1. Exact 64-file package hash manifest was verified before and after acceptance. Authentication nupkg SHA256 is 2FC09BFE6B70D313BC56DF8ADCCFB1976FB4E90A1898BF8A916B4B8B792898EB; actual imported module root is C:\Users\ramsess\.copilot\session-state\4aa86cf9-d43c-4d2b-a4a3-aeaed01b8f29\files\authentication-v2-sync\final-source\modules\Microsoft.Graph.Authentication\2.41.2.

Exact current commands and results

All commands are run from this PR checkout. $evidence is the NEW current-target evidence folder; it does not replace old evidence. Process-local environment is set in the SAME invocation as each queued build:

$evidence = 'C:\Users\ramsess\.copilot\session-state\fc5ca4bc-3f4f-41c0-8746-372f984c06f7\files\post3891-844672'
$env:PATH = 'C:\Users\ramsess\.copilot\session-state\871a5292-dc5b-423e-8083-5165b0006603\files\tools\kiota;' + $env:PATH
$env:KIOTA_Generation__MaxDegreeOfParallelism = '1'
$env:PSModulePath = 'C:\Users\ramsess\.copilot\session-state\4aa86cf9-d43c-4d2b-a4a3-aeaed01b8f29\files\authentication-v2-sync\final-source\modules;C:\Users\ramsess\OneDrive - Microsoft\Documents\PowerShell\Modules;C:\Program Files\PowerShell\Modules;C:\Program Files\PowerShell\7\Modules'
& pwsh -NoProfile -NonInteractive -File 'C:\Users\ramsess\.copilot\session-state\871a5292-dc5b-423e-8083-5165b0006603\files\Invoke-QueuedModuleBuild.ps1' -RepoRoot $PWD.Path -Module Devices.ServiceAnnouncement -ApiVersion v1.0 -Configuration Release
& pwsh -NoProfile -NonInteractive -File 'C:\Users\ramsess\.copilot\session-state\871a5292-dc5b-423e-8083-5165b0006603\files\Invoke-QueuedModuleBuild.ps1' -RepoRoot $PWD.Path -Module Devices.ServiceAnnouncement -ApiVersion beta -Configuration Release

Results: v1.0 passed, exit 0 / OK, 69.40 seconds builder module time, 30 fresh compiled exports; beta passed, exit 0 / OK, 76.20 seconds, 30 exports. Profiles ran sequentially through the unchanged four-kernel-mutex queue, consuming openApiDocs_KiotaCompat. No SkipKiota, GenerateOnly, NoCollisionData, fallback spec or NO-CMDLETS result substitutes for the full gate. Wrapper nupkgs were not separately packed; acceptance uses the unchanged normal builder's fresh manifests/bins and the verified normally packaged Authentication module.

dotnet test .\tools\WrapperGenerator.Tests\WrapperGenerator.Tests.csproj --no-restore --filter 'FullyQualifiedName~DevicesServiceAnnouncementDirectiveTests|FullyQualifiedName~CmdletConfiguratorTests|FullyQualifiedName~WrapperGenerator.Tests.NamingTests' --verbosity minimal --logger 'trx;LogFileName=final-targeted.trx' --results-directory $evidence
& .\tools\Get-WrapperDirectiveMigrationInventory.ps1 -Module Devices.ServiceAnnouncement -FailOnUnresolved -OutputPath (Join-Path $evidence 'final-inventory.json')

Results: 96 tests passed, 0 failed/skipped, verified nonzero final-head TRX counters. Includes complete original/current selector equivalence, shared suppression/rename scope, all compatible operations with derived data on/off, explicit separate profiles, derived-name precedence and unaffected neighboring routes/methods. Strict inventory passed, both groups Mapped, suppression 22/31 and rename 25/25. No stability-sensitive inventory framework test ran concurrently with commits.

& pwsh -NoProfile -NonInteractive -File (Join-Path $evidence 'Test-ServiceAnnouncement.ps1') -RepoRoot $PWD.Path -ApiVersion v1.0 -Environment Global
& pwsh -NoProfile -NonInteractive -File (Join-Path $evidence 'Test-ServiceAnnouncement.ps1') -RepoRoot $PWD.Path -ApiVersion v1.0 -Environment USGov
& pwsh -NoProfile -NonInteractive -File (Join-Path $evidence 'Test-ServiceAnnouncement.ps1') -RepoRoot $PWD.Path -ApiVersion beta -Environment Global
& pwsh -NoProfile -NonInteractive -File (Join-Path $evidence 'Test-ServiceAnnouncement.ps1') -RepoRoot $PWD.Path -ApiVersion beta -Environment USGov

Results: all four passed, each exit 0. Each fresh-process normal-manifest import verifies 30 exports, exact 25 GraphRoute method/path survivors, five dispatcher defaults/list/item route pairs, all 22/31 suppressions absent and retained neighbors. Each additionally passes 19 typed GET calls, ten dispatcher invocations, six typed POST method/body/header/result calls, six WhatIf calls, six genuine No prompts and 35 rejected invalid bindings with zero HTTP. The 140 final-matrix requests are offline captures only. JSON evidence includes exact escaped URIs, request bodies/headers, typed results asserted by the gate, single assembly source/context/SHA256 evidence, and manifest/three-owned-binary hashes. The initial new probe's bin-list comparison fixture error was corrected; its failure logs are preserved separately and are not counted as passing runtime evidence.

& pwsh -NoProfile -NonInteractive -File .\tools\Compare-WrapperCmdletNames.ps1 -GeneratedPath .\src\Devices.ServiceAnnouncement\wrapper\v1.0\Cmdlets -OutLedger (Join-Path $evidence 'parity-v1.csv')
& pwsh -NoProfile -NonInteractive -File .\tools\Compare-WrapperCmdletNames.ps1 -GeneratedPath .\src\Devices.ServiceAnnouncement\wrapper\Beta\Cmdlets -OutLedger (Join-Path $evidence 'parity-beta.csv')

Results: v1.0 raw parity passed, exit 0, 30/30 command-route rows. Beta raw parity remains non-green, exit 1, 0/30: 22 rows differ only by the existing missing Beta prefix and eight also retain existing action/incidentReport verb/word-order differences. The five dispatcher rows are counted alongside 25 operations. No prefix normalization is presented as raw success; profile-local naming remains out of scope. The regeneration changes transport context and project ownership, not these command names. Existing NU1903 warnings for Microsoft.OpenApi.YamlReader 3.7.0 remain unrelated. Full-repository tests, live Graph/OAuth and PowerShell 5.1 validation were not run.

Preserved evidence and historical distinction

NEW current evidence root: C:\Users\ramsess\.copilot\session-state\fc5ca4bc-3f4f-41c0-8746-372f984c06f7\files\post3891-844672\. Contains full-v1.log/.exit, full-beta.log/.exit, kiota-v1.log, kiota-beta.log, final-targeted.log/.trx/.exit, final-inventory.json, final-inventory-summary.json, runtime-v1-Global.log/.json/.exit, runtime-v1-USGov.log/.json/.exit, runtime-beta-Global.log/.json/.exit, runtime-beta-USGov.log/.json/.exit, Test-ServiceAnnouncement.ps1, auth-package-hashes.json, auth-package-sha256.json, auth-fresh-import.json, shipping-source-provenance.json, input-provenance.json, tool-versions.json, final-generated-source-hashes.json, final-proof-summary.json, parity-v1.csv/.log/.exit, parity-beta.csv/.log/.exit and prior-pr-body.txt.

Earlier post-#3849 evidence and actual RMS failure logs remain untouched under the parent session files folder (post3849-runtime-isolated-v1.log, post3849-runtime-isolated-beta.log, post3849-dependency-provenance.json and all original build/test/parity artifacts). That historical target's 29 read/dispatcher successes plus six WhatIf checks did not prove POST serialization; the new four-run typed mutation matrix does. Original owner checkout/history/artifacts are preserved.

Other links

Review both profiles against actual legacy operation IDs and compatible method/path counterparts. Preserve authoritative v1.0 derived names while covering beta suppressions and Admin prefix removal.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Run full queued Kiota 1.36.1 and wrapper Release generation against the compatible v1.0 spec. Client/cmdlet sources and projects are unchanged; only the actual Kiota tool version changes in the lock file. Compiled manifest exports 30 cmdlets.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Run full queued Kiota 1.36.1 and wrapper Release generation against the compatible beta spec. Preserve committed Beta casing, suppress reviewed write/root/adminUnits operations and remove Admin from surviving nouns. Compiled manifest exports 30 cmdlets; client/project sources are unchanged apart from lock evidence.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use current supported literal mappings after proving complete original legacy/current selector equality: 22 v1.0 and 31 beta suppressions. Keep both-side action/function proof for the nine final beta namespace translations in notes and regression tests; preserve all earlier migration and generation commits.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Run full queued Kiota 1.36.1 and wrapper Release pipeline against aligned/refreshed spec blob66bc6a0aaa679f286420bef098c24b3237713163. Compiled output exports30 cmdlets across25exact surviving routes and5dispatchers; v1.0 oracle parity25/25. Generated source and projects remain unchanged; only the actual client description hash changes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Run full queued Kiota 1.36.1 and wrapper Release pipeline against aligned/refreshed spec blobccb85afb6e58981eace70039d057557b427cf45a. Compiled output exports30 cmdlets across25exact surviving routes and5dispatchers, with all31selected suppressions absent. Generated source and projects remain unchanged; only the actual client description hash changes. Preserve existing Beta output casing and baseline naming limitations.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Pass explicit runtime profile context to naming and suppression calls and cover derived naming both enabled and disabled.

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

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Full compatible Kiota/client/cmdlet/project/manifest regeneration after #3891. Emit explicit v1.0 transport context and let Authentication own all shared dependencies. Normal-manifest offline authenticated Global/USGov probes pass all25 routes, five dispatchers and six typed actions with WhatIf and genuine declined confirmation.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Full compatible Kiota/client/cmdlet/project/manifest regeneration after #3891. Emit explicit beta transport context and keep only owned wrapper DLLs. Global/USGov real authenticated offline probes pass all25 routes, five dispatchers, six typed actions and genuine declined confirmation without changing shared HttpClient BaseAddress.

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

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