Skip to content

Migrate Reports shared directives to v3 configuration - #3870

Merged
Ramses Sanchez-Hernandez (ramsessanchez) merged 17 commits into
powershell-v3from
ramsessanchez-reports-v3-migration
Nov 13, 2026
Merged

Ramses Sanchez-Hernandez (ramsessanchez) merged 17 commits into
powershell-v3from
ramsessanchez-reports-v3-migration

Conversation

@ramsessanchez

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

Copy link
Copy Markdown
Contributor

No associated issue.

Changes proposed in this pull request

  • Migrate only the shared src\Reports\Reports.md directives: five curated configuration groups, two structurally satisfied renames, one reviewed absence, and one deferred Period completer. AutoRest directives remain active. Global src\readme.graph.md and both profile-local readmes are ignored; aliases/transforms/schema behavior remains deferred. Both compatible profiles are supported with no exclusions. DeviceManagement.Actions stays retired/unmapped; distinct Reports-owned actions remain. No new aliases, models/schema capabilities, paging policy, collection names, operation groups, or unrelated renames.
  • Preserve the full original selection: v1.0 34 survivors; original beta 84 = 66 survivors + 18 removed; current beta 83 = 66 survivors + 17 explicitly reviewed additional resource mutations. The unchanged historical source-review fixture proves original same-profile IDs and removals. The finite current literal ledger has no legacy-translation fields. Enrollment overloads remain separate. Reports contributes no authored groups or composite PATCH routes.
  • Final revalidation after merged Remove automatic GET after successful PATCH #3886 and Support mandatory Query-prefixed parameters for required queries #3882: normal target 6475f3f5beb4908d39ea356db32bf1e0fd3273cb, merged via 4ccdc02de50703718f8ed1083c26e5974e5227e9; Reports-only source/test correction cc3d297130431f96bc4ac3d45b64b79f67a226d1. Separate combined full-generation commits: v1.0 f63614cb4298ce6727f2dae8874a5d10dacdef9b; beta/final head cc375ba07a8fd7f1218ac6c46f09e51e87c1259e. Prior head df3412aab59fa14c04b797d9903d192f40220221 and all original migration/generation/merge boundaries remain intact. No rebase, amend, force push, duplicate PR, shared generator edit, or Fix Kiota PostPath typed navigation without renaming operation types #3881/[v3 wrappers] Support arbitrary optional query parameters #3897 overlay.

The 17 additional beta mutations remain exact, not successor guesses: three each for auditActivityTypes, signInEventsAppSummary and signInEventsSummary; two each for azureADPremiumLicenseInsight, correlations, identityAnalytics and microsoftAppsFileStorageContainerUsageSummary. Their GETs/nonmatching descendants remain available. No broad prefix suppression.

Current behavior and scope

Generated UPDATE commands now execute only PATCH. 204 means success, no output, exactly one PATCH and no GET; 200 returns the actual typed model in one PATCH. The caller independently invokes GET if desired, with its own inputs, headers, response and permissions. No PassThru/ReadBack/Refetch switch. The old implicit-GET header-loss failure is superseded by this user-directed one-operation contract, not relabeled as passing historical proof.

Owned tests verify both actual Reports specs contain zero required native query parameters. Mandatory Query<Name> contracts are therefore not applicable to Reports; no API/parameters were invented. The shared required-query regression family is included in the targeted run. Existing optional select/filter/top query names/aliases and function arguments remain intact. Singleton and item PATCH retain native typed bodies, path IDs, headers, output metadata and ShouldProcess.

Fresh full generation, normal Authentication and compiled proof

The unchanged four-mutex queue ran v1.0 then beta, full Kiota/client/cmdlet/project/manifest generation and Release compilation, with no SkipKiota/GenerateOnly/NoCollisionData/fallback/NO-CMDLETS acceptance. Each full run was followed by an explicit dotnet build <profile-project> -c Release --no-incremental --no-restore --nologo -v minimal (exit0) before compiled acceptance.

Profile Full result Build / queue-inclusive seconds Compiled exports/routes Suppressed absent Migrated functions / mandatory function inputs / neighbors
v1.0 exit0 / OK 113.4 / 1153.38 217 / 217 34 6 / 5 / 9
beta exit0 / OK 268.6 / 1553.80 520 / 520 83 10 / 14 / 20

