Skip to content

Address auth ALC review comments#3635

Open
PrzemyslawKlys wants to merge 1 commit into
microsoftgraph:fixauth-module-assembly-loadingfrom
PrzemyslawKlys:codex/auth-alc-test-flakiness
Open

Address auth ALC review comments#3635
PrzemyslawKlys wants to merge 1 commit into
microsoftgraph:fixauth-module-assembly-loadingfrom
PrzemyslawKlys:codex/auth-alc-test-flakiness

Conversation

@PrzemyslawKlys
Copy link
Copy Markdown

@PrzemyslawKlys PrzemyslawKlys commented Jun 5, 2026

Changes proposed in this pull request

  • Guard assemblyName.Name before using it in the managed ALC resolver.
  • Use Import-Module -LiteralPath for the Desktop/no-ALC fallback path.
  • Relax the worker-thread dependency resolution test so it does not assume Azure.Core is absent from AssemblyLoadContext.Default.

Why

This addresses the inline Copilot review comments from #3633 and the earlier test flakiness concern from #3632.

The production resolver should treat a missing assembly name as an ordinary resolution miss and return null. The Desktop fallback should import the exact DLL path instead of allowing wildcard interpretation. The test only needs to prove that the dependency resolved by the worker thread lands in the same non-default Graph authentication ALC; it should not fail merely because another test loaded Azure.Core in the default context.

Validation

  • pwsh -NoProfile -Command 'Invoke-Pester .\src\Authentication\Authentication\test\Microsoft.Graph.Authentication.Tests.ps1 -Output Detailed'
    • 8 tests passed
  • PowerShell parser validation for Microsoft.Graph.Authentication.psm1
  • git diff --check

Other links

@PrzemyslawKlys PrzemyslawKlys requested a review from a team as a code owner June 5, 2026 06:26
@PrzemyslawKlys PrzemyslawKlys force-pushed the codex/auth-alc-test-flakiness branch from cd5a7e7 to 0e5d653 Compare June 5, 2026 06:27
@PrzemyslawKlys PrzemyslawKlys changed the title Relax isolated dependency test assumption Address auth ALC review comments Jun 5, 2026
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