Skip to content

Fix Kiota PostPath typed navigation without renaming operation types - #3881

Open
Ramses Sanchez-Hernandez (ramsessanchez) wants to merge 3 commits into
powershell-v3from
ramsessanchez-kiota-reserved-member-mapping
Open

Ramses Sanchez-Hernandez (ramsessanchez) wants to merge 3 commits into
powershell-v3from
ramsessanchez-kiota-reserved-member-mapping

Conversation

@ramsessanchez

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

Copy link
Copy Markdown
Contributor

Changes proposed in this pull request

  • Extend the existing central, property-only AvoidRequestMethodClash mapping from the observed Delete -> DeletePath to include Post -> PostPath. Kiota 1.36.1 emits PostPath for Financials beta's literal journal, purchase-invoice and sales-invoice /post actions; the uncorrected wrappers predict .Post.PostAsync and fail with three CS1061 errors.
  • Preserve operation parsing, namespaces, builder/body CLR types, public nouns, paths, methods, parameters and default-route behavior. Qualified microsoft.graph.post, parameterized post(value='{value}'), and postAndSend are unchanged; zero-argument post() and intermediate resource /post properties are escaped. The four-file scope remains naming, regression tests and the existing edge-case catalog only. No module configurations, suppressions, specs, generated files, Authentication, runtime, templates, packaging, reflection or new API flags are changed relative to the actual target.
  • Retain 13 focused regression cases, including all three operations read from the production Financials beta spec. After normal integration of Sync current v2 Authentication into powershell-v3 #3891, add one assertion that the emitted beta adapter context remains intact. The original mapping commit and PR history are preserved.

Normally merged target and current evidence

