Skip to content

Audit BusinessScenario shared directives for v3 (beta) - #3850

Merged
Ramses Sanchez-Hernandez (ramsessanchez) merged 12 commits into
powershell-v3from
ramsessanchez-businessscenario-v3-migration
Nov 12, 2026
Merged

Ramses Sanchez-Hernandez (ramsessanchez) merged 12 commits into
powershell-v3from
ramsessanchez-businessscenario-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

  • Preserve the zero-shared-directive audit: src\BusinessScenario\BusinessScenario.md was absent at original base 51d441eeb5f1afb57299a74564963f564baec930. Keep the standard tools\Templates\module.md require of src\readme.graph.md so occupying this shared path preserves legacy default wiring. The v3 builder does not consume this markdown. Module configuration and reviewed mappings stay empty: no invented renames, suppressions, groups, aliases, or operation mappings.
  • Revalidate beta only on normally merged Remove automatic GET after successful PATCH #3886 target 6475f3f5beb4908d39ea356db32bf1e0fd3273cb. All 11 supported PATCH workers obey the user-directed contract: 204 succeeds with no output and no automatic GET; 200 returns the actual typed model from one PATCH. Retrieval is caller-explicit GET, without PassThru/ReadBack/Refetch switches. Preserve native mutation inputs, path IDs, bodies, headers, ShouldProcess, output metadata, public names, and independent GET queries.
  • Retain the successful full queued beta Kiota/client/cmdlet/project/manifest generation + Release build and supplemental non-incremental compile. The actual combined generation delta is 11 PATCH readback removals plus 19 GET-template whitespace additions; client/projects/locks were regenerated unchanged. A subsequent probe-only runtime isolation correction adds actual post-import MockDataStore guards and reruns only the affected Global/USGov offline gates against the same normal compiled bins/head. No production/source/package fix, new build/TRX/generation commit, dependency copies/preloads, or other-module work.

Current identity, source scope, and profile

Same existing PR remains open, non-draft, base powershell-v3 at 6475f3f5beb4908d39ea356db32bf1e0fd3273cb, head ramsessanchez-businessscenario-v3-migration at 6707cbbbd2fcefd2df38fee7567afe9d00301f28. Prior code head f3ccf536b616dac8011acd853cfb552356c654e8. No rebase/amend/squash/force-push/PR merge or duplicate PR; original owner/history retained. The isolation correction changes session probe/evidence files only, not Git head.

Required beta: openApiDocs_KiotaCompat\beta\BusinessScenario.yml, Git blob d9e1ebc5e38e58e0c197a07f388cf942d729c9f0, SHA-256 D629C1A01807249D41640480D27BA12CF8D51FD4BA783B0DD3826289F524DD16; 23 paths / 51 operations (20 GET, 7 POST, 12 PATCH, 12 DELETE). Original compatible beta blob a983393bd3c39351c41be51b8a9c6cfe37f689c4 remains historical lineage. v1.0 excluded/unsupported for this module validation: compatible spec absent; no v1 module/service claim or fallback. Preserve wrapper\Beta casing and PS7/Core-only acceptance.

All profile-local readmes and src\readme.graph.md remain untouched/ignored. Parameter aliases/transforms and schema/response directives stay deferred and unimplemented; none existed in the absent shared source. Preserve existing optional standard OData aliases, authored shared/derived naming, ten pinned current operation IDs, three-setting GeneratorConfig, and separate explicit beta naming/suppression/service context. Zero authored variant groups; ordinary automatic list/item pairs remain unchanged. No legacy bridge/translation fields, #3881 fix, #3897 overlay, naming sweep, or unsupported-operation suppression.

Preserved additive history and complete Git scope

