Skip to content

fix(cargo-wdk): update WDK build number range to skip InfVerif when building sample class drivers#679

Open
svasista-ms wants to merge 9 commits into
microsoft:mainfrom
svasista-ms:fix/infverif-sample-flag-range
Open

fix(cargo-wdk): update WDK build number range to skip InfVerif when building sample class drivers#679
svasista-ms wants to merge 9 commits into
microsoft:mainfrom
svasista-ms:fix/infverif-sample-flag-range

Conversation

@svasista-ms

@svasista-ms svasista-ms commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Fix the InfVerif sample-class gate to skip it only for WDK Versions in the range 25798..=26100 (where the /samples flag is missing).

Partially addresses #170 (for cargo-wdk).

Screenshots

Before: cargo-wdk skips InfVerif for WDK Build# 28000 for samples:

image

After: cargo-wdk runs InfVerif for WDK Build# 28000 for `samples:

image ... image

Copilot AI review requested due to automatic review settings June 11, 2026 10:23
@svasista-ms svasista-ms changed the title fix(cargo-wdk): update WDK build number range fix(cargo-wdk): update WDK build number range to skip InfVerif when building sample class drivers Jun 11, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates cargo-wdk’s InfVerif “sample-class” gating logic to only skip InfVerif for a bounded set of WDK build numbers where the required samples flag is missing, and adds/adjusts tests to cover the new behavior (partial progress toward #170).

Changes:

  • Narrow InfVerif-skip detection from an open-ended range to 25798..=26100.
  • Add a dedicated unit test asserting InfVerif is skipped for sample-class drivers within the affected WDK build range.
  • Refactor test expectations to allow asserting the packaging flow with and without InfVerif.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
crates/cargo-wdk/src/actions/build/tests.rs Adds a new regression test for the WDK-build bounded skip behavior and introduces a helper to assert the packaging path without InfVerif.
crates/cargo-wdk/src/actions/build/package_task.rs Changes the “missing samples flag” build-number range to a bounded inclusive range and updates the associated constant type.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread crates/cargo-wdk/src/actions/build/package_task.rs Outdated
Comment thread crates/cargo-wdk/src/actions/build/tests.rs Outdated
Comment thread crates/cargo-wdk/src/actions/build/tests.rs Outdated
@codecov-commenter

codecov-commenter commented Jun 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.99%. Comparing base (21ec8f8) to head (32bd21d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #679      +/-   ##
==========================================
+ Coverage   79.93%   79.99%   +0.05%     
==========================================
  Files          26       26              
  Lines        5633     5634       +1     
  Branches     5633     5634       +1     
==========================================
+ Hits         4503     4507       +4     
+ Misses       1002      999       -3     
  Partials      128      128              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

Comment thread crates/cargo-wdk/src/actions/build/tests.rs
Comment thread crates/cargo-wdk/src/actions/build/tests.rs Outdated
Comment thread crates/cargo-wdk/src/actions/build/package_task.rs Outdated
Copilot AI review requested due to automatic review settings June 15, 2026 04:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread crates/cargo-wdk/src/actions/build/tests.rs Outdated
Comment thread crates/cargo-wdk/src/actions/build/tests.rs
@gurry

gurry commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Partially resolves #170 (for cargo-wdk).

@svasista-ms This will automatically close the issue? Are you sure you want that (as the issue is not fully fixed by this PR)?

Copilot AI review requested due to automatic review settings July 3, 2026 08:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

gurry
gurry previously approved these changes Jul 6, 2026
@gurry
gurry enabled auto-merge July 6, 2026 06:42
@svasista-ms
svasista-ms requested review from a team and NateD-MSFT July 13, 2026 04:54

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its better to rewrite 547 to 560 as single match statement for readability

    match wdk_build_number {
        n if MISSING_SAMPLE_FLAG_WDK_BUILD_NUMBER_RANGE.contains(&n) => {
            warn!("InfVerif skipped for samples class. WDK Build: {wdk_build_number}");
            return Ok(());
        }
        n if n > *MISSING_SAMPLE_FLAG_WDK_BUILD_NUMBER_RANGE.end() => "/samples",
        _ => "/msft",
    }

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion, fixed it ✅ (diff)

}

#[test]
pub fn given_sample_class_and_wdk_build_before_sample_flag_range_then_infverif_runs_with_msft() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pub fn given_sample_class_and_wdk_build_before_sample_flag_range_then_infverif_runs_with_msft() {
pub fn given_sample_class_is_true_and_wdk_build_below_range_then_inverif_runs_with_msft_flag() {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed ✅

}

#[test]
pub fn given_sample_class_and_wdk_build_with_missing_sample_flag_then_infverif_is_skipped() {

@krishnakumar4a4 krishnakumar4a4 Jul 14, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pub fn given_sample_class_and_wdk_build_with_missing_sample_flag_then_infverif_is_skipped() {
pub fn given_sample_class_is_true_and_wdk_build_within_range_then_inverif_is_skipped() {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed ✅

@krishnakumar4a4 krishnakumar4a4 Jul 14, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following wording is better with new test scenarios added

pub fn given_sample_class_is_true_and_wdk_build_is_above_range_then_infverif_runs_with_samples_flag_() {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed ✅

Now we have 3 tests:

  1. Below the Range uses /msft
  2. In the Range skips InfVerif
  3. After the Range uses /samples

Copilot AI review requested due to automatic review settings July 14, 2026 12:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

Comment thread crates/cargo-wdk/src/actions/build/tests.rs
Comment thread crates/cargo-wdk/src/actions/build/tests.rs
Comment thread crates/cargo-wdk/src/actions/build/package_task.rs
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.

5 participants