Skip to content

Audit BackupRestore shared directives and regenerate both v3 profiles - #3853

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

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

Conversation

@ramsessanchez

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

Copy link
Copy Markdown
Contributor

N/A (no linked issue).

Changes proposed in this pull request

  • Audit only shared src\BackupRestore\BackupRestore.md directives. That file was absent at the original 51d441eeb5 baseline and remains absent on the target: there are zero shared directives to migrate. Preserve the empty reviewed ledger/configuration, standard require: $(this-folder)/../readme.graph.md wiring, BackupRestore's structural Solution prefix exception and existing profile-specific derived naming. No invented selectors, aliases, suppressions or operation groups.
  • Normally merge actual powershell-v3 at 6475f3f5beb4908d39ea356db32bf1e0fd3273cb, including Remove automatic GET after successful PATCH #3886, and replace the old refetch assumptions with the positive one-operation PATCH contract. PATCH 204 succeeds with no output and no GET; PATCH 200 returns the actual typed model after one PATCH. Retrieval is a separate caller-explicit GET with independent inputs/errors. No PassThru, ReadBack or Refetch switch, and no sibling-GET inputs added to PATCH.
  • Fully regenerate/build v1.0 then beta through the unchanged four-mutex queue; keep each profile's combined client/cmdlet/project/manifest generation boundary in its own additive commit. Fresh compiled and actual-package imports use normal adapted Authentication 2.41.2, exactly three owned wrapper DLLs, no dependency copies/preloads, and profile/cloud-correct authenticated requests.

Scope retained: global and all profile-local readmes remain ignored/unmodified. Parameter aliases/transforms and schema/response directive classes remain Deferred. Both compatible profiles are supported, with no legacy-spec fallback. No authored groups or migrated mutations are invented. No #3881 POST-path overlay, #3897 optional-query redesign, unrelated naming sweep, production Auth/runtime/template change, Desktop 5.1 work, force-push, amend, rebase, duplicate PR or PR merge.

Final target, head and commit boundaries

Commit Scope
26a482d3bacfcfe679c0eeaa669b67296b316d03 Normal target merge of 6475f3f5beb4908d39ea356db32bf1e0fd3273cb
807e2714f073ef91b9d9970f2f0fa29debb8e12c Own real-spec no-readback/required-query regressions and corrected audit
04cf0b809543ced41534e1b118ab3d496f7b3777 Full combined v1.0 corrective generation; 172 actual changed files
17d7fc067787ce505b7871faf3819c1c6d341b17 Full combined beta corrective generation; 227 actual changed files; current head

Original migration/profile commits and previous #3849/#3891 revalidation history remain intact, including prior head e4b49f2f84b02276fe0412849f261a5f273a6d45. Current generation removes readbacks from all 33 v1.0 / 42 beta PATCH cmdlets and includes normal generator whitespace changes from required-query support. Client/model sources, projects and locks are byte-identical to the preceding source-correction head; no deltas are fabricated or hand-edited. Manifests are freshly generated build artifacts, not committed. The uncapped full Git comparison contains 694 owned paths, including all additions/deletions/rename status; no bin/obj, binaries, packages or session logs are committed.

Unchanged compatible spec identities

Profile Git blob Paths Operations
v1.0 ee37fc867b82b35bb31d0c94a8c251d03059d383 150 247
beta 4b2f3dcc294720dfae40768403fcbccfeb69c1b3 197 320

Both real specs have zero required query inputs, pinned by module tests and fresh compiled metadata. Therefore mandatory Query-name missing/null/empty runtime cases are not applicable here; no inputs are invented. Existing optional OData names/aliases and wire encoding remain unchanged. The shared required-query regression suite is included below.

Environment and exact current evidence roots

$BuildEvidence = "$env:USERPROFILE\.copilot\session-state\f0750e30-512b-4d8a-9cfe-030b653170ea\files\post3886-6475-final"
$RuntimeEvidence = "$env:USERPROFILE\.copilot\session-state\f0750e30-512b-4d8a-9cfe-030b653170ea\files\post3886-6475-memory-final"
$Queue = "$env:USERPROFILE\.copilot\session-state\871a5292-dc5b-423e-8083-5165b0006603\files\Invoke-QueuedModuleBuild.ps1"
$AuthRoot = "$env:USERPROFILE\.copilot\session-state\4aa86cf9-d43c-4d2b-a4a3-aeaed01b8f29\files\authentication-v2-sync\final-source\modules"

Acceptance used that exact normally packaged adapted Authentication 2.41.2 root first on the complete process-local PSModulePath, not stock gallery 2.41.2 or old 2.38.1. All 64 file SHA256s and physical Authentication nupkg SHA256 2FC09BFE6B70D313BC56DF8ADCCFB1976FB4E90A1898BF8A916B4B8B792898EB were verified; shipping Auth/runtime/templates remain source-equivalent. Isolated Kiota 1.36.1+fd3bf87790149b87f40f7eae1a5feb9016625943, process-local PATH/parallelism 1, .NET 10.0.403 and PowerShell 7/Core were used. No global installation/environment edits, dependency DLL injection, loader shims or live Graph/OAuth.