The same branch/PR now normally includes actual powershell-v3 target 844672d7c2238f6b29a208f9ba73fe28e9e29cef (#3891). Normal merge commit: 2f034c7e7704ebba7351ed4dc058146d1cdebd2f; additive test-only assertion: 9585b766e7881f4ac91342f5004dce26509aa10b (current published head). Original mapping commit: c28dff9470df31f0b808382ab24164a78428c872. No amend, rebase, force push or prerequisite overlay.

Production input remains openApiDocs_KiotaCompat\beta\Financials.yml, Git blob 82f1d616cff0416dbd226e02268ebdde6fded7b1. Toolchain: .NET SDK 10.0.403, PowerShell 7.6.9/Core only, Kiota 1.36.1+fd3bf87790149b87f40f7eae1a5feb9016625943; process-local Kiota parallelism is 1.

New proof root (old evidence is retained separately):

$proof = 'C:\Users\ramsess\.copilot\session-state\494a3f8e-c308-4d4b-a05c-1ddb752f40fe\files\post-3891-normal-844672'
$kiota = 'C:\Users\ramsess\.copilot\session-state\871a5292-dc5b-423e-8083-5165b0006603\files\tools\kiota\kiota.exe'
$auth = 'C:\Users\ramsess\.copilot\session-state\4aa86cf9-d43c-4d2b-a4a3-aeaed01b8f29\files\authentication-v2-sync\final-source\modules'

The first process-local PSModulePath entry is the exact locally packaged, adapted Authentication 2.41.2 root above, followed by the existing Documents/Program Files PowerShell module paths. Fresh PS7 imports verify its location/version and all 64 original package SHA256s. Another 118 shipping Authentication source hashes match the package producer evidence against our normally merged source. This is not stock gallery 2.41.2 or old 2.38.1. Current target Authentication/runtime/profile-aware generator/template code is preserved; no RMS wrapper retention/preload, dependency copies or old candidate DLL injection.

Focused test results — explicit baseline exception

dotnet test tools\WrapperGenerator.Tests\WrapperGenerator.Tests.csproj --configuration Release --no-restore --filter 'FullyQualifiedName~ReservedNavigationTests|FullyQualifiedName~NamingTests|FullyQualifiedName~ActionFunctionTests|FullyQualifiedName~GenerationServiceRegressionTests|FullyQualifiedName~CompositeKeyTests|FullyQualifiedName~EmitterTests|FullyQualifiedName~MultiRouteTests|FullyQualifiedName~MutationRouteTests|FullyQualifiedName~CmdletConfiguratorTests' --logger 'trx;LogFileName=focused-tests.trx' --results-directory "$proof\tests" --verbosity quiet

Result: 459 executed: 458 passed, 1 failed, 0 skipped; exit 1. MultiRouteTests.SharedVariantsEmitIdenticalSourcesWhenOnlyTheRunProfileChanges still asserts full source equality at line 266. #3891 intentionally emits GetRequestAdapter("v1.0") versus GetRequestAdapter("beta"), so that assertion fails. The same exact failure was reproduced separately on an untouched Git archive of actual 844672, without this PostPath mapping:

dotnet test "$proof\normal-target\tools\WrapperGenerator.Tests\WrapperGenerator.Tests.csproj" -c Release --filter 'FullyQualifiedName~SharedVariantsEmitIdenticalSourcesWhenOnlyTheRunProfileChanges' --logger 'trx;LogFileName=target-profile-baseline.trx' --results-directory "$proof\tests" --verbosity quiet

Result: 1 executed, 1 failed; exit 1. Original logs/TRX are retained. The coordinator assigned that stale test to a separate shared test-only follow-up; it is not copied into this PR.

dotnet test tools\WrapperGenerator.Tests\WrapperGenerator.Tests.csproj --configuration Release --no-restore --filter '(FullyQualifiedName~ReservedNavigationTests|FullyQualifiedName~NamingTests|FullyQualifiedName~ActionFunctionTests|FullyQualifiedName~GenerationServiceRegressionTests|FullyQualifiedName~CompositeKeyTests|FullyQualifiedName~EmitterTests|FullyQualifiedName~MultiRouteTests|FullyQualifiedName~MutationRouteTests|FullyQualifiedName~CmdletConfiguratorTests)&FullyQualifiedName!~SharedVariantsEmitIdenticalSourcesWhenOnlyTheRunProfileChanges' --logger 'trx;LogFileName=focused-scope-tests.trx' --results-directory "$proof\tests" --verbosity quiet

Result with only that exact baseline test excluded: 458 passed, 0 failed, 0 skipped; exit 0. This is not claimed as a passing unfiltered/full suite. The existing NU1903 YamlReader warning is unchanged.

Actual Kiota typed compilation and request-information gates

& "$proof\Invoke-QueuedReservedMemberProof.ps1" -RepoRoot $PWD.Path -KiotaPath $kiota -AuthenticationModules $auth

Result: exit 0. Bounded fixture work acquires/releases one of the exact existing four shared generation mutexes, with one Kiota operation stream at a time; the parent's full-module queue script is unchanged. commands-results.json records every exact child command, arguments, raw log, expected/actual exit and elapsed time.

The baseline generator is built from an untouched Git archive of actual 844672, not the old 08e409 executable. Both generators use the same three actual production path filters:

/financials/companies/{company-id}/journals/{journal-id}/post
/financials/companies/{company-id}/purchaseInvoices/{purchaseInvoice-id}/post
/financials/companies/{company-id}/salesInvoices/{salesInvoice-id}/post

Generated builders and wrappers compile together using the unchanged current client/module templates and normally merged Runtime/Authentication projects, in Release netstandard2.0:

Current-target gate Result
Actual Financials subset, uncorrected target generator Exactly 3 distinct CS1061 errors; exit 1; 0 warnings; build-reported 11.61 seconds
Same subset with this PostPath mapping Exit 0; 0 errors/warnings; build-reported 5.54 seconds
Seven-operation actual Kiota neighbor fixture + generated wrappers Exit 0; 0 errors/warnings; build-reported 18.85 seconds
Three Financials + seven neighbor typed RequestInformation checks Both processes exit 0; 10 offline assertions

All 17 Kiota C# source identities are reverified SHA256-identical before/after and against the historical 17-source capture, excluding compiler bin/obj files. Each Financials wrapper changes only .Post.PostAsync( to .PostPath.PostAsync(; both baseline and corrected wrappers preserve GetRequestAdapter("beta"). Generated C# is never hand-edited.

Neighbors cover PostPath/PostPostRequestBody, existing DeletePath/DeletePostRequestBody, qualified operation/body namespace, postAndSend, zero-argument function, parameterized function constructor/value binding, and intermediate resource navigation. The offline request-information processes verify exact URLs, methods, IDs/function values and typed body JSON; they send no HTTP.

Fresh compiled manifest/type-wire gates:

$env:PSModulePath = "$auth;C:\Users\ramsess\OneDrive - Microsoft\Documents\PowerShell\Modules;C:\Program Files\PowerShell\Modules;C:\Program Files\PowerShell\7\Modules"
pwsh -NoProfile -NonInteractive -File "$proof\Test-CompiledTypeWire.ps1" -Fixture financials -AuthenticationModules $auth
pwsh -NoProfile -NonInteractive -File "$proof\Test-CompiledTypeWire.ps1" -Fixture neighbors -AuthenticationModules $auth

Results: both exit 0. Fresh manifests require Authentication 2.41.2, do not preload dependencies, and import exactly 3 and 7 cmdlets respectively. Both bins carry only their three owned DLLs. All ten compiled public names/GraphRoute methods/paths are asserted; seven mutation WhatIf calls preserve the no-session/no-HTTP guard. Neighbor body CLR contracts resolve to the single Kiota identity owned by the exact Authentication package. Exact assembly paths/load contexts and binary/manifest hashes are retained.

Proof limits: this is current-target bounded framework evidence, not a full Financials module generation/build or a candidate Financials migration. Its unmerged natural-ID configuration is not included or stacked. Full Financials consumer validation remains its owner's work after actual integration of this prerequisite. RequestInformation and WhatIf checks are not claimed as authenticated HTTP transport/mutation acceptance. No live Graph calls. No #3878/#3882/#3886 overlays or other-owner modifications.

Historical evidence: the original 08e409a6aa isolated proof (457 passing cases and before/after compilation) remains under the parent files folder and is not relabeled as new target evidence. attempt-1 retains the new proof's first raw run and a harness-only OrderedDictionary sorting comparison failure; the corrected path/SHA256 comparison verified identical inputs. No source or generated-C# repair was used to make that comparison pass.

Other links

  • Support compatible natural-ID operation variants #3849 (original merged API) and Sync current v2 Authentication into powershell-v3 #3891 (current normally merged Authentication/profile target)
  • Kiota alignment edge-case catalog
  • Current retained evidence under $proof: artifact-index.json, commands-results.json, verification-summary.json, source-input-hashes.json, authentication-shipping-source-hashes.json, authentication-package-hashes.json, authentication-import.json, financials-client-before-hashes.json, financials-client-after-hashes.json, all raw .log/.exit.txt files, both compiled type-wire JSONs, and tests\focused-tests.trx, tests\focused-scope-tests.trx, tests\target-profile-baseline.trx. Fixture scripts/sources, untouched baseline snapshot, actual generated clients/wrappers/templates-derived projects, compiled outputs and historical attempts are preserved in this named proof folder.

Extend the observed request-method property escape without changing operation namespaces, body types or public cmdlet names. Pin actual Financials beta paths and typed navigation neighbors.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Refresh existing typed PostPath prerequisite onto 844672d without changing its mapping scope.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep the normally merged Authentication 2.41.2 profile-aware adapter call while asserting the bounded typed navigation correction. No production mapping, namespace, body or public noun changes.

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