Commit Purpose
4f19e708e8 Original zero-shared-source audit/empty ledger/configuration annotation/tests.
62ceed45d7 Original combined beta Kiota/client/cmdlet generation.
b15d3124dd Original standard-template require compatibility fix.
bfa68e02bc Normal #3849 integration.
17c0a1c4f4 Removed-API correction, explicit beta naming/suppression, aligned ID/spec proof.
58647a0070 Post-3849 combined beta generation, archival model/client lock.
37302f23e6 Normal #3891 integration.
8c9e060967 Real-beta transport-profile emission assertions.
f3ccf536b6 Post-3891 beta generation: explicit beta adapters/project pruning.
4289b41fab201869bd8b303d230a09a5c5de76e1 Normal #3886 target merge.
f128792b4a040950bbb2c4cb3d4761a60ef26765 Own no-readback/native-query source assertions and related audit docs.
6707cbbbd2fcefd2df38fee7567afe9d00301f28 Separate full combined beta generation: 11 PATCH removals + 19 whitespace-only GET changes.

All new code commits include the required Copilot App co-author. Full local Git scope, including deletion/rename detection rather than a capped REST file list: 60 owned paths, 3 added, 0 deleted, 0 renamed, only BusinessScenario and its own test file. No bin/obj/DLL/PDB/nupkg/log/session artifact commits. No additional code commit or push for the memory-isolation follow-up.

Retained valid full-build/source/TRX evidence - NOT rerun

Original final evidence root:

C:\Users\ramsess\.copilot\session-state\e593cf81-5bf7-417a-98eb-e9bef1d0934b\files\post3886-6475-final\

Its raw proofs, handoff.json, source/generated hashes, and compiled outputs remain unchanged. The new handoff references their original absolute paths and SHA-256 hashes, not copies relabeled as fresh builds.

Setup for the retained full run and corrected runtime processes:

$env:PATH = 'C:\Users\ramsess\.copilot\session-state\871a5292-dc5b-423e-8083-5165b0006603\files\tools\kiota;' + $env:PATH
$env:KIOTA_Generation__MaxDegreeOfParallelism = '1'
$env:PSModulePath = 'C:\Users\ramsess\.copilot\session-state\4aa86cf9-d43c-4d2b-a4a3-aeaed01b8f29\files\authentication-v2-sync\final-source\modules;C:\Users\ramsess\OneDrive - Microsoft\Documents\PowerShell\Modules;C:\Program Files\PowerShell\Modules;C:\Program Files\PowerShell\7\Modules'
$evidence = 'C:\Users\ramsess\.copilot\session-state\e593cf81-5bf7-417a-98eb-e9bef1d0934b\files\post3886-6475-final'

Verified identities: .NET 10.0.403; isolated Kiota 1.36.1+fd3bf87790149b87f40f7eae1a5feb9016625943. Authentication 2.41.2 from exactly the accepted adapted final-source root, not gallery/old 2.38: complete 64/64 file hashes/no extra files, physical nupkg SHA-256 2FC09BFE6B70D313BC56DF8ADCCFB1976FB4E90A1898BF8A916B4B8B792898EB. Accepted package/source/loader/dependency closure unchanged; no manual DLL injection/shim/preload/global installation. Queue SHA-256 4A4478BCAA682E9628F361BEF299DFCFF5D785629666CC41F135F1F431A543E8.

Previously executed exact commands:

dotnet test .\tools\WrapperGenerator.Tests\WrapperGenerator.Tests.csproj --filter 'FullyQualifiedName~BusinessScenarioDirectiveMigrationTests|FullyQualifiedName~CmdletConfiguratorTests|FullyQualifiedName~NamingTests|FullyQualifiedName~RequiredQueryTests|FullyQualifiedName~PatchOperationTests' --logger 'trx;LogFileName=targeted.trx' --results-directory $evidence
.\tools\Get-WrapperDirectiveMigrationInventory.ps1 -Module BusinessScenario -FailOnUnresolved
& 'C:\Users\ramsess\.copilot\session-state\871a5292-dc5b-423e-8083-5165b0006603\files\Invoke-QueuedModuleBuild.ps1' -RepoRoot $PWD.Path -Module BusinessScenario -ApiVersion beta -Configuration Release
dotnet build .\src\BusinessScenario\wrapper\Beta\Microsoft.Graph.Wrapper.BusinessScenario.csproj -c Release --no-incremental --nologo -v minimal

