Repository navigation
Enable strict source-aware cmdlet directive migrations - #3832
Open
Ramses Sanchez-Hernandez (ramsessanchez) wants to merge 6 commits into
Open
Ramses Sanchez-Hernandez (ramsessanchez) wants to merge 6 commits into
Ramses Sanchez-Hernandez (ramsessanchez) wants to merge 6 commits into
Conversation
…ation Inventory configured modules and effective shared/profile sources; validate reviewed rename and suppression mappings with portable source/spec identities. Add scoped curated verbs and precedence regressions, reconcile historical Compliance absences, and require fresh full generation plus compilation before module publication. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 259a08a8-ec49-4555-8a08-4e6a7249ef13
Ramses Sanchez-Hernandez (ramsessanchez)
requested a review
from a team
as a code owner
October 20, 2026 23:53
…able paths Include Authentication.Core and imported Repo.props inputs, exclude bin/obj with either separator on all gate source scans, and pin dependency changes and output exclusions with focused regression fixtures. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 259a08a8-ec49-4555-8a08-4e6a7249ef13
…tions Decode actual YAML path scalars without misattributing alternate-key operations. Pin complete original selector evidence and exact current targets, reject false absences and arbitrary translations, and verify only proven terminal Graph action/function qualification changes. Add real module regressions and document sourceSpec plus repository-built authentication prerequisites. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 259a08a8-ec49-4555-8a08-4e6a7249ef13
Preserve exact method/type identities while allowing the proven terminal microsoft.graph.Type to graph.Type alias only when both pinned specs declare the same schema. Cover all CrossDevice GraphOPre candidates, reject unsafe type/method/schema changes, and correct Windows child-module staging guidance. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 259a08a8-ec49-4555-8a08-4e6a7249ef13
Add optional canonical Entry.Module and GeneratorConfig.Module identities plus --module, pass actual module context through builders and coverage callers, and prefer scoped names over legacy globals without changing unscoped defaults. Fail ambiguous missing context, scope the Compliance pilot, and cover nine cross-module route overlaps, profiles, renames, precedence, CLI flow and generated output. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 259a08a8-ec49-4555-8a08-4e6a7249ef13
Assert unresolved candidate behavior against the synthetic Widget ledger instead of requiring production Compliance to remain incomplete or Calendar to retain candidates. Preserve strict rejection, reviewed completion, profile, neighbor and real absence coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 259a08a8-ec49-4555-8a08-4e6a7249ef13
This branch has not been deployed
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.
No linked issue; this is the approved shared prerequisite for independent module directive-migration PRs.
Changes proposed in this pull request
Framework-only prerequisite based on
b16f02829c, targeting powershell-v3. No module-generated trees are included. Missing-input exclusions and unrelated generator issues are unchanged. This does not mark any module's inherited directive inventory complete and does not authorize merges.Validation
Commands ran from this isolated worktree. Evidence is retained outside the repository in the session artifact directory.
.\tools\Test-WrapperDirectiveMigrationInventory.ps1dotnet test .\tools\WrapperGenerator.Tests --configuration Release --nologo -v minimal.\tools\Test-WrapperPublicationGate.ps1.\tools\Test-WrapperPublication.ps1 -Module SchemaExtensions -Configuration Release -ResultPath 'C:\Users\ramsess\.copilot\session-state\259a08a8-ec49-4555-8a08-4e6a7249ef13\files\schemaextensions-publication.json'.\tools\Compare-WrapperCmdletNames.ps1 -GeneratedPath .\src\SchemaExtensions\wrapper\v1.0\Cmdlets -OutLedger 'C:\Users\ramsess\.copilot\session-state\259a08a8-ec49-4555-8a08-4e6a7249ef13\files\schemaextensions-parity-v1.csv'.\tools\Compare-WrapperCmdletNames.ps1 -GeneratedPath .\src\SchemaExtensions\wrapper\beta\Cmdlets -OutLedger 'C:\Users\ramsess\.copilot\session-state\259a08a8-ec49-4555-8a08-4e6a7249ef13\files\schemaextensions-parity-beta.csv'git --no-pager diff --checkand staged diff checkThe publication command invokes
Build-WrapperModule.ps1with explicit-ApiVersion v1.0and-ApiVersion beta,-Configuration Release -StrictPublication, and separate JSON result paths. Pilot sources/binaries and per-profile logs/results are preserved in session artifacts, not this PR. Packaging, live Graph calls, and per-module migration completion are not claimed. Strict inventory still correctly rejects unreviewed inherited selectors; reviewed absence is not a substitute for missing module input.Initial source-only compatibility evidence (historical)
The coordinator's cross-module regression comparison passed for all 38 available v1.0 modules against pristine
b16f02829c: 12,371 generated*.g.csfiles before and after, byte-for-byte identical, zero added/removed/changed files, and zero generation failures. This verifies default curated/derived precedence compatibility beyond the unit tests. This was WrapperGenerator source generation only, not full Kiota generation or module compilation, and does not substitute for any module's dual-profile publication gate.The tested generator snapshot's SHA-256 is
F1C23A896BFB74A82D1E0E6DB163B27F4C5D14D44933F316A71BB5B06E613FFB. Results and snapshot provenance are retained atC:\Users\ramsess\.copilot\session-state\e8b3909a-90be-4624-8e87-8f0e072ec770\files\framework-v1-regression\results.jsonandfiles\framework-generator-snapshot\snapshot-provenance.jsonin that same coordinator session. The prerequisite session independently checked all 38 result records and the snapshot assembly identity before adding this evidence.Publication gate review follow-up
New commit
09892b62c3a7bb4ddfa614c0efeb3173e89cfa9fincludes the actual Authentication project dependency, Authentication.Core, plus its importedRepo.props, in the input fingerprint. A shared separator-neutral predicate now excludes compilerbin/objartifacts consistently in the generator, curated-config, runtime, authentication, Authentication.Core, and generated-client source scans..\tools\Test-WrapperPublicationGate.ps1— Passed after the fixes. Focused tests prove that Core source/project and imported props changes invalidate the fingerprint; compiler output does not; Windows, Unix, and mixed-separator paths are filtered correctly; and stale compiler-generated clientobjsources are not mistaken for stale generated API sources..\tools\Test-WrapperPublication.ps1 -Module SchemaExtensions -Configuration Release -ResultPath 'C:\Users\ramsess\.copilot\session-state\259a08a8-ec49-4555-8a08-4e6a7249ef13\files\schemaextensions-publication-review.json'— Passed after the fixes: fresh full Kiota + WrapperGenerator + Release compilation for v1.0 and beta, each 7 emitted / 7 compiled cmdlets, stable dependency-inclusive input fingerprint, and fresh required artifacts. Profile build times: 99.0s / 67.8s. This full pilot ran on Windows; the path-style fixture checks are not a claim of a full Linux build.Pilot output was again preserved outside the repository and restored to pristine originals before the new commit. No module-generated tree changes or unrelated generator changes were introduced. The all-38 source-only comparison remains applicable: this follow-up changes publication tooling/tests/documentation, not generator naming or emission code.
Inventory identity and reviewed translation follow-up
New commit
cdce7fc80d9a72c9ccb9e291bd38b0259a58d994fixes the two module-discovered inventory gaps without changing C# generation, specifications, module configurations, or generated trees:sourceSpec: { specPath, specSha256, operations: [{ method, path, operationId }] }evidence to the existing ledger for operation-ID suppressions and the existing literal Graph[BWAFOR]Pre rename rules. Pin the canonical checked-in AutoRest counterpart, canonical UTF-8/LF hash, and the complete exact original selector candidate set. Existingoperationspins exact current targets; no arbitrary replacement regex or new configurator is introduced. Reviewed source/current identities are mandatory. Reject stale hashes, missing/duplicate/unmatched originals or targets, arbitrary routes and false absence. Genuinely removed source routes require exact originalabsentOperationsidentities with per-entry evidence.microsoft.graph.spelling of a POST action or GET function when both pinned specs declare the same operation type. At this commit, type-cast aliases were not accepted; the narrowly verified follow-up below adds that separate case. Navigation, intermediate namespace segments, call names and argument syntax are not relaxed. Inventory accurately includes alternate-key operations that the generator does not currently emit; generator support is unchanged.PSModulePath, rather than an incompatible installed release. No builder expansion or global installation is needed..\tools\Test-WrapperDirectiveSourceTranslation.ps1.\tools\Test-WrapperDirectiveMigrationInventory.ps1git --no-pager diff --checkandgit --no-pager diff --cached --checkThis inventory-only follow-up does not rerun the C# suite or the full module build pair because neither C# nor publication/build tooling changed. The earlier 205/205 tests, dual-profile SchemaExtensions build evidence, fingerprint fixes, and all-38-module source-only compatibility evidence are retained, not recharacterized as new compilation results. Review-candidate JSON and test logs are preserved at
C:\Users\ramsess\.copilot\session-state\259a08a8-ec49-4555-8a08-4e6a7249ef13\files\directive-translation-real-candidates.json,directive-source-translation.log, anddirective-inventory-translation.login that same directory. Those candidates do not claim any module migration is complete.Final same-type cast and module-isolation follow-ups
Commit
3931c701537991ab229d63211bf92b8a1330bacaadds only the proven terminalmicrosoft.graph.<Type>tograph.<Type>cast alias when both pinned specifications declare the exact same case-sensitivemicrosoft.graph.<Type>schema. HTTP method, type and fixed prefix remain identical; action/function operations cannot use this cast rule. Tests cover all 12 original CrossDevice GraphOPre candidates, including the 8 existing typed-cast counterparts, and reject changed method/type/case/namespace or missing schema evidence. No existing casts are relabeled absent. The ledger schema is unchanged.Commit
2417a842daad327aa4f642660d8c354e11d5d7beisolates curated module-owned rules using the actual configured identity, not a collapsed client namespace or caller path:Entry(..., ApiVersion: "beta", Module: "Devices.ServiceAnnouncement")andGeneratorConfig(..., Module: "Devices.ServiceAnnouncement"); standalone CLI--module Devices.ServiceAnnouncement. Every new module migration entry must specify its exact owner, including dispositions of inherited shared directives. Existing unscoped rules remain global for compatibility.config\ModulesMapping.jsoncand rejects unknown, collapsed or incorrectly cased module identities. Both builder invocation paths and coverage tools pass the actual module. An applicable scoped rule without module context fails visibly.PSModulePath, then assert actual fresh-child resolution. Truncating the inherited path can cause startup reinsertion of installed modules ahead of the stage. The coordinator withdrew the extra Authentication child-API request after actual-origin evidence; no new import option, global module change or fallback was added.dotnet test .\tools\WrapperGenerator.Tests --configuration Release --no-restore --nologo -v minimal.\tools\Test-WrapperDirectiveMigrationInventory.ps1.\tools\Test-WrapperPublicationGate.ps1.\tools\Test-WrapperPublication.ps1 -Module SchemaExtensions -Configuration Release -ResultPath 'C:\Users\ramsess\.copilot\session-state\259a08a8-ec49-4555-8a08-4e6a7249ef13\files\schemaextensions-publication-module-scope-final.json'.\tools\Compare-WrapperCmdletNames.ps1 -GeneratedPath '<session-files>\schemaextensions-module-scope-final\v1.0\Cmdlets' -OutLedger '<session-files>\schemaextensions-parity-module-scope-v1.csv'.\tools\Compare-WrapperCmdletNames.ps1 -GeneratedPath '<session-files>\schemaextensions-module-scope-final\Beta\Cmdlets' -OutLedger '<session-files>\schemaextensions-parity-module-scope-beta.csv'pwsh -NoProfile -NonInteractive -EncodedCommandcompiled-import origin probes for both profilesgit --no-pager diff --checkandgit --no-pager diff --cached --check*.g.csfiles, byte-identical; zero added, removed, changed or failed. Every invocation passes its actual configured--module, independently recovered original client namespace and normal collision enforcement. Frozen generator SHA-256 before/after:28C15FC72E696B7C8B505D80DA3F2BA9F0FA4F2DBB978B0760DB636BF7B23A0C. Source generation only, not Kiota generation or compilation/publication.<session-files>in the parity commands isC:\Users\ramsess\.copilot\session-state\259a08a8-ec49-4555-8a08-4e6a7249ef13\files. Final logs/evidence there includewrapper-tests-module-scope.log,directive-inventory-module-scope.log,schemaextensions-publication-module-scope-final.jsonand its per-profile JSON/logs,schemaextensions-compiled-origin-v1.0.json,schemaextensions-compiled-origin-beta.json, andschemaextensions-name-baseline-module-scope.json. Complete final generated sources/binaries are preserved inschemaextensions-module-scope-final, outside the repository. The frozen generator and real input hashes are inframework-module-scope-snapshot\snapshot-provenance.json. The earlier 205-test and initial 38-module comparison results are historical and are not substituted for revalidation of changed C#. Each later module must still satisfy its own reviewed ledger and full dual-profile generation/compilation gates. No merge is authorized.The coordinator's exact final source-comparison command completed with exit 0:
Results and provenance are retained in that result directory as
results.jsonandprovenance.json, with per-module logs/output alongside. Choose a new result directory to reproduce the command without overwriting evidence. The prerequisite session independently verified all 38 result records, the exact available configured roster and module contexts, each current spec hash, all zero-difference/exit-code fields and the frozen assembly identity. Its check summary is<session-files>\module-scoped-v1-regression-verified.json. This comparison is explicitly source-only, not module compilation or publication, and does not replace either profile's full gate.Migration-safe inventory fixture follow-up
Final test-only commit
e7a0cf5fb4ee027fbf7d8d1afa7cae64f58ad40bremoves the assumptions that real Compliance must remain incomplete and real Calendar must retain unreviewed candidates. Successfully migrating either module must not break the shared regression suite. The existing synthetic Widget fixture now explicitly assertsImplementation = Candidate, still rejects strict unreviewed completion, and then passes after a complete reviewed ledger is supplied. Production roster, source/profile, neighbor and true Compliance absence checks remain..\tools\Test-WrapperDirectiveMigrationInventory.ps1— Passed: all 44 modules and the complete integrated fixture suite, 269.5s. Log:<session-files>\directive-inventory-migration-safe.log.DA4DB50D463E90357D84895D0A8CFB42F607FEE2E2A3B142FE299B7DADFCBD71). Evidence:<session-files>\migration-safe-fixture-inputs-verified.json. The 235-test C# result, new 38-module source comparison and full dual-profile pilot therefore still cover the final generator/build implementation.Other links