Skip to content

feat(ir): add typed builder for NuGetAuthenticate@1#1136

Merged
jamesadevine merged 1 commit into
mainfrom
feat/ir-nuget-authenticate-v1-9bcdc2de62d34f8a
Jun 21, 2026
Merged

feat(ir): add typed builder for NuGetAuthenticate@1#1136
jamesadevine merged 1 commit into
mainfrom
feat/ir-nuget-authenticate-v1-9bcdc2de62d34f8a

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Summary

Adds a typed builder struct for NuGetAuthenticate@1 to 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.rsnuget_authenticate_step(), used for supply-chain feed auth across all three pipeline jobs (Agent, Detection, SafeOutputs)
  • src/runtimes/dotnet/extension.rsnuget_authenticate_task_step(), used by the .NET runtime extension

This 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: new NuGetAuthenticate builder struct with:
    • nuget_service_connections(conn) — for cross-org/external feeds
    • force_reinstall_credential_provider(bool) — reinstall credential provider
    • workload_identity_service_connection(conn) — workload-identity federation auth
    • feed_url(url) — Azure Artifacts feed URL (paired with WIF connection)
    • with_display_name(name) — display name override
    • #[cfg(test)] mod tests — 6 unit tests
  • src/compile/ir/tasks/mod.rs: pub mod nuget_authenticate; declaration (alphabetical order)
  • src/compile/agentic_pipeline.rs: nuget_authenticate_step migrated from raw TaskStep::new to typed NuGetAuthenticate builder; import added
  • src/runtimes/dotnet/extension.rs: nuget_authenticate_task_step migrated from raw TaskStep::new to typed NuGetAuthenticate builder; import added

ADO Task Reference

Validation

  • cargo build --all-targets
  • cargo test (2091 tests pass)
  • cargo clippy --all-targets --all-features --workspace -- -D warnings

Created 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.com
  • spsprodweu4.vssps.visualstudio.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "spsprodeus21.vssps.visualstudio.com"
    - "spsprodweu4.vssps.visualstudio.com"

See Network Configuration for more information.

Generated by ADO Task IR Contributor · 713.9 AIC · ⌖ 30.5 AIC · ⊞ 38K ·

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 jamesadevine marked this pull request as ready for review June 21, 2026 09:46
@jamesadevine jamesadevine merged commit 1f8c23c into main Jun 21, 2026
@jamesadevine jamesadevine deleted the feat/ir-nuget-authenticate-v1-9bcdc2de62d34f8a branch June 21, 2026 09:46
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