Source, strict and full-build commands/results

dotnet test .\tools\WrapperGenerator.Tests\WrapperGenerator.Tests.csproj -c Release --no-restore --filter 'FullyQualifiedName~BackupRestoreDirectiveMigrationTests|FullyQualifiedName~CmdletConfiguratorTests|FullyQualifiedName~NamingTests|FullyQualifiedName~RequiredQueryTests|FullyQualifiedName~PatchOperationTests' --logger 'trx;LogFileName=targeted.trx' --results-directory "$BuildEvidence\tests" --verbosity minimal
.\tools\Get-WrapperDirectiveMigrationInventory.ps1 -Module BackupRestore -FailOnUnresolved
& $Queue -RepoRoot $PWD.Path -Module BackupRestore -ApiVersion v1.0 -Configuration Release
& $Queue -RepoRoot $PWD.Path -Module BackupRestore -ApiVersion beta -Configuration Release

Tests: exit 0, 169 total/executed/passed, 0 failed/not executed, with actual tests\targeted.trx scalar counters after final authored changes. Ordinary strict inventory: exit 0, zero rows/mapped/deferred/unresolved, reflecting truly absent shared directives, not invented mappings. The known unrelated MultiRoute fixture is outside this targeted filter and is not patched here.

Both builds are full queued runs against openApiDocs_KiotaCompat, v1.0 then beta: no SkipKiota, GenerateOnly, NoCollisionData, fallback spec or NO-CMDLETS acceptance. Durations below are builder runtimes, excluding shared-queue wait.

Profile Build exit/status Seconds Fresh exports Exact spec method/path coverage Neighbor route/name checks
v1.0 0 / OK 153.1 291 247 / 247 11 passed
beta 0 / OK 512.5 379 320 / 320 11 passed
pwsh -NoProfile -NonInteractive -File "$BuildEvidence\Assert-BackupRestoreCompiled.ps1" -Profile v1.0 -RepositoryRoot $PWD.Path -ExpectedExports 291 -ExpectedOperations 247 -OutputPath "$BuildEvidence\compiled-v1.0.json"
pwsh -NoProfile -NonInteractive -File "$BuildEvidence\Assert-BackupRestoreCompiled.ps1" -Profile beta -RepositoryRoot $PWD.Path -ExpectedExports 379 -ExpectedOperations 320 -OutputPath "$BuildEvidence\compiled-beta.json"
pwsh -NoProfile -NonInteractive -File "$BuildEvidence\Assert-BackupRestoreNeighbors.ps1" -Profile v1.0 -RepositoryRoot $PWD.Path -ExpectedExports 291
pwsh -NoProfile -NonInteractive -File "$BuildEvidence\Assert-BackupRestoreNeighbors.ps1" -Profile beta -RepositoryRoot $PWD.Path -ExpectedExports 379

All four: exit 0, passed. Fresh compiled metadata pins every current spec route, 44/59 ordinary list/item List defaults and worker sets, 107/133 mutation ShouldProcess/WhatIf/Confirm declarations, no readback flags on all 33/42 PATCH commands, zero required-query inputs, and beta's six Entra CRUD/count routes.

Fresh guarded real authenticated offline transport

pwsh -NoProfile -NonInteractive -File "$RuntimeEvidence\Test-BackupRestoreTransport.ps1" -RepositoryRoot $PWD.Path -Profile v1.0 -Environment Global -OutputPath "$RuntimeEvidence\compiled-v1.0-Global.json"
pwsh -NoProfile -NonInteractive -File "$RuntimeEvidence\Test-BackupRestoreTransport.ps1" -RepositoryRoot $PWD.Path -Profile v1.0 -Environment USGov -OutputPath "$RuntimeEvidence\compiled-v1.0-USGov.json"
pwsh -NoProfile -NonInteractive -File "$RuntimeEvidence\Test-BackupRestoreTransport.ps1" -RepositoryRoot $PWD.Path -Profile beta -Environment Global -OutputPath "$RuntimeEvidence\compiled-beta-Global.json"
pwsh -NoProfile -NonInteractive -File "$RuntimeEvidence\Test-BackupRestoreTransport.ps1" -RepositoryRoot $PWD.Path -Profile beta -Environment USGov -OutputPath "$RuntimeEvidence\compiled-beta-USGov.json"

All four: exit 0, PASS; each 17 runtime checks, 18 captured authenticated requests, four genuinely declined prompts, two invalid-binder rejections, zero live requests. These execute real compiled exports through normal Connect-MgGraph/GraphHttpClientFactory, with only the terminal handler offline.