Retained outcomes: actual nonempty TRX 169 executed / 169 passed / 0 failed / 0 not executed, including 15 own module cases. Real full-spec generation with derived data on/off pins 52 classes, 48 beta workers, four dispatchers, and all 11 one-operation PATCH workers. All 51 spec operations are unsuppressed. Query audit includes path-inherited and operation declarations: eight optional native OData names on GET, zero required queries and zero PATCH-native queries. Required-query/framework PATCH tests are included.

Ordinary strict exit 0 / PASS / actual pipeline rows 0, before and after generation, measured without consuming OutputPath. Retained strict-inventory.log and strict-exit.json; no claimed empty inventory JSON. Full unchanged four-mutex queue slot 2, exit 0 / OK / 52 cmdlets / 138.20 seconds, zero failed/NO-CMDLETS modules; no SkipKiota/GenerateOnly/NoCollisionData/fallback. Supplemental non-incremental compile exit 0 / 22.08 seconds / zero errors. None were rerun for the probe correction.

Previously executed compiled verification:

pwsh -NoProfile -NonInteractive -File (Join-Path $evidence 'Test-Compiled.ps1') -RepoRoot $PWD.Path -BuiltAfterUtc (Get-Content (Join-Path $evidence 'build-start-utc.txt'))

Retained exit 0 / PASS: 52 actual exports = 52 manifest exports; 52 GraphRoute attributes cover all 48 supported exact method/path identities; four list/item defaults/path-ID alternatives, eight neighbors, and all 11 PATCH metadata contracts. No GET-only input/new readback flag on PATCH; standard optional query types and Select/Expand/OrderBy aliases preserved. Manifest Auth floor2.41.2, no dependency RequiredAssemblies/preloads, exactly three owned DLLs. Original first compiled-probe failure (assigned rather than emitted route objects) and script/log are retained; only that session probe was corrected before the successful compiled run.

Corrected runtime isolation - NEW probe-only evidence

New root:

C:\Users\ramsess\.copilot\session-state\e593cf81-5bf7-417a-98eb-e9bef1d0934b\files\post3886-6475-memory-final\

Normal Authentication import in an additional runspace resets the shared GraphSession.DataStore to DiskDataStore. An initial helper call before later imports was insufficient. Earlier raw runtime logs/handoff are preserved unchanged and are not claimed as post-import-guarded memory proof. This observation alone does not establish actual credential/disk I/O. It is a probe-setup correction, not a shipping Authentication defect/fix.

The corrected scripts invoke the existing repository Set-MgTestDataStore helper AFTER the last normal import in the main runspace and after each additional confirmation-runspace import. They reflect the actual normal Authentication.Core GraphSession and assert/record:

Microsoft.Graph.Authentication.Test.Mocks.MockDataStore

Guards run before initial Connect, each scheduled HTTP operation and the real offline terminal, factory creation, WhatIf/No, request-context changes, disconnect, reconnect, and final cleanup logout. No production source, OnImport, provider, global setup, package or loader changes. No credential-store access/live OAuth/Graph is requested; the public Connect token is synthetic and memory-only, and token material is excluded from captures.

Only affected runtime gates were rerun, against the unchanged normal bins/head:

$runtimeEvidence = 'C:\Users\ramsess\.copilot\session-state\e593cf81-5bf7-417a-98eb-e9bef1d0934b\files\post3886-6475-memory-final'
pwsh -NoProfile -NonInteractive -File (Join-Path $runtimeEvidence 'Test-Transport.ps1') -RepoRoot $PWD.Path -Cloud Global
pwsh -NoProfile -NonInteractive -File (Join-Path $runtimeEvidence 'Test-Transport.ps1') -RepoRoot $PWD.Path -Cloud USGov

