Skip to content

Audit DirectoryObjects shared directives for v3 wrappers - #3856

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

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

Conversation

@ramsessanchez

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

Copy link
Copy Markdown
Contributor

No issue is closed by this module audit.

Changes proposed in this pull request

Final revalidation uses normally merged target 6475f3f5beb4908d39ea356db32bf1e0fd3273cb (#3886), not the older implicit-refetch contract. PATCH204 now succeeds with no returned object and exactly one PATCH; PATCH200 returns its actual typed response with exactly one PATCH. Neither triggers GET, even when GET would return 403. Callers may independently issue Get-MgDirectoryObject if they need readback. No PassThru/ReadBack/Refetch flag is added.

  • Account for all 17 shared DirectoryObjects cmdlet directive groups, preserving every original active verb/subject selector. Fifteen groups have no compatible operation (including one duplicate); two literal Mg/MgBeta-prefixed subjects are honest no-match selectors. Actual legacy beta contains 16 PKI operations; legacy v1.0 and both compatible specs contain no PKI paths. No speculative override, broad pruning, new alias, or Legacy bridge is added.
  • Preserve the seven live v1.0 derived action renames, existing v1.0 restore suppression, absent upload rename, ordinary List/item default binding, count/delta/function neighbors, item DELETE, profile-specific oracle isolation, and frozen naming limitations.
  • Add owned real-spec source regressions for final PATCH behavior in both profiles. Regenerate both supported profiles through the unchanged full queue, with separate combined Kiota/client/cmdlet/project generation commits and fresh normal-manifest/real-factory HTTP acceptance.

Scope remains only src/DirectoryObjects/DirectoryObjects.md shared cmdlet directives. Every profile-local directive, including v1.0/readme.md and beta/readme.md, and src/readme.graph.md is explicitly ignored and untouched. Parameter aliases/transforms and schema/response directives remain deferred; this shared file has no such groups. Both v1.0 and beta are required; neither is excluded. Existing wrapper/Beta casing is preserved. Validation is PowerShell 7/Core only; no Desktop5.1 support is claimed.

Current target, history, and generation boundaries

Normal target merge: b11ee78ebabba3bba88374f12218df759c4acbb2. Authored source-test correction: b8ce8a716f5f99f455505111481f5602de64a643.

Profile Fresh combined generation commit Full queued Release result Exports / exact routes
v1.0 728b0d948cb8ebdbedd3abca5cd72f1a136280a3 OK, exit 0, 43.4s 15 / 14
beta 25aa9f0a916ea5ce54a9e8f5218315786c9c87c3 OK, exit 0, 415.7s 16 / 15

Final pushed head: 25aa9f0a916ea5ce54a9e8f5218315786c9c87c3. This remains the same open PR targeting powershell-v3, preserving its existing non-draft choice and every earlier migration/correction/normal-merge/separate-profile commit. No rebase, amend, force-push, cherry-pick, new PR, approval, or merge.

Actual final generation changes remove the obsolete implicit GET block in each generated Update-MgDirectoryObject. The GET dispatcher/item/list outputs also gain generator-produced blank-line formatting. Kiota client source/locks and generated project contents are byte-identical for this wave; no fabricated changes are added. Fresh Release manifests require Authentication 2.41.2 without RequiredAssemblies preloads, and bins contain exactly the owned module/client/runtime DLLs. No bin/obj/manifests/DLLs/logs are committed.

Exact current commands and results

Each command ran from this PR's worktree, using process-local isolated Kiota 1.36.1+fd3bf87790149b87f40f7eae1a5feb9016625943, KIOTA_Generation__MaxDegreeOfParallelism=1, .NET SDK 10.0.403, and the exact normal adapted Authentication 2.41.2 root first in PSModulePath:

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

Fresh child imports verify version and source. All 64 Authentication file SHA256s match the complete package manifest, and the physical nupkg SHA256 is 2FC09BFE6B70D313BC56DF8ADCCFB1976FB4E90A1898BF8A916B4B8B792898EB. This is the normally packaged source-equivalent adapted module, not stock gallery2.41.2, old2.38, a dependency bundle, preload, or load-context shim.

Current compatible spec Git blobs remain v1.0 6d237252fa7ac6b410321be9e84e6eefeb675909, beta 25d21d2e462cd6cba6d27f0938af0f11540018d6. The new source regression checks every current compatible operation/path-level parameter and proves zero required-query operations in this module; mandatory Query inputs are therefore not invented. Existing optional OData and native path-ID binding remain unchanged. No authored variant groups or PUT/media surfaces are introduced.

Unchanged build/source/TRX evidence and corrected runtime-only evidence roots:

$buildEvidenceRoot = 'C:\Users\ramsess\.copilot\session-state\979faf10-416b-492e-b722-1d0cdce1ad80\files\post3886-6475-final'
$evidenceRoot = 'C:\Users\ramsess\.copilot\session-state\979faf10-416b-492e-b722-1d0cdce1ad80\files\post3886-6475-memory-final'
.\tools\Get-WrapperDirectiveMigrationInventory.ps1 -Module DirectoryObjects -FailOnUnresolved
dotnet test .\tools\WrapperGenerator.Tests\WrapperGenerator.Tests.csproj --no-restore --filter 'FullyQualifiedName~DirectoryObjectsDirectiveMigrationTests|FullyQualifiedName~CmdletConfiguratorTests|FullyQualifiedName~NamingTests|FullyQualifiedName~MutationRouteTests|FullyQualifiedName~IncompatibleQueryAndResponseContractsCannotBeMerged' --logger 'trx;LogFileName=targeted.trx' --results-directory $buildEvidenceRoot --verbosity minimal

Results: 17/17 Mapped, exit 0 (15 reviewed absences, two literal no-ops); 304 total/executed/passed, 0 failed, 0 not-executed in actual retained TRX, exit 0. Original 17 active directive blocks remain unchanged. The two owned actual-profile PATCH cases check one mutation, no .GetAsync, no new readback flags or GET-only PATCH parameters, correct separate profile context, typed body/header forwarding, ShouldProcess, and non-null-only output.

pwsh -NoProfile -NonInteractive -File 'C:\Users\ramsess\.copilot\session-state\871a5292-dc5b-423e-8083-5165b0006603\files\Invoke-QueuedModuleBuild.ps1' -RepoRoot $PWD.Path -Module DirectoryObjects -ApiVersion v1.0 -Configuration Release
dotnet build .\src\DirectoryObjects\wrapper\v1.0\Microsoft.Graph.Wrapper.DirectoryObjects.csproj -c Release --no-restore --no-incremental --verbosity minimal
pwsh -NoProfile -NonInteractive -File 'C:\Users\ramsess\.copilot\session-state\871a5292-dc5b-423e-8083-5165b0006603\files\Invoke-QueuedModuleBuild.ps1' -RepoRoot $PWD.Path -Module DirectoryObjects -ApiVersion beta -Configuration Release
dotnet build .\src\DirectoryObjects\wrapper\Beta\Microsoft.Graph.Wrapper.DirectoryObjects.csproj -c Release --no-restore --no-incremental --verbosity minimal

Both FULL compatible-spec generations/builds and supplemental no-incremental rebuilds pass, exit 0. Profiles ran v1.0 then beta through the unchanged four-mutex queue. No SkipKiota, GenerateOnly, NoCollisionData, legacy fallback, or NO-CMDLETS acceptance.

Fresh compiled and normal real-factory HTTP acceptance

pwsh -NoProfile -NonInteractive -File "$evidenceRoot\Verify-CompiledDirectoryObjects.ps1" -RepoRoot $PWD.Path -ApiVersion v1.0 -EvidenceRoot $evidenceRoot
pwsh -NoProfile -NonInteractive -File "$evidenceRoot\Verify-CompiledDirectoryObjects.ps1" -RepoRoot $PWD.Path -ApiVersion beta -EvidenceRoot $evidenceRoot
pwsh -NoProfile -NonInteractive -File "$evidenceRoot\Test-DirectoryObjectsTransport.ps1" -RepoRoot $PWD.Path -ApiVersion v1.0 -Environment Global -EvidenceRoot $evidenceRoot
pwsh -NoProfile -NonInteractive -File "$evidenceRoot\Test-DirectoryObjectsTransport.ps1" -RepoRoot $PWD.Path -ApiVersion v1.0 -Environment USGov -EvidenceRoot $evidenceRoot
pwsh -NoProfile -NonInteractive -File "$evidenceRoot\Test-DirectoryObjectsTransport.ps1" -RepoRoot $PWD.Path -ApiVersion beta -Environment Global -EvidenceRoot $evidenceRoot
pwsh -NoProfile -NonInteractive -File "$evidenceRoot\Test-DirectoryObjectsTransport.ps1" -RepoRoot $PWD.Path -ApiVersion beta -Environment USGov -EvidenceRoot $evidenceRoot

All six gates pass, exit 0. Fresh normal-manifest imports verify 15/16 exports, all exact expected routes, no PKI exports, the existing v1 restore suppression, List default/item binder, count/delta neighbors, no required-query invention or readback/GET-only PATCH parameter, exactly three owned DLLs, and no dependency preload.

Profile/cloud Passed contracts Captured requests Actual datastore checks Declined prompts Exit
v1.0 Global 20 18 53 3 0
v1.0 USGov 20 18 53 3 0
beta Global 21 19 55 3 0
beta USGov 21 19 55 3 0

Each real Connect-MgGraph in-memory test session uses the normal GraphHttpClientFactory token pipeline plus an offline terminal handler—not a bare marker client. No live OAuth/Graph or credential store is used.

The corrected runtime setup imports the normal module in both main and genuine-decline runspaces before reapplying the existing Set-MgTestDataStore helper. It reflects the actual shared GraphSession.DataStore and requires Microsoft.Graph.Authentication.Test.Mocks.MockDataStore before Connect, HTTP, request-context changes, reconnect, disconnect/logout, and after completion. Every one of the 74 terminal captures independently records and requires the same actual MockDataStore type; 216 reflected phase checks pass. Helper/MockDataStore source paths and SHA256s are included in each proof. No Auth/OnImport/loader/package/credential-provider code is changed.

The earlier two v1.0 runtime observations did not include this post-import guard and remain unchanged in the original build evidence folder; they are not used to certify datastore isolation. Only the affected offline runtime probes were corrected/run in the new memory-final folder, against the same final source and compiled bins. No full-generation queue, build, source-test/TRX, or generation-commit rerun was triggered by this probe correction. A datastore type alone is not treated as evidence of actual credential I/O.

Fresh positive assertions:

  • PATCH204 with GET configured to return 403 succeeds with exactly one PATCH, zero GETs, zero output objects, and its own typed body/bound header.
  • PATCH200 returns exactly its actual DirectoryObject model (patch-response-proof) after one PATCH and zero GETs.
  • Caller-explicit GET is independent: its denied-read error is observed separately; a later explicit GET uses its own headers/query and returns its own typed model.
  • Typed item/list/default GETs, encoded IDs, native optional GET queries/headers, count/delta function, typed POST/action JSON/results, bodyless item DELETE, beta bodyless restore, and pre-HTTP invalid binder rejection are retained.
  • WhatIf and genuine declined Confirm each send zero HTTP; each matrix records one prompt for each of the three CRUD mutations.
  • Alternating v1/beta adapters retain cloud/profile roots without mutating the shared factory client's global/v1.0 BaseAddress. Request-context change, reconnect, and disconnect correctly invalidate/rebuild client/adapter or raise NoGraphSession before HTTP.
  • Authentication/Kiota/RMS identities are unique, originate in the exact adapted normal package, and use the expected loader contexts. Beta uses /beta, including USGov, rather than inheriting the factory BaseAddress /v1.0.

These are real offline compiled wire/model/binder checks, not Graph tenant or service-validity certification. Native DELETE has no required-query contract in these specs. Deferred #3881 and optional-query tracking #3897 are not copied or implemented.

Raw parity, limits, and historical separation

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

Raw results remain v1.0 15/15, exit 0, beta 0/16, exit 1: frozen Mg-vs-MgBeta/action naming and restore's omitted oracle row are explicitly unchanged and unnormalized. Existing NU1903 YamlReader and ManagedIdentityCredential deprecation warnings remain outside scope. No unrelated naming, suppression, schema, Auth, runtime, generator, template, or other-owner fix is added.

The old 844672 artifacts accurately record the previous four refetch-header failures. They remain unchanged; their contract was superseded by the user's one-PATCH/no-readback decision, not relabeled PASS. Earlier 08e409a6aa and Authentication2.38.1 evidence is likewise historical only. All earlier migration/source/generation commits remain preserved.

The build evidence folder retains raw full-v1.0.log / full-beta.log and exits, actual targeted.trx, ordinary strict JSON, and current/legacy/spec/source/Auth64/queue/tool identities. The memory-final folder retains corrected scripts, actual datastore phase/capture guards, generated normal manifests and assembly hashes, compiled-<profile>-<cloud>.json matrices, HTTP cases/loader contexts, raw parity ledgers, full Git scope including deleted/renamed entries, and canonical scalar handoff.json with absolute paths and SHA256s referencing the unchanged build/TRX artifacts. The initial incomplete test attempt is retained distinctly; the final complete TRX is authoritative. No wrapper nupkg pack gate was run; normal bins/manifests and the physical Authentication package are verified without claiming otherwise.

Other links

Record all 17 shared suppression groups against actual legacy and compatible specs, retain no-op and duplicate selectors, and preserve neighboring derived behavior without speculative overrides.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Run queued full compatible-spec generation and Release build with Kiota 1.36.1 and Authentication 2.38.1. Client/cmdlet/project sources are unchanged; the client lock records the CLI update. Compiled module exports 15 cmdlets; all14 direct-call names match published parity.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Run queued full compatible-spec generation and Release build with Kiota 1.36.1 and Authentication 2.38.1. Client/cmdlet/project sources are unchanged; locks record the CLI update and compatible-spec beta path casing. Compiled module exports 16 cmdlets. Existing beta parity mismatches are unchanged and outside the shared PKI directive scope; preserve committed Beta output casing.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Pass generation profile separately from shared GeneratorConfig, pin beta oracle isolation with data on and off, and refresh compatible-spec evidence after the normal powershell-v3 merge. All17 original subject directives remain active and current strict mappings pass.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Run full queued compatible-spec Kiota and cmdlet generation plus Release build on merged powershell-v3 including #3849. Verify15 compiled exports and14 exact route neighbors preserving the existing restore suppression. Client/cmdlet/project sources remain identical; the client lock tracks the current compatible description hash. Raw published route naming parity passes15/15.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Run full queued compatible-spec Kiota and cmdlet generation plus Release build on merged powershell-v3 including #3849. Verify16 compiled exports and15 exact route neighbors with no v1 oracle leakage. Client/cmdlet/project sources remain identical; the client lock tracks the current compatible description hash. Raw beta naming parity remains0/16 at baseline and is not normalized or fixed by this shared directive audit.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Run full queued Kiota/client/cmdlet/project generation and Release build on normal target844672d7c2 with packaged Authentication2.41.2. Emit explicit v1.0 adapters, require new Authentication, remove wrapper dependency retention/preloads; verify15 exports,14 exact routes and only3 owned DLLs. Real factory offline typed/session/binder/safety checks pass except the independently retained #3886 bound-header loss on204 PATCH refetch; no global fix is copied.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Run full queued Kiota/client/cmdlet/project generation and Release build on normal target844672d7c2 with packaged Authentication2.41.2. Emit explicit beta adapters, require new Authentication, and remove wrapper dependency retention/preloads. Verify16 exports,15 exact routes, only3 owned DLLs and real factory beta Global/USGov URLs. Preserve #3886 bound-header loss on204 PATCH refetch as an actual blocker; do not copy or waive global fixes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use actual compatible v1.0 and beta documents to assert one PATCH, no implicit GET or readback switches, no GET-only bindings or required-query inventions, correct run profile, and unchanged typed body/header/ShouldProcess behavior. Retain historical refetch evidence unchanged; fresh offline probes separately verify204empty/200typed/explicitcallerGET.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Run full queued compatible Kiota/client/cmdlet/project Release generation on6475f3f5be and a no-incremental rebuild. Verify15 exports/14 exact routes and real Auth factory Global/USGov PATCH204one-request/zero-output/noGET and PATCH200actual-model/one-request, plus independent explicitGET and19 runtime contracts per cloud. Preserve separate profile boundary and identical client/locks; remove only obsolete automatic readback from generated PATCH.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Run full queued compatible Kiota/client/cmdlet/project Release generation on6475f3f5be and a no-incremental rebuild, with16 discovered exports. Preserve beta transport context and existing surface; remove obsolete automatic GET after PATCH and retain separate generation boundary with byte-identical client/locks. Fresh memory-guarded actual HTTP proof is retained in session artifacts rather than broadening module source.

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