Fresh positive assertions include: PATCH 204 one PATCH / no output / no GET, PATCH 200 one PATCH / actual typed response model / no GET, both while GET is configured to return 403; actual typed enum/date/nested Identity request bodies and mutation headers; caller-explicit GET with independent select/header/typed-result binding and its own 403 error; bodyless DELETE/no result; enable action body/typed ServiceStatus; default List/item dispatch/escaped IDs and native top/filter/select wire values. Four representative mutations each prove WhatIf sends zero HTTP and declined Confirm prompts once/sends zero HTTP. Invalid enum and GET-only PATCH Property bindings reject before HTTP; no readback switch exists.

Actual beta requests use /beta on both Global and USGov while the real factory BaseAddress remains global /v1.0/. Alternating v1/beta requests preserve the shared client/cloud endpoint/BaseAddress. Adapter reuse, request-context timeout/invalidation, reconnect with a fresh client/adapter, disconnect and NoGraphSession are asserted. One normal Authentication-owned Kiota/RMS/UriTemplate identity/source/load context is checked, with real typed JSON serialization.

Post-import datastore-isolation correction: importing Authentication in the confirmation runspace was observed to reset the actual shared GraphSession datastore to DiskDataStore. The corrected probe reapplies the existing normal Set-MgTestDataStore helper after the last import and before Connect, then records 22 actual reflected MockDataStore checks across transport and lifecycle/logout and checks the actual type on every captured request. Each guarded proof reports only Microsoft.Graph.Authentication.Test.Mocks.MockDataStore at those checks. This is a session-probe setup correction, not an Auth/production change. Earlier unguarded v1 proofs remain untouched and are not used to certify in-memory isolation; no credential-I/O conclusion is inferred from a datastore type. No FULL build, TRX, source or generation rerun was performed for this correction; beta's first transport run was already guarded.

Normal packaging and fresh actual-package acceptance

pwsh -NoProfile -NonInteractive -File "$BuildEvidence\Invoke-WrapperPackagingStage.ps1" -RepositoryRoot $PWD.Path -Profile v1.0 -OutputRoot $BuildEvidence
pwsh -NoProfile -NonInteractive -File "$BuildEvidence\Invoke-WrapperPackagingStage.ps1" -RepositoryRoot $PWD.Path -Profile beta -OutputRoot $BuildEvidence
pwsh -NoProfile -NonInteractive -File "$RuntimeEvidence\Test-BackupRestoreTransport.ps1" -RepositoryRoot $PWD.Path -Profile v1.0 -ManifestPath "$BuildEvidence\package-imports\v1.0\Microsoft.Graph.Wrapper.BackupRestore.psd1" -OutputPath "$RuntimeEvidence\package-compiled-v1.0.json"
pwsh -NoProfile -NonInteractive -File "$RuntimeEvidence\Test-BackupRestoreTransport.ps1" -RepositoryRoot $PWD.Path -Profile beta -ManifestPath "$BuildEvidence\package-imports\beta\Microsoft.Graph.Wrapper.BackupRestore.psd1" -OutputPath "$RuntimeEvidence\package-compiled-beta.json"

All four: exit 0, passed. Supplemental packaging runs the unmodified production packaging-only block with dotnet pack --no-build against completed full outputs; it does not regenerate outside the queue. Each package has exactly three owned DLLs and the normal Authentication-2.41.2 manifest with no dependency preloads, all byte/hash-equivalent to the full build. Both actual extracted-package imports pass the same 17 checks / 18 requests / 22 actual MockDataStore guards.

Profile Package SHA256 Normal manifest SHA256
v1.0 2CCBDEF921F720E219BD0ABDD2D4C4F08400A1FFC06841E226183C78723FDC60 C5BE6004A494A1BC3C11C57F2AFB400C5CF31528B4D2D6A3A9F8801CD1D0F50C
beta 536CDD4DD1DBB903F7AF23D28D3505E1658C17B6DE332E8854EDFDD17A525C42 6DB1537B2A0DD95740ACFF9B34429AE3950E96C2A9C3CF2BAEA235E0C96902C8

Preserved raw limits and historical evidence

pwsh -NoProfile -NonInteractive -File .\tools\Compare-WrapperCmdletNames.ps1 -GeneratedPath .\src\BackupRestore\wrapper\v1.0\Cmdlets -OutLedger "$BuildEvidence\parity-v1.0.csv"
pwsh -NoProfile -NonInteractive -File .\tools\Compare-WrapperCmdletNames.ps1 -GeneratedPath .\src\BackupRestore\wrapper\Beta\Cmdlets -OutLedger "$BuildEvidence\parity-beta.csv"