Corrected results: Global exit0/PASS; USGov exit0/PASS. Each cloud records 384 actual datastore observations, including 325 protected-stage checks all equal to MockDataStore. Each records 29 additional imports actually observing DiskDataStore before reset, followed by 29 post-helper Confirm guards with actual MockDataStore. Each of the 33 HTTP operations has a pre-operation guard and terminal guard; all 66 total HTTP captures include the actual MockDataStore type. Cleanup logout is included in the guarded evidence and command exit, not omitted after an early PASS label.

All existing substantive runtime gates pass again under those guards:

  • 33 real authenticated GraphHttpClientFactory HTTP requests per cloud; every generated URI uses /beta, correct Global/USGov host, and factory BaseAddress remains https://graph.microsoft.com/v1.0/ with no shared client mutation.
  • Four list/item default/ID paths, planner/count neighbors, typed POST nested/array/date JSON/result, typed PATCH/result, bodyless DELETE, typed getPlan/reaction action bodies/results.
  • All 11 PATCH-204 commands per cloud: one PATCH, zero output, zero GET with reads configured403. PATCH200 returns the actual typed model from one PATCH. Caller-explicit GET has independent headers/query/result and a separate explicit403 error. The earlier implicit-refetch header-loss requirement is user-superseded historical evidence, not a remaining failure or relabeled PASS.
  • All eight optional native query names/values ($top, $skip, $filter, $search, $count, $select, $expand, $orderby) round-trip correctly encoded, including reserved characters/Unicode; no Query prefix on wire. Required-query runtime cases N/A: this module has no such native operations.
  • Per cloud: 29 WhatIf cases =0HTTP; 29 genuinely declined Confirm cases =one prompt each/0HTTP/output; six invalid binders fail beforeHTTP. The post-import helper/actual-type checks cover every genuine No runspace and protect subsequent lifecycle/logout operations.
  • Public request-context change, disconnect/no-session rejection, reconnect and three actual factory clients pass; client/cloud/profile cache identity retained. Runtime-only v1-root cache checks are not a v1 module-support claim. Six natural single Core/Kiota/Json/RMS/URI identities resolve from the accepted package’s private Authentication context; no wrapper copies/preloads. Multipart remains owned by the checked Auth package.

Zero authored groups/no supported composite-PATCH/PUT/media additions are invented. These are scoped offline behavior proofs, not every Graph feature or tenant/service certification.

Unchanged baseline limits and hashes

The retained raw parity command was:

pwsh -NoProfile -NonInteractive -File .\tools\Compare-WrapperCmdletNames.ps1 -GeneratedPath .\src\BusinessScenario\wrapper\Beta\Cmdlets -OutLedger (Join-Path $evidence 'raw-beta-parity.csv')

Retained exit1: 52 baseline mismatches / 0 matches / 0 skipped legacy dispatchers, normal 31,200-row oracle. MgBusinessScenario... differs from MgBetaSolutionBusinessScenario..., plus getPlan/reaction verbs. No naming normalization/oracle edits or parity-pass claim; this unaffected comparison was not rerun for datastore correction.

The three alternate-key GET/PATCH/DELETE /solutions/businessScenarios(uniqueName='{uniqueName}') resource-call shapes remain unsupported baseline generator shapes, not suppressions or service-absence claims. All51specoperations unsuppressed; compiled exact coverage48supportedoperations. Existing NU1903/YamlReader, CS0618/CS0108 and Kiota discriminator warnings remain recorded. No PowerShell5.1/v1 module/live service claim.

Unchanged normal final outputs, rechecked before corrected runtime:

