Repository navigation
Remove automatic GET after successful PATCH - #3886
Merged
Ramses Sanchez-Hernandez (ramsessanchez) merged 9 commits intoNov 6, 2026
Merged
Ramses Sanchez-Hernandez (ramsessanchez) merged 9 commits into
Ramses Sanchez-Hernandez (ramsessanchez) merged 9 commits into
Conversation
Bind caller Headers on the same typed GET builder without replaying mutation-only typed headers. Add generated Kiota offline ordinary/grouped regression coverage and document the separate artifact packaging prerequisite. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Ramses Sanchez-Hernandez (ramsessanchez)
requested a review
from a team
as a code owner
October 30, 2026 03:52
Keep exact typed composite receivers, key dictionaries, and distinct mutation body/path checks while requiring the configured GET refetch to bind generic request headers. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…erequisite Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Refresh the offline gate to pack normal three-DLL wrappers, import the exact normally built Authentication package, and capture requests through its real factory and token handler. Verify profile-aware cache behavior without mutating the factory default BaseAddress; retain generic/typed header and composite regressions and document historical packaging proof separately. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This was referenced Nov 3, 2026
Ramses Sanchez-Hernandez (ramsessanchez)
added a commit
that referenced
this pull request
Nov 3, 2026
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>
This was referenced Nov 3, 2026
Ramses Sanchez-Hernandez (ramsessanchez)
added a commit
that referenced
this pull request
Nov 3, 2026
Queued full Kiota/cmdlet Release build succeeds with Authentication 2.41.2 and explicit v1.0 service root. Regenerate module project pruning and cmdlet calls; client and locks are identical. Normal manifest imports carry only three owned DLLs. Real authenticated offline GET/query/PATCH-204-refetch/typed-result and mutation safety gates pass. Preserve raw bound generic refetch-header failure for unmerged #3886. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Ramses Sanchez-Hernandez (ramsessanchez)
added a commit
that referenced
this pull request
Nov 3, 2026
Queued full Kiota/cmdlet Release build succeeds with Authentication 2.41.2 and explicit beta service root. Regenerate module project pruning and cmdlet calls; client and locks are identical. Normal manifests import only three owned DLLs. Real authenticated offline GET/query/PATCH/refetch results retain beta and cloud roots despite factory v1 BaseAddress. Keep documented raw beta prefix and unmerged #3886 bound refetch-Headers failures. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Ramses Sanchez-Hernandez (ramsessanchez)
added a commit
that referenced
this pull request
Nov 3, 2026
Full queued Release Kiota+wrapper generation on normally merged 844672d succeeds with 78 exports in 17.10s. Regenerate explicit v1.0 adapter context in 70 request cmdlets and new project dependency ownership; normal manifest requires adapted Authentication 2.41.2 with only three owned DLLs and no preloads. Fresh compiled routes and offline authenticated factory Global/USGov typed CRUD/profile/safety/context checks pass. Preserve and report the existing bound-Headers-on-refetch limitation from unmerged #3886 rather than claiming it passed. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Ramses Sanchez-Hernandez (ramsessanchez)
added a commit
that referenced
this pull request
Nov 3, 2026
Full queued Release Kiota+wrapper generation on normally merged 844672d succeeds with 78 exports in 28.00s. Regenerate explicit beta adapter context in 70 request cmdlets and dependency-ownership project; normal manifest requires adapted Authentication 2.41.2 with only three owned DLLs and no preloads. Actual authenticated factory Global/USGov requests retain beta roots despite the factory v1.0 BaseAddress, with typed beta postal-address CRUD, selected 204 refetch, and safety/context gates. Preserve inherited raw beta naming differences and explicitly failed generic refetch-header check pending unmerged #3886. Do not waive or overlay that framework limitation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This was referenced Nov 3, 2026
Ramses Sanchez-Hernandez (ramsessanchez)
added a commit
that referenced
this pull request
Nov 3, 2026
Full four-mutex queued beta Release pipeline on normal844672 target: exit0/statusOK28.3seconds13exports. Regenerate client/cmdlet/projects/manifests with Kiota1.36.1 and approved source-equivalent Authentication2.41.2. Client sources/projects/locks are byte-identical; eleven direct cmdlets now pass beta transport context and the module project prunes every shared dependency, retaining only three ownedDLLs. Retain actual current transport evidence: factory betaURLs/typedGET+bodyPOST/PATCH200/results/actions/binder/WhatIf+declinedConfirm succeed in Global/USGov without client mutation or duplicate Authclosure. Full transport acceptance remains blocked by dropped boundHeaders on PATCH204GET refetch (#3886), not patched here. Raw parity remains known Mg/MgBeta prefix-only0/13. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This was referenced Nov 3, 2026
Ramses Sanchez-Hernandez (ramsessanchez)
added a commit
that referenced
this pull request
Nov 5, 2026
…ions Run the full queued beta Release pipeline on normal target 844672d with adapted Authentication 2.41.2 and isolated Kiota 1.36.1. Build succeeds with 713 compiled cmdlets; the Kiota client and original /post builders remain byte-identical to the prior diagnostic output. Preserve projects and generator locks together. New-source tree includes unmodified Kiota trailing whitespace. Runtime publication remains blocked by the separately tracked generic-header omission on PATCH 204 refetch (#3886); no blanket transport acceptance is claimed. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Ramses Sanchez-Hernandez (ramsessanchez)
added a commit
that referenced
this pull request
Nov 5, 2026
Run the actual full queued Kiota 1.36.1 and wrapper Release pipeline on normal target 4eb3ca3: OK, 118.6 seconds, 531 exports. Combined profile generation adds mandatory QueryId for all four surviving collection-reference DELETEs. Client/project/lock output is genuinely unchanged. Fresh normal factory Global/USGov proof verifies nonempty encoded queries, rejected omission/null/empty, bodyless IfMatch/custom-header transport and one-prompt safety. Retain the separately reproduced unmerged #3886 PATCH204 refetch-header failure; no overlays or mapping changes. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Ramses Sanchez-Hernandez (ramsessanchez)
added a commit
that referenced
this pull request
Nov 5, 2026
Run unchanged full four-mutex queued Release pipeline on normally merged target 4eb3ca3 with isolated Kiota 1.36.1 and hash-verified adapted Authentication 2.41.2. Build exit0, module OK, 50.1 seconds, 597 exports. All four original collection reference suppressions and no-query item neighbors remain intact; no surviving v1 required native query exists. Fresh normal-manifest and Global/USGov offline factory/body/session gates pass independently; bound generic headers on PATCH204 refetch remain an unwaived #3886 blocker. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Ramses Sanchez-Hernandez (ramsessanchez)
added a commit
that referenced
this pull request
Nov 5, 2026
Run unchanged full four-mutex queued Release pipeline on normally merged target 4eb3ca3 with isolated Kiota 1.36.1 and hash-verified adapted Authentication 2.41.2. Build exit0, module OK, 89.2 seconds, 963 exports. The sole surviving required-query operation binds mandatory QueryId to exact encoded @id; all four shared collection suppressions and item-reference neighbors remain unchanged. Actual Global/USGov factory/binder/bodyless/header/ShouldProcess/query gates pass; PATCH204 generic-header refetch still fails #3886 and blocks publication. Kiota client and locks regenerate byte-identically. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Combine only selected GET required-query bindings and generic request headers in the typed refetch configuration; preserve mutation query isolation and typed conditional-header behavior. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Update the merged required-query baseline to require generic refetch headers without typed IfMatch replay. Extend ordinary and composite compiled fixtures with mandatory independent tenantId/view queries, binder checks, and USGov roots while preserving existing grouped and safety coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Apply the user-directed one-operation contract: PATCH204 succeeds without output, response models return when present, and retrieval is a separate explicit GET. Remove read-back emission, flags and GET-only query unions/guards; preserve mutation input, header, typed builder and safety semantics. Update directly coupled source/offline regressions and documentation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Rename the fixture file and namespace to PatchOperationTransport and update only direct harness and project exclusion references. Keep PATCH and explicit GET behavior unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Rename the script, test class/shared fixture and result document, and update only current references, examples and README links. Preserve PATCH and explicit GET semantics and historical evidence. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Ramses Sanchez-Hernandez (ramsessanchez)
merged commit Nov 6, 2026
6475f3f
into
powershell-v3
6 checks passed
Ramses Sanchez-Hernandez (ramsessanchez)
deleted the
ramsessanchez-patch-refetch-headers
branch
November 6, 2026 01:01
This was referenced Nov 6, 2026
Ramses Sanchez-Hernandez (ramsessanchez)
added a commit
that referenced
this pull request
Nov 6, 2026
Retain all shared selector evidence and explicit beta-only scope after normal #3886 integration. Require generated PATCH to use only its own builder/body/headers, no implicit GET or GET-only/readback inputs; 204 returns no object and 200 preserves the actual response. Recheck no required query inputs in this compatible module spec and retain explicit beta adapters/default neighbors. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This was referenced Nov 6, 2026
Ramses Sanchez-Hernandez (ramsessanchez)
added a commit
that referenced
this pull request
Nov 6, 2026
Run full compatible Kiota/client/cmdlet/project/manifest generation on merged #3886. Preserve25surviving GET/action routes and normal Authentication ownership. Fresh Global/USGov compiled probes pass43offlineauthenticatedrequests each, typedPOSTs, native optional queries, cache/session lifecycle and genuine No/WhatIf safety. Client/project/locks remain byte-identical; only generated path-ID validation annotations change. No PATCH survives original suppression policy. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Ramses Sanchez-Hernandez (ramsessanchez)
added a commit
that referenced
this pull request
Nov 6, 2026
Full queued compatible Kiota/client/cmdlet/project/manifest generation on merged #3886, with43authenticatedoffline requests per Global/USGov memory-guarded proof. Six typedJSON actions, profiles/cache/session lifecycle, optional nativequeries and genuineNo/WhatIf pass. No PATCH or required query survives original shared suppressions. Both final profile source deltas are15generated blank lines only; clients/projects/locks are byte-identical. This clarifies the prior v1 boundary body's inaccurate reference to path-ID annotations; no such validation behavior changed. Preserve every prior commit without amendment. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
N/A (no linked issue).
Changes proposed in this pull request
Get-Mg...command, not a new ReadBack/PassThru/Refetch switch or hidden network action. The original implicit-GET header-retention objective is superseded.ReFetchBlock, GET-only required-query extraction/union and the mutation-group GET-query guard. Mutation commands require and bind only their own native queries; a sibling GET retains its own requirements when called explicitly. Preserve typed builders, complete composite path dictionaries, body/path parameter separation, generic/typed headers, profiles/cache, ShouldProcess, output metadata, error/cancellation and normal transport retry semantics.User direction and same-PR history
The user's exact direction was: "retrieving the updated object should be optional, the powershell sdk should not add this behavior. This should not cause a gate failure". The confirmed interpretation is removal of implicit GET; callers choose a separate explicit GET.
This is the same existing PR/branch, revised from header replay to removal of automatic read-back. Current head:
a5729b86cdb9f6b8fe28cce0f22d4fc88a59b3d2. Normal base remainspowershell-v3at4eb3ca3e1e21ca163337f59ebbcfb9d1820a920d(#3882). Previous merge7a6db8d1edc88a96c0b1907b2b79403acdd7b29aand headf8d18c1c9ceaa7e93ad34a02587485e515de21f8are preserved. User-directed behavior commitd3d05b4aa6f40ad490ab77ba74cb07951d012e1bis followed by the transport rename806ed7bc263e47c0d7d8142774c0ec587f0b00e6and the agreed test/script/document naming cleanup. All are additive coauthored commits; no rebase/amend/force push, closing or replacing this PR.Intentional behavior change: an Update command no longer reads a resource to manufacture output after 204. It does not declare GET-only
QueryView; PATCH-requiredQueryTenantIdremains mandatory and correctly encoded.Get-Mg... -QueryView ...still validates and binds that GET requirement independently. Incompatible PATCH/GET query types no longer create a mutation/refetch conflict. An unselected GET with unsupported query metadata does not constrain PATCH generation; a selected unsupported GET still fails its own existing validation.Ordinary, grouped root/alternate and composite workers each perform only their selected mutation. No-GET and PUT neighbors remain unchanged. Query-on-mutation restrictions for natural-ID groups, required QueryId, typed false/zero/array inputs and optional OData behavior are preserved. Existing unsupported PATCH-void emitter shapes are not expanded. GET availability or authorization cannot turn an already successful PATCH into an SDK retrieval failure.
Current naming cleanup and limited validation
At the user's request, current names now match the one-operation contract:
tools/Test-WrapperPatchOperations.ps1(formerlyTest-WrapperPatchRefetch.ps1).tools/WrapperGenerator.Tests/PatchOperationTests.cs, test classPatchOperationTests, shared fixturePatchOperationFixture.tools/WrapperGenerator/docs/patch-results.md, with updated README link and regression examples/filters.Only those three moves, symbol references, current documentation/examples and the direct temporary test-directory prefix change: four files, 13 insertions/13 deletions.
PatchOperationTransport.cs, its namespace/exclusion, fixture client name, production semantics and historical artifacts are unchanged. The obsolete retained-filename continuity paragraph is removed.Forced project build succeeds; the renamed script parses, new document link resolves, and tracked current source/docs contain no old filename/class/fixture references. 2/2 tests execute and pass using the new filter:
One fresh v1.0 Global real Kiota/compiled/NuGet-packed offline gate invokes
Test-WrapperPatchOperations.ps1andPatchOperationFixturethrough a new evidence-only queue runner:Exit 0: 25 checks, 12 binder checks, 20 genuine prompts, 25 captures = 19 PATCH + 3 PUT + 3 explicit GET (two successful reads, one separate 403). One-request PATCH204/200 semantics remain unchanged. Normal Authentication 64/64 hashes remain unchanged; fixture package SHA-256 is
DA684C81C108984DDC3A69A963D386A8D7F0D940A406A7BD143989DBCCAD5BF3. This is one new compile/capture gate, not a rerun of the full 17-build proof.New naming evidence lives under
patch-operation-names-20261105, with exact runner/source hashes, logs/TRX/exits/captures and package artifacts. The complete implementation proof below remains head-specific tod3d05b4aa6f40ad490ab77ba74cb07951d012e1b; historical commands retain the names used at execution and are not relabelled as new-head runs.Prior transport fixture rename (806ed7b)
At the user's request,
tools/WrapperGenerator.Tests/Fixtures/PatchRefetchTransport.csis renamed toPatchOperationTransport.cs, with namespacePatchOperationTransport. Only the owning harness's Add-Type path, CaptureHandler/ConfirmationHost type references and test project's Compile Remove path change. This is three files, five insertions/five deletions and a 99% file rename. No other PatchRefetch test/harness filenames or operation behavior change.The rename source builds successfully, the new project exclusion and PowerShell parsing pass, and 2/2 PatchRefetchTests pass:
One fresh real Kiota/compiled/NuGet-packed v1.0 Global fixture through the unchanged four-mutex queue uses the renamed Add-Type source/namespace and exits 0: 25 checks, 12 binder checks, 20 genuine prompts, 25 captures = 19 PATCH + 3 PUT + 3 explicit GET, zero live Graph. All 64 Authentication package hashes remain unchanged. NuGet fixture SHA-256:
145A8FEE97054F35386A89E87A3CB3795EEABA370887932F27C090A12D839C3F.Rename logs/TRX/exits/capture/source hashes are retained under the new
patch-operation-transport-rename-20261105root. The full 306-test / 17-build operation-semantics proof below remains fromd3d05b4aa6f40ad490ab77ba74cb07951d012e1b; it was not rerun or relabelled for this name-only commit.Operation-semantics source validation (implementation head)
.NET SDK 10.0.403; PowerShell 7.6.9/Core; isolated Kiota
1.36.1+fd3bf87790149b87f40f7eae1a5feb9016625943.Build passed; 306 passed, 0 failed: CompositeKeyTests 24, EmitterTests 17, MutationRouteTests 195, PatchRefetchTests 2, RequiredQueryTests 68. Tests require no emitted GET for mutation workers, preserve all composite constructor/key/PolicyId1/DeviceId1/body-path assertions, check independent PATCH/GET parameter types, preserve mandatory native query behavior, and prove grouped PATCH ignores its sibling GET's required query.
The operation tests and harness positively require no implicit retrieval. Their current names are
PatchOperationTests/Test-WrapperPatchOperations.ps1; the filter above records the historical name used for the implementation-head run. No obsolete header-refetch gate is waived or relabelled as new success.Full compiled operation-semantics proof (implementation head)
The full proof in this section ran on implementation head
d3d05b4aa6f40ad490ab77ba74cb07951d012e1b, after the forced nonincremental build. The evidence-only queue runner uses the same existing four generation mutex names and process-local Kiota parallelism 1; one profile at a time per gate. Its exact invocation shape is:The runner invokes
Test-WrapperPatchRefetch.ps1,Test-WrapperRequiredQuery.ps1andTest-WrapperRequiredDeleteQuery.ps1with fresh roots, the exact isolated Kiota executable and the accepted normal Authentication package first on process-local PSModulePath. The actual expanded commands, exits, raw logs and absolute paths are retained in the evidence handoff.Each main invocation captures 19 PATCHes, 3 PUTs and 3 caller-explicit GETs. Each accepted PATCH204 has exactly one PATCH, no output and no GET even while the terminal handler would reject any GET with 403. Each PATCH200 returns the actual generated Kiota response model with one request. Exact escaped paths, native tenantId query, typed body JSON, generic multiple/conditional headers, typed IfMatch, composite key dictionaries and independent body PolicyId1/DeviceId1 are asserted. WhatIf/genuine No send zero requests; Yes prompts exactly once. No retrieval switch is present.
After all mutations, two separate explicit GETs verify successful retrieval with mandatory QueryView, its own encoded
viewquery and caller-controlled headers. A third explicit GET deliberately fails 403 and surfaces a separate GraphRequestFailed error; the preceding successful PATCH result is unaffected. QueryView is absent from PATCH, QueryTenantId absent from GET, and missing/empty/null mutation and GET requirements reject before HTTP. This is new generated output, not an old implicit-GET fixture reclassified.The generalized family gate also now requires PATCH204 no output/one request, rejects GET-only QueryView on PATCH, and checks required QueryView on explicit GET. Required QueryId, scalar/formatted/native array/false/zero inputs, optional OData, pagination/delta isolation, reference/action/function/media and bodyless DELETE coverage still pass. The directly coupled
Test-WrapperAuthentication.ps1expectation is updated to PATCH204 no output/one request; its separate full SchemaExtensions Authentication lifecycle gate was not rerun here.All current captures follow real Connect-MgGraph, the in-memory test store and GraphHttpClientFactory token handler with a terminal offline handler after authentication. Global/USGov profile roots and session adapter reuse are verified while the shared client keeps the factory-default
https://graph.microsoft.com/v1.0/BaseAddress unchanged.The normally packaged adapted Authentication 2.41.2 is used, not stock Gallery or old 2.38.1. Physical nupkg SHA-256:
2FC09BFE6B70D313BC56DF8ADCCFB1976FB4E90A1898BF8A916B4B8B792898EB; all 64/64 package hashes remain unchanged. Normal wrappers have only three own DLLs and no RequiredAssemblies. Core/Kiota/RMS/UriTemplate/Multipart retain single identities in the accepted Authentication package/ALCs; no assembly injection, dependency preload, overlay or global installation/environment edit.Evidence and integration limits
New evidence root:
explicit-patch-results-20261105. Final current runs are underverified/, with nonzerotest-results/verified.trx, forced-build/test logs and exits, exact source/spec/harness snapshots and hashes, normal packages/unpacked manifests, captures and assembly contexts, Authentication before/after hashes, and a complete hashed artifact manifest. Exact absolute paths are handed to the coordinator. No scratch/generated fixture output or binary is committed.All earlier complete header-loss/refetch/query proofs, previous canonical heads and historical 2.38.1/RMS/#3878 artifact-only limitations remain preserved and explicitly historical. The user's new one-operation decision supersedes the former implicit-GET acceptance gate; no follow-up GET is now success, not failure.
No consumer/module configs/specs/generated trees or other owner branches were edited, and no full dependent-module generation/build is claimed. Consumers with old refetch-based assertions require planned reevaluation after normal integration, not speculative changes in this prerequisite. #3881 stays separate; optional-query #3897 is not implemented. No merge/approval/admin bypass, other PR closure or owner wakeup. Existing unrelated NU1903 YamlReader warning remains unchanged.
Other links