feat(ir): add typed builder for PublishCodeCoverageResults@2#1131
Merged
jamesadevine merged 1 commit intoJun 21, 2026
Merged
Conversation
Adds PublishCodeCoverageResults builder struct to src/compile/ir/tasks/ with one required input (summaryFileLocation) and two optional inputs (pathToSources, failIfCoverageEmpty). Includes four unit tests. 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
PublishCodeCoverageResults@2to the ado-aw IR.Motivation
Previously, any code that needed to emit this ADO task step had to hand-craft
TaskStep::new(...)with raw string input keys. This PR introduces a typedbuilder struct (
new(<required>)+ typed optional setters +into_step()) sothe required input is positional, optional inputs are type-checked, and call
sites stop using stringly-typed keys.
Changes
src/compile/ir/tasks/publish_code_coverage_results.rs: newPublishCodeCoverageResultsbuilder struct and its#[cfg(test)] mod tests(4 unit tests)
src/compile/ir/tasks/mod.rs:pub mod publish_code_coverage_results;declaration (alphabetical order, between
publish_build_artifactsandpublish_pipeline_artifact)ADO Task Reference
PublishCodeCoverageResults@2summaryFileLocation(minimatch glob path to coverage summary XML)pathToSources— absolute path to source files, needed for formats withoutembedded absolute paths (e.g. JaCoCo for Java)
failIfCoverageEmpty— fail the step when no coverage data was produced(bool, default
false)Validation
cargo build --all-targetscargo test 'tasks::publish_code_coverage_results'— 4 tests passcargo clippy --all-targets --all-features --workspace -- -D warningsCreated by the ado-task-ir-contributor workflow.