Artifact SHA-256
Module DLL 40A7B65A7C84164B3B6A172B9547E292A5205E18646C862431D6B4C2A7E8D255
Client DLL 1FE8E7F2384524543EE27E93FF99886952517095E61B1C2873C6F5EADB8A9EDB
Runtime DLL D9713B7AF2645491D31127F8E072A31C4CCDA8BA0229A4F30EDB825E40FDF1BB
Normal manifest 89FAB8AAE57B88A7B3190F152644F759D1C5527F9E49C4DDADDC133CAE064D2E

New canonical post3886-6475-memory-final\handoff.json keeps all original source/build/profile/PATCH/query/Auth64/PR acceptance fields and absolute old FULL/TRX/strict paths/hashes, plus new actual datastore proof and guarded runtime commands/results. New files include datastore-checks-Global.json/USGov.json, compiled-beta-Global.json/USGov.json, http-beta-*, patch204-*, safety-*, transport-result-*, transport-gates-*, assembly-contexts-*, transport-*.log/exit JSON, auth64-verification.json, unchanged-inputs.json, exact Test-Transport.ps1/OfflineHarness.cs/Commands.ps1, old-handoff/output/TRX hashes and the prior PR body. No original raw proof or old handoff was overwritten.

Original post3886-6475-final retains actual targeted.trx169, strict log0, full-beta.log138.2s, non-incremental22.08s, normal compiled proof52, full Git60-owned-path scope, original/current source/spec/tool identities, all original exit records and raw parity52. Older08/844672 evidence likewise remains historical/unchanged. No wrapper pack was requested/run; accepted physical Auth nupkg and normal module outputs are verified. No new PR/merge/source/build/test/generation/push for this correction.

Other links

Record the originally absent shared source, empty reviewed mappings, compatible beta spec evidence, and deferred scope without inventing overrides. Pin real beta operation identities and existing naming/suppression behavior.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Run the full compatible-beta Release pipeline with Kiota 1.36.1 and official Microsoft.Graph.Authentication 2.38.1. Both regenerated source trees, generated projects, and package locks remain unchanged after Git line-ending normalization; record the combined client and cmdlet generation lock refresh in this profile commit.

Build status OK with 52 discovered cmdlets; fresh manifest import exports 52/52 commands. Strict shared-directive inventory remains empty and all 12 module-specific real-beta regression cases pass. Existing beta oracle naming differences are unchanged and outside this zero-directive audit.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep the standard template require in the newly created shared audit path because Copy-ModuleTemplate leaves existing files untouched. Do not migrate or modify referenced global directives; the v3 wrapper builder does not use this markdown.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep beta as explicit derived-oracle context and refresh aligned compatible-spec identities and audit evidence.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Run full queued Kiota 1.36.1 and wrapper generation plus Release build on the post-3849 target. Capture current planner archival model fields and compatible-spec lock; cmdlet, project, and other lock outputs remain byte-identical after Git normalization.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…idation

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Assert full real-beta worker emission with derived data enabled and disabled, retaining all names, scopes, and v1 exclusion.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Full queued Kiota client, cmdlet and project generation plus Release manifest/build on normally merged 844672. Capture 48 explicit beta adapter calls and three-owned-DLL project pruning; client and generation locks are unchanged. Retain known unmerged generic-header PATCH refetch limitation in validation evidence.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
On normally merged3886, require no implicit GET across all11 supported PATCH workers, preserve beta/data contexts and all original shared audit scope, and check every native query declaration remains optional/GET-only.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Full queued Kiota/client/cmdlet/project/manifest generation and Release build on normally merged6475, followed by no-incremental compile. Delta removes readback from all11supported PATCH commands and captures19GETtemplate whitespace changes; client/projects/locks are regenerated unchanged.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@ramsessanchez
Ramses Sanchez-Hernandez (ramsessanchez) merged commit 8f97597 into powershell-v3 Nov 12, 2026
6 checks passed
@ramsessanchez
Ramses Sanchez-Hernandez (ramsessanchez) deleted the ramsessanchez-businessscenario-v3-migration branch November 12, 2026 23:57
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