feat(ir): add typed builder for NuGetAuthenticate@1#1136
Merged
jamesadevine merged 1 commit intoJun 21, 2026
Conversation
Add `nuget_authenticate::NuGetAuthenticate` builder struct to
`src/compile/ir/tasks/` and migrate both call sites that were
hand-crafting raw `TaskStep::new("NuGetAuthenticate@1", ...)` to
use the typed builder instead.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
jamesadevine
approved these changes
Jun 21, 2026
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.
Summary
Adds a typed builder struct for
NuGetAuthenticate@1to the ado-aw IR and migrates both stringly-typed call sites to use it.Motivation
Two places in the codebase hand-crafted
TaskStep::new("NuGetAuthenticate@1", ...)with raw string input keys:src/compile/agentic_pipeline.rs—nuget_authenticate_step(), used for supply-chain feed auth across all three pipeline jobs (Agent, Detection, SafeOutputs)src/runtimes/dotnet/extension.rs—nuget_authenticate_task_step(), used by the .NET runtime extensionThis PR introduces a typed builder so required inputs are positional (none here — all inputs are optional), optional inputs and their constrained values are type-checked, and call sites stop using stringly-typed keys.
Changes
src/compile/ir/tasks/nuget_authenticate.rs: newNuGetAuthenticatebuilder struct with:nuget_service_connections(conn)— for cross-org/external feedsforce_reinstall_credential_provider(bool)— reinstall credential providerworkload_identity_service_connection(conn)— workload-identity federation authfeed_url(url)— Azure Artifacts feed URL (paired with WIF connection)with_display_name(name)— display name override#[cfg(test)] mod tests— 6 unit testssrc/compile/ir/tasks/mod.rs:pub mod nuget_authenticate;declaration (alphabetical order)src/compile/agentic_pipeline.rs:nuget_authenticate_stepmigrated from rawTaskStep::newto typedNuGetAuthenticatebuilder; import addedsrc/runtimes/dotnet/extension.rs:nuget_authenticate_task_stepmigrated from rawTaskStep::newto typedNuGetAuthenticatebuilder; import addedADO Task Reference
NuGetAuthenticate@1nuGetServiceConnections,forceReinstallCredentialProvider,workloadIdentityServiceConnection,feedUrlValidation
cargo build --all-targetscargo test(2091 tests pass)cargo clippy --all-targets --all-features --workspace -- -D warningsCreated by the ado-task-ir-contributor workflow.
Warning
Firewall blocked 2 domains
The following domains were blocked by the firewall during workflow execution:
spsprodeus21.vssps.visualstudio.comspsprodweu4.vssps.visualstudio.comSee Network Configuration for more information.