Skip to content

Migrate Reports shared directives to v3 configuration - #3870

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

Ramses Sanchez-Hernandez (ramsessanchez) wants to merge 13 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 src\Reports\Reports.md: five curated configuration groups, two structurally satisfied renames, one reviewed absence, and one deferred Period parameter completer. Keep AutoRest directives active. Ignore global src\readme.graph.md and both profile-local readmes; aliases/transforms/schema behavior remains deferred. Both v1.0 and beta are supported, with no profile exclusions. DeviceManagement.Actions remains retired/unmapped; distinct Reports-owned actions remain available. No new report aliases, schema/model capability, collection naming, grouping, or paging policy.
  • Preserve complete source selection: v1.0 34 surviving matches; original beta 84 = 66 survivors + 18 removed; current beta 83 = 66 survivors + 17 additional, explicitly reviewed resource CRUD matches. The literal current ledger has no reserved legacy-translation fields. Unchanged original same-profile source identities, removal evidence, and prior/current IDs remain in tools\WrapperGenerator.Tests\ReportsDirectiveSourceReview.json. Enrollment overloads stay separate; Reports contributes zero GroupVariants entries. Neighboring GETs/nested mutations and action ownership stay intact.
  • Revalidate the same PR after normally merged Authentication Sync current v2 Authentication into powershell-v3 #3891. Target 844672d7c2238f6b29a208f9ba73fe28e9e29cef, normal merge 0357ab477406c2112b20ec9a6022eb46f7f0c64d, Reports-only evidence/profile-test correction e45edd0be84cdac9157703769fe16727970caa38, full combined v1.0 generation b0e7506e0576c691a81fb52d085ea22f874c97be, then beta generation/final head df3412aab59fa14c04b797d9903d192f40220221. Keep every prior migration/generation/merge commit, including the post-Support compatible natural-ID operation variants #3849 f3098287a9 correction. No rebase, amend, force-push, new PR, shared-generator edits, or unmerged Fix Kiota PostPath typed navigation without renaming operation types #3881/Support mandatory Query-prefixed parameters for required queries #3882/Preserve generic headers on PATCH refetch requests #3886 overlay.

Additional beta policy remains finite and exact:

Family Selected resource mutations Count
/auditLogs/auditActivityTypes collection POST; item PATCH/DELETE 3
/auditLogs/signInEventsAppSummary collection POST; item PATCH/DELETE 3
/auditLogs/signInEventsSummary collection POST; item PATCH/DELETE 3
/reports/azureADPremiumLicenseInsight PATCH/DELETE 2
/reports/correlations/{identityCorrelation-id} PATCH/DELETE 2
/reports/identityAnalytics PATCH/DELETE 2
/reports/microsoftAppsFileStorageContainerUsageSummary PATCH/DELETE 2

These are newer audit/sign-in aggregate, license, correlation, analytics, and SharePoint Embedded storage resources, not successors to removed credential-detail or print-summary routes. GETs and nonmatching descendants remain; no broad prefix/subtree suppression. Revised merged #3847 does not change either published Reports compatible spec.

New 844672-target generation and Authentication evidence

Fresh full Kiota + cmdlet + client/project/manifest generation and Release builds ran sequentially, v1.0 then beta, through the unchanged shared four-mutex queue. No SkipKiota, GenerateOnly, NoCollisionData, legacy fallback, or NO-CMDLETS acceptance. Kiota is isolated 1.36.1+fd3bf87790149b87f40f7eae1a5feb9016625943, process-local parallelism 1. Both slots released.

Generated cmdlets now use GetRequestAdapter("v1.0") / GetRequestAdapter("beta"); the separate runtime profile is not an authored configuration filter or new GeneratorConfig setting. Projects prune the full Authentication-owned dependency closure. Normal manifests require Authentication 2.41.2, without RequiredAssemblies preloads. Each compiled bin contains exactly the three owned Reports/client/runtime DLLs, no Authentication/Kiota/RMS/UriTemplate/Multipart copies. v1.0 generation changes 207 files; beta changes 472. Client content and locks remain identical after full Kiota regeneration; beta's two generator-emitted trailing spaces were removed for git diff --check. No artificial generation delta or bin/obj/binary/session artifacts are committed.

Acceptance imports the normally packaged, source-equivalent adapted Authentication2.41.2, not stock gallery2.41.2 or old2.38, from:

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