Both normally generated manifests require adapted Authentication 2.41.2, no RequiredAssemblies preloads; bins contain only the module/client/runtime DLLs. Authentication owns all Kiota/RMS/UriTemplate/Multipart dependencies. The exact first process-local PSModulePath root is:

C:\Users\ramsess\.copilot\session-state\4aa86cf9-d43c-4d2b-a4a3-aeaed01b8f29\files\authentication-v2-sync\final-source\modules

All 64 adapted package file hashes and physical Authentication nupkg SHA256 2FC09BFE6B70D313BC56DF8ADCCFB1976FB4E90A1898BF8A916B4B8B792898EB are verified. This normal source-equivalent adapted package is not Gallery2.41.2 or old2.38. Normal Auth/runtime/template/builder code is unchanged by the target integration. Isolated Kiota is 1.36.1+fd3bf87790149b87f40f7eae1a5feb9016625943, process-local cap1; existing module paths follow the required first root. No global installation/environment edits, shims, package alterations or dependency injection.

Fresh normal-manifest imports verify exact route/export counts, migrated names, suppression absence, neighbors, mandatory function arguments, unchanged registration List/Get parameter sets/defaultList/itemID, no invented required-query inputs, and single packaged Auth/Kiota identities/load contexts.

Exact commands and current outcomes

All retained scripts/logs are in this new final evidence root, separate from old 08e409/844672 proof:

$e = 'C:\Users\ramsess\.copilot\session-state\7080d936-bbd6-4c6b-9ea6-cf6a3c82d434\files\post3886-6475-final'
pwsh -NoProfile -NonInteractive -File (Join-Path $e 'Invoke-ReportsFullBuild.ps1') -RepoRoot (Get-Location).Path -Profile v1.0
pwsh -NoProfile -NonInteractive -File (Join-Path $e 'Invoke-ReportsFullBuild.ps1') -RepoRoot (Get-Location).Path -Profile beta
pwsh -NoProfile -NonInteractive -File (Join-Path $e 'Invoke-ReportsBetaCompiled.ps1') -RepoRoot (Get-Location).Path
$m = 'C:\Users\ramsess\.copilot\session-state\7080d936-bbd6-4c6b-9ea6-cf6a3c82d434\files\post3886-6475-memory-final'
pwsh -NoProfile -NonInteractive -File (Join-Path $m 'Invoke-GuardedReportsRuntime.ps1') -RepoRoot (Get-Location).Path -Profile v1.0
pwsh -NoProfile -NonInteractive -File (Join-Path $m 'Invoke-GuardedReportsRuntime.ps1') -RepoRoot (Get-Location).Path -Profile beta

Full, compiled and guarded runtime commands exit0. Full helper invokes unchanged parent Invoke-QueuedModuleBuild.ps1 -RepoRoot <this-worktree> -Module Reports -ApiVersion <profile> -Configuration Release, then the explicit clean build above. Retained v1.0 compiled manifest gates were executed by Invoke-ReportsAcceptance.ps1 -RepoRoot (Get-Location).Path -Profile v1.0; its original unguarded runtime evidence is preserved, not certified as isolated. Beta's helper runs only compiled gates and raw parity. Each helper records exact fresh child commands/arguments/exits. Raw parity's known exit1 is not hidden or claimed to pass.

dotnet build .\tools\WrapperGenerator.Tests\WrapperGenerator.Tests.csproj --no-restore --no-incremental --nologo -v minimal
dotnet test .\tools\WrapperGenerator.Tests\WrapperGenerator.Tests.csproj --no-build --no-restore --filter 'FullyQualifiedName~ReportsDirectiveMigrationTests|FullyQualifiedName~CmdletConfiguratorTests|FullyQualifiedName~NamingTests|FullyQualifiedName~DerivedCollisionResolutionsTests|FullyQualifiedName~ActionFunctionTests|FullyQualifiedName~GenerationServiceRegressionTests|FullyQualifiedName~RequiredQueryTests|FullyQualifiedName~PatchOperationTests|FullyQualifiedName~MultiRouteTests' --logger 'trx;LogFileName=targeted.trx' --results-directory $e --verbosity minimal --nologo
pwsh -NoProfile -NonInteractive -File .\tools\Get-WrapperDirectiveMigrationInventory.ps1 -Module Reports -FailOnUnresolved -OutputPath (Join-Path $e 'strict-inventory.json')
git diff --check origin/powershell-v3 HEAD