Both raw parity commands: exit 1, unchanged baseline limits. v1.0: 290 matched / one no-oracle browse function. Beta: 371 mismatches / eight no-oracle, retaining non-MgBeta prefixes/structural action names and seven no-oracle Entra exports, without normalization or unrelated fixes. The existing named-placeholder browse suppression discrepancy remains unsuppressed in both profiles. Existing NU1903/raw generated-whitespace warnings remain unchanged.

The old PATCH-refetch generic-header-loss report is user-superseded historical evidence, not a current failure or waived gate. Current assertions are fresh no-readback proofs, not relabelled old FAIL records. Runtime coverage is representative owned surfaces, not every Graph operation or live-tenant certification; no authored grouped/composite PATCH is invented, and deferred #3881/#3897 work is not certified.

All old #3849/#3891/candidate reports, the original owner worktree, and original migration/generation commits remain preserved. Current build/TRX/strict/raw-parity/package evidence is under post3886-6475-final; corrected guarded runtime proofs, full Git scope, canonical scalar handoff.json, source/assembly/manifest/package hashes and exact proof paths are under post3886-6475-memory-final. No further generation, new PR, merge or archival is authorized by this update.

Other links

Record absent shared legacy source, compatible spec pins, deferred scope, and retained structural and derived behavior. Cover both real specifications without running module generation.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Run full Kiota 1.36.1 plus wrapper Release generation against the pinned compatible spec. Client/cmdlet sources, generated projects and wrapper lock are byte-identical after Git line-ending normalization; only the Kiota client version lock changes. Compiled manifest exports 291 cmdlets; exact audited route behavior is unchanged.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Run full Kiota 1.36.1 plus wrapper Release generation against the pinned compatible beta spec, retaining the committed Beta output directory. Client/cmdlet sources and projects are byte-identical after Git normalization; client and wrapper locks record lowercase compatible-spec paths and the client tool version. Compiled manifest exports 372 cmdlets with unchanged audited route behavior.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep the existing module template's readme.graph.md wiring because Copy-ModuleTemplate skips existing destinations. This introduces no module directives or overrides and does not migrate ignored global configuration.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Preserve separate explicit profile context for derived naming and suppression, refresh compatible spec identities, and cover raw action naming in both profiles.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Run full queued Kiota 1.36.1 and wrapper generation plus Release build against compatible spec ee37fc8. Client and cmdlet sources/projects remain byte-identical; persist the actual client description-hash delta. Fresh compiled import exports 291 cmdlets and passes 11 exact route/name assertions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Run full queued Kiota 1.36.1 and wrapper generation plus Release build against compatible spec 4b2f3dc. Keep the newly ingested Entra protection-policy client, models, cmdlets and lock update together. Fresh compiled import exports 379 cmdlets, covers all 320 spec operations, and verifies original neighbors plus all six new beta routes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add real-spec transport emission regressions for both profiles and refresh source audit acceptance to normal Authentication 2.41.2. Preserve absent directive source and document existing unmerged generic-header refetch limitation.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Full queued Kiota/client/cmdlet/project/manifest Release generation on normally merged #3891. Emit explicit v1.0 transport context and remove dependency-copy exceptions; manifest requires adapted Authentication 2.41.2. Fresh imports and real offline authenticated factory transport verify typed writes/results, selected PATCH 204 refetch, safety, binder and shared profile context. Generic refetch Headers remain the documented unmerged #3886 limitation.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Full queued client/cmdlet/project/manifest generation on normally merged #3891. Explicit beta adapter context preserves /beta even through the real Authentication factory v1.0 BaseAddress; wrapper projects own only three DLLs and manifests require Authentication 2.41.2. Fresh compiled Global/USGov offline gates verify all 320 spec operations, typed transport/binder/safety, and unchanged shared client. Retain raw naming parity and unmerged generic-header refetch limitations.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Replace superseded readback/header-loss audit with positive PATCH 204 no-output/no-GET and PATCH 200 typed-result contract. Test every emitted real-spec PATCH and retain zero required-query inputs, shared directive scope and profile-specific transport.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Full queued Kiota/client/cmdlet/project/manifest Release build on 6475f3f. Preserve every route and normal Authentication ownership while removing implicit PATCH readbacks. Fresh 291-export compiled imports and real factory Global/USGov transport assert one PATCH204/no output/noGET with GET403, one PATCH200/actual typed result, explicit independent GET and typed CRUD/action/query/binder/safety/cache contracts.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Full queued Kiota/client/cmdlet/project/manifest Release build on 6475f3f. Preserve beta routes, profile service root and normal Authentication closure while removing automatic PATCH readbacks. Fresh 379-export compiled imports and guarded real factory Global/USGov probes verify one PATCH204/no output/noGET with GET403, one PATCH200/actual typed result, explicit independent GET, typed CRUD/actions, binder/query/safety/cache/lifecycle contracts.

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