This is the first process-local PSModulePath root, followed by the existing Documents/Program Files/PS7 module roots. The isolated Kiota directory is prepended only process-locally to PATH. All 64 Authentication file hashes were checked, and its nupkg SHA256 is 2FC09BFE6B70D313BC56DF8ADCCFB1976FB4E90A1898BF8A916B4B8B792898EB. Merged shipping Authentication/runtime/emitter/template/builder source equals packaged producer 7ce0b4746e2aa85b3da89fe1f2a4db8011e83716; the later Authentication.Test Xml update is not shipping-source divergence. No package edits, assembly injection, global environment changes, shims, live OAuth/Graph, or credential-store access.

Exact current commands/results

Evidence root E below is C:\Users\ramsess\.copilot\session-state\7080d936-bbd6-4c6b-9ea6-cf6a3c82d434\files\reports-844672-revalidation. The retained scripts contain exact process-local tool/module environment and underlying commands.

pwsh -NoProfile -NonInteractive -File C:\Users\ramsess\.copilot\session-state\7080d936-bbd6-4c6b-9ea6-cf6a3c82d434\files\reports-844672-revalidation\Invoke-ReportsFullBuild.ps1 -RepoRoot (Get-Location).Path -Profile v1.0
pwsh -NoProfile -NonInteractive -File C:\Users\ramsess\.copilot\session-state\7080d936-bbd6-4c6b-9ea6-cf6a3c82d434\files\reports-844672-revalidation\Invoke-ReportsFullBuild.ps1 -RepoRoot (Get-Location).Path -Profile beta

Each invokes unchanged C:\Users\ramsess\.copilot\session-state\871a5292-dc5b-423e-8083-5165b0006603\files\Invoke-QueuedModuleBuild.ps1 -RepoRoot <this-worktree> -Module Reports -ApiVersion <profile> -Configuration Release.

Profile Full build Build / total seconds Compiled exports/routes Suppressed absent Migrated functions / mandatory arguments / neighbors
v1.0 exit0, OK 29.5 / 32.09 217 / 217 34 6 / 5 / 9
beta exit0, OK 41.7 / 44.32 520 / 520 83 10 / 14 / 20
.\tools\Get-WrapperDirectiveMigrationInventory.ps1 -Module Reports -FailOnUnresolved -OutputPath C:\Users\ramsess\.copilot\session-state\7080d936-bbd6-4c6b-9ea6-cf6a3c82d434\files\reports-844672-revalidation\strict-inventory-final.json
dotnet test .\tools\WrapperGenerator.Tests\WrapperGenerator.Tests.csproj --no-restore --filter 'FullyQualifiedName~ReportsDirectiveMigrationTests|FullyQualifiedName~CmdletConfiguratorTests|FullyQualifiedName~NamingTests|FullyQualifiedName~DerivedCollisionResolutionsTests|FullyQualifiedName~ActionFunctionTests|FullyQualifiedName~GenerationServiceRegressionTests' --logger 'trx;LogFileName=reports-targeted-final.trx' --results-directory C:\Users\ramsess\.copilot\session-state\7080d936-bbd6-4c6b-9ea6-cf6a3c82d434\files\reports-844672-revalidation\tests --verbosity minimal --nologo
git diff --check origin/powershell-v3 HEAD

Passed: strict 8 Mapped / 1 Deferred / 0 invalid-unresolved-unreviewed; targeted 155 passed, 0 failed/skipped, real nonzero TRX counters; whitespace gate passed. Tests additionally assert profile-specific emitted calls for every migrated function with oracle data enabled/disabled in both profiles.

Fresh compiled commands:

$e = 'C:\Users\ramsess\.copilot\session-state\7080d936-bbd6-4c6b-9ea6-cf6a3c82d434\files\reports-844672-revalidation'
pwsh -NoProfile -NonInteractive -File (Join-Path $e 'Test-ReportsBuiltProfile.ps1') -RepoRoot (Get-Location).Path -Profile v1.0 -OutputPath (Join-Path $e 'compiled-v1.0.json')
pwsh -NoProfile -NonInteractive -File (Join-Path $e 'Test-ReportsBuiltProfile.ps1') -RepoRoot (Get-Location).Path -Profile beta -OutputPath (Join-Path $e 'compiled-beta.json')

Both exit0. Verify normal manifests, three-DLL ownership, all exact migrated routes/suppressions, mandatory arguments and neighbors, plus the unchanged registration List/Get sets, default List, and mandatory item ID.

Exact real offline transport commands using the same $e:

pwsh -NoProfile -NonInteractive -File (Join-Path $e 'Test-ReportsOfflineTransport.ps1') -RepoRoot (Get-Location).Path -Profile v1.0 -Environment Global
pwsh -NoProfile -NonInteractive -File (Join-Path $e 'Test-ReportsOfflineTransport.ps1') -RepoRoot (Get-Location).Path -Profile v1.0 -Environment USGov
pwsh -NoProfile -NonInteractive -File (Join-Path $e 'Test-ReportsOfflineTransport.ps1') -RepoRoot (Get-Location).Path -Profile beta -Environment Global
pwsh -NoProfile -NonInteractive -File (Join-Path $e 'Test-ReportsOfflineTransport.ps1') -RepoRoot (Get-Location).Path -Profile beta -Environment USGov

All exit0, v1.0 17 captured requests/environment; beta 21/environment, 5 genuine declined confirmations each, no live HTTP. This is the normal authenticated GraphHttpClientFactory with authentication/retry/redirect and a test terminal handler, plus existing in-memory MockDataStore, not an anonymous/fake request adapter.

Every migrated compiled function sends the exact current profile URL and retains the actual typed contract: Report.Content for report functions, the actual typed collection/summary response for beta AzureAD sign-in summary. Also exercise default/item GET dispatch, escaped IDs, select/filter/top query binding, integer count, byte download/OutFile, existing nested registration POST/PATCH typed JSON and typed results, selected PATCH204-to-GET refetch, bodyless DELETE, owned POST download action and typed no-content sign-in action. WhatIf and genuine declined Confirm send zero HTTP; invalid typed bool binding fails before HTTP. Cache reuses the profile-rooted adapter; shared client and factory default https://graph.microsoft.com/v1.0/ BaseAddress remain unchanged even for beta/USGov. Loaded Authentication/Kiota/RMS/UriTemplate identities are unique, from the adapted package and expected Default/private contexts.

Reproduced baseline limitations, not waived or claimed green

  • Unmerged Preserve generic headers on PATCH refetch requests #3886: generic -Headers reaches PATCH but is absent on its selected 204-refetch GET. Method, item path, typed mutation body/result, and new profile root pass; header refetch does not. Captures retain this observation for all four transport combinations.
  • dotnet test .\tools\WrapperGenerator.Tests\WrapperGenerator.Tests.csproj --no-restore --filter 'FullyQualifiedName~SharedVariantsEmitIdenticalSourcesWhenOnlyTheRunProfileChanges' --logger 'trx;LogFileName=known-multiroute-baseline.trx' --results-directory (Join-Path $e 'tests') --verbosity minimal --nologo deliberately recorded exit1, 1 failed: stale global test expects identical v1.0/beta source while the merged emitter intentionally differs at GetRequestAdapter(profile). The existing test-only correction in unmerged Support mandatory Query-prefixed parameters for required queries #3882 is not overlaid into Reports; no full shared suite pass is claimed.
  • Raw pwsh -NoProfile -NonInteractive -File .\tools\Compare-WrapperCmdletNames.ps1 -GeneratedPath .\src\Reports\wrapper\v1.0\Cmdlets -OutLedger (Join-Path $e 'parity-v1.0.csv') and pwsh -NoProfile -NonInteractive -File .\tools\Compare-WrapperCmdletNames.ps1 -GeneratedPath .\src\Reports\wrapper\Beta\Cmdlets -OutLedger (Join-Path $e 'parity-beta.csv') both exit1. Unchanged v1.0: 116 matched / 80 mismatch / 21 no-oracle; beta: 422 mismatch / 98 no-oracle. Existing Mg versus MgBeta prefixes, oracle omissions and named-placeholder limitations are not normalized, renamed, or suppressed. Existing Microsoft.OpenApi.YamlReader3.7.0 NU1903 warning remains outside this module scope.

Compatible Reports Git blobs are unchanged: v1.0 1f907bf7691c3a13779b7ea6786e3764cb61d5a1, beta 169859b86fc51330fd53c8a948dfa8ef595f36fd.

E\handoff.json indexes exact target/head/commits/results. Current full logs/results: full-build-v1.0.log, full-build-beta.log, corresponding *-result.json; final tests targeted-tests-final.log, tests\reports-targeted-final.trx; compiled compiled-v1.0.json, compiled-beta.json; HTTP/contexts transport-<profile>-<environment>.json with corresponding *-final.log; complete input/package/generated/DLL/manifest SHA256 evidence auth-package-hashes.json, source-tool-input-hashes.json, generated-profile-hashes.json. Initial harness failures are retained separately, not relabeled as passes. Older 08e409/Authentication2.38 evidence remains historical in its original folder and is not current844672 acceptance.

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>

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