Build/test/strict/whitespace exit0. TRX scalars: 313 total, 313 executed/passed, 0 failed/not-executed. Strict: 9 rows, 8 Mapped, 1 Deferred, 0 unresolved/invalid/unreviewed. The formerly stale shared MultiRoute equality test is now covered by the normally merged fix and passes; no old failure was overwritten.

Real factory HTTP acceptance

Fresh compiled proof uses Test-ReportsBuiltProfile.ps1; current runtime proof is only the corrected post3886-6475-memory-final\Test-ReportsOfflineTransport.ps1, Global and USGov. Actual generated binaries use real Connect-MgGraph, the existing in-memory MockDataStore, GraphHttpClientFactory's token/retry/redirect pipeline and an offline terminal handler, not a fake request adapter.

Runtime isolation correction: normal Authentication import in the second confirmation runspace can reset the shared datastore. The corrected probe imports that runspace before Connect, then reapplies the existing Set-MgTestDataStore. It reflects the actual shared GraphSession.DataStore.GetType().FullName before Connect, request-context/reconnect/disconnect and logout, and inside every HTTP capture, requiring Microsoft.Graph.Authentication.Test.Mocks.MockDataStore. Captures retain DataStoreType; JSON retains stage-specific DataStoreChecks and ActualFinalDataStoreType. No production/Auth/package changes were made. Original unguarded v1.0 runtime logs remain unchanged; only affected offline gates were rerun, not full builds/TRX/source/generation. Beta's first runtime acceptance uses the corrected guard. No credential I/O is inferred merely from the old type-reset setup defect.

All four combinations pass: v1.0 23 requests/cloud; beta 27 requests/cloud; six genuine declined confirmations/cloud, each declined invocation and WhatIf send zero HTTP. Actual reflected MockDataStore guards number 26 per v1.0 cloud / 30 per beta cloud, with the required type additionally asserted in every one of the 100 captured requests. Invalid typed bool binding fails before HTTP. Native required query binder checks are N/A because neither real Reports spec has one; shared unit tests cover that framework contract.

Positive PATCH checks cover retained item registration and singleton admin/reportSettings: PATCH204 succeeds with one PATCH and zero output while GET is configured403; PATCH200 returns the actual typed model with exactly one PATCH. Separate caller GET proves its own select/header/result and independent403 error. No grouped/composite PATCH is invented. Existing typed POST JSON/results, bodyless DELETE, POST report download and typed no-content sign-in action remain covered.

Also verify every migrated function's real typed Report.Content or beta sign-in summary result and exact URL; default/item dispatch, escaped path IDs, select/filter/top, integer count, download bytes/OutFile; cached adapter/client identity, request-context/reconnect invalidation, new synthetic token, and disconnect error before HTTP. Generated beta/USGov URLs retain the selected service root while the factory default shared https://graph.microsoft.com/v1.0/ BaseAddress stays unchanged. No live Graph/OAuth/credential-store calls.

Remaining baseline limits, not passing parity claims

Raw compiled parity still exits 1: v1.0 116 matched / 80 mismatch / 21 no-oracle; beta 422 mismatch / 98 no-oracle. Mg/MgBeta, frozen oracle omissions and other pre-existing naming limits remain unnormalized; no unrelated naming sweep or suppression. Existing Microsoft.OpenApi.YamlReader3.7.0 NU1903 warning remains out of module scope. Optional query policy is unchanged (#3897 tracking only); #3881 is not overlaid. Offline semantics are not tenant/API validity certification.

Compatible Reports Git blobs remain v1.0 1f907bf7691c3a13779b7ea6786e3764cb61d5a1 and beta 169859b86fc51330fd53c8a948dfa8ef595f36fd. All client/spec/project/lock outcomes are recorded honestly; unchanged generated files are not manufactured into deltas. Only module-owned source/tests/generated outputs are committed; no binaries/bin/obj/logs/artifacts.

Current canonical $m\handoff.json retains scalar tests/strict/profiles, exact commands/exits/commits, actual datastore guards and real HTTP captures, Auth64/physical package, source/spec/tool/queue and normal assembly/manifest hashes, full uncapped Git scope and per-artifact absolute paths/SHA256s. Unchanged build evidence stays under $e: full-v1.0.log, full-beta.log, targeted.trx/targeted-tests.log, compiled-<profile>-<cloud>.json. Corrected runtime evidence stays under $m: transport-<profile>-<cloud>.json and corresponding .log, plus runtime-<profile>-commands.json. Old proofs remain unchanged and explicitly historical; no older unguarded record is relabeled as memory-guarded success.

Other links

Record exact legacy-to-compatible operation evidence, retain distinct function overloads, and pin shared suppressions and neighboring routes for both profiles.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Run full queued Release generation with Kiota 1.36.1 against the compatible v1.0 spec. Build and import 217 exported cmdlets; verify all 34 shared suppressions, six affected functions, and nine neighbors. Client/project sources are byte-identical apart from the refreshed Kiota lock; retain the combined profile boundary.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Run full queued Release generation with Kiota 1.36.1 against the compatible beta spec. Import 530 exported cmdlets and verify all 66 shared suppressions, ten affected functions, and sixteen neighbors. Refresh the pruned client and cmdlets together, preserve committed Beta directory casing, and retain unchanged generated project sources.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Validate all current literal candidates while retaining the complete original 84-operation beta source proof: 66 survivors, 18 removals, and 17 separately justified additional resource mutations. Use the existing inventory schema without unmerged helper APIs; pin shared behavior and unaffected reads in both profiles.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Run the full queued Release pipeline on target abab9da with Kiota 1.36.1 and Authentication 2.38.1. Import 217 exports; verify 34 suppressed routes, six migrated function names, and nine unchanged neighbors. All client/cmdlet/project sources are byte-identical; only the full regeneration lock hash changes, preserving the combined profile boundary.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Run full queued Release generation with Kiota 1.36.1 cap 1 and Authentication 2.38.1 against target abab9da. Import 520 exports and verify 83 exact shared suppressions, ten migrated functions and twenty unaffected neighbors. Include freshly regenerated client, cmdlets and locks together; preserve Beta casing and normalize two generator-emitted trailing spaces.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep runtime oracle profiles explicit for naming, suppression, and generation. Preserve original source-selection lineage in a test fixture rather than reserved translation fields in the literal mapping ledger.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Recheck unchanged source selection on the normally merged Authentication target and assert the emitted service profile for every owned function with oracle data on and off.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Full queued Kiota and cmdlet/client/project generation on 844672d, Release 217 exports. Generated calls select v1.0 and projects prune the complete Authentication-owned dependency closure; normal manifests require Authentication 2.41.2 without preloads. Global and USGov offline real factory routing, migrated functions, typed neighboring mutations and safety passed with the existing generic refetch-header limitation retained.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Full queued Kiota and cmdlet/client/project generation on 844672d, Release 520 exports. Generated calls select beta, normal manifests require Authentication 2.41.2, and projects prune the complete shared dependency closure. Global and USGov real factory tests preserve beta roots, actual typed Report/summary results, downloads, nested mutations and safety; known 204 refetch-header limitation remains explicit.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Revalidate unchanged directive source evidence on merged 6475f3f. Assert no native required queries in either actual Reports spec and retain registration PATCH body, headers, profile and safety without implicit GET or invented switches.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Run full queued Kiota/cmdlet/client/project/manifest generation on 6475f3f and an additional no-incremental Release rebuild, exporting 217 cmdlets. Global and USGov factory gates verify one PATCH/no-output on204 with GET forbidden, typed200 responses, independent caller GET and existing routing, bodies, queries, safety and session lifecycle.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Full queued Kiota/cmdlet/client/project/manifest generation on 6475f3f and an additional no-incremental Release rebuild export520cmdlets. Guarded Global/USGov real factory proof verifies actual post-import MockDataStore, one-PATCH204 no output/no GET, typed200model and independent callerGET, native existing queries/bodies/safety/lifecycle. Preserve byte-identical client/locks after trimming two generator-emitted trailing spaces.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@ramsessanchez
Ramses Sanchez-Hernandez (ramsessanchez) merged commit d2ad97a into powershell-v3 Nov 13, 2026
6 checks passed
@ramsessanchez
Ramses Sanchez-Hernandez (ramsessanchez) deleted the ramsessanchez-reports-v3-migration branch November 13, 2026 01:08
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