Skip to content

test(windows): preserve packaged CLI arguments in qualification - #3174

Merged
EffortlessSteven merged 2 commits into
mainfrom
fix/windows-packaged-provenance
Aug 12, 2026
Merged

EffortlessSteven merged 2 commits into
mainfrom
fix/windows-packaged-provenance

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Aug 11, 2026 •

Copy link
Copy Markdown
Member

Summary

Fixes #3173. The Windows packaged qualification helper previously shadowed PowerShell's automatic $args, so the installed executable could be invoked without the caller's arguments. This patch preserves the argument vector and strengthens the workflow contract test so the guard, throw, splat, and ordering are checked on the helper itself.

Scope

  • .github/workflows/windows-packaged-qualification.yml: rename the helper parameter to $cliArgs, reject empty argument vectors, and invoke the isolated packaged executable with @cliArgs.
  • xtask/src/windows_advisory.rs: enforce the helper-local contract and preserve workflow-wide version-journey checks.

No product code, release version, Cargo isolation, install prefix, artifact policy, or unrelated PR lifecycle is changed.

Acceptance and proof

  • PASS: direct PowerShell argument-forwarding probe on the original candidate.
  • PASS: git diff --check and cargo fmt --all -- --check.
  • PASS: hosted routed Rust, security, source-of-truth, analytics, ub-review, planning, and mergeability checks on the original candidate.
  • PASS: review finding addressed in exact head c7a3c19b2cc2011e73836e070ff188e8410310c5; review thread has an evidence reply and is resolved.
  • NOT RUN / unavailable locally: focused cargo test -p xtask windows_advisory::tests::packaged_qualification_cli_helper_preserves_arguments -- --exact was retried with isolated targets and the repository's forced temporary-directory configuration; MSVC linking failed with LNK1104 under concurrent build contention. No local test pass is claimed; hosted exact-head proof is required.

Exact candidate

Claim boundary

This PR proves the Windows qualification workflow source and its static regression contract preserve packaged CLI arguments. It does not qualify a release candidate, authorize publication, publish artifacts, or establish Windows hosted qualification until the exact current head completes the required workflow.

Rollback

Revert the single PR merge if the qualification helper or its contract test regresses; no release tag or external artifact is changed by this PR.

@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented Aug 11, 2026 •

Copy link
Copy Markdown

Review Change Stack

Summary by CodeRabbit

  • Bug Fixes

    • Improved packaged Windows CLI qualification by rejecting invocations without arguments before execution.
    • Ensured command arguments are forwarded correctly and packaged version checks run reliably.
  • Tests

    • Added coverage for argument handling, execution behavior, and validation of the packaged CLI helper.

Walkthrough

The Windows packaged qualification helper now rejects empty argument lists, uses $cliArgs instead of PowerShell’s automatic $args, and forwards arguments to the packaged executable. A Rust contract test verifies the helper definition, forwarding, version check, and validation error.

Changes

Packaged CLI argument handling

Layer / File(s) Summary
Helper contract and regression coverage
.github/workflows/windows-packaged-qualification.yml, xtask/src/windows_advisory.rs
Invoke-CLI now requires arguments, uses $cliArgs, and forwards them to the packaged executable. The Rust test verifies argument forwarding, the version command, and the empty-argument validation error.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related issues

  • Issue 3172: Directly covers the PowerShell argument-forwarding fix and its contract test.
  • Issue 3158: Relates to packaged Windows CLI --version validation.

Possibly related PRs

Suggested labels: enhancement

Poem

A rabbit checked the CLI line,
And found empty args decline.
$cliArgs now hops with care,
--version travels there.
Windows tests guard the way.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the change, scope, proof status, claim boundary, and rollback, but omits most required template sections. Complete the missing template sections, especially source boundary, source links, scope classification, CI economics, engineering checks, gates, and traceability.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The workflow fix and contract test satisfy the linked issue requirements for argument forwarding, empty-input rejection, and preservation of the packaged executable path.
Out of Scope Changes check ✅ Passed The changes are limited to the Windows qualification workflow and its workflow-contract test, with no unrelated product or release changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title clearly identifies the Windows qualification change and the main behavior: preserving packaged CLI arguments.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/windows-packaged-provenance

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@xtask/src/windows_advisory.rs`:
- Around line 1014-1042: Strengthen
packaged_qualification_cli_helper_preserves_arguments by asserting the
empty-argument guard, its throw, and the splatted & $env:RIPR_PACKAGED `@cliArgs`
invocation directly on helper rather than searching the whole workflow; verify
the validation appears before invocation. Reject every $args reference in
helper, not only the parameter declaration, while preserving the existing
required workflow assertions.
- Around line 1014-1042: Update
packaged_qualification_cli_helper_preserves_arguments to scope the
argument-guard and `@cliArgs` splat assertions to the extracted Invoke-CLI
definition, and verify their ordering within that helper. Leave the
version-related assertions as workflow-wide checks, and run the qualified test
windows_advisory::tests::packaged_qualification_cli_helper_preserves_arguments.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 15919bca-d12d-4ac1-8922-34a8b0f9315e

📥 Commits

Reviewing files that changed from the base of the PR and between ffea464 and c1ac60f.

📒 Files selected for processing (2)
  • .github/workflows/windows-packaged-qualification.yml
  • xtask/src/windows_advisory.rs

Comment thread xtask/src/windows_advisory.rs Resolved
@codecov

codecov Bot commented Aug 11, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 78.57143% with 9 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
xtask/src/windows_advisory.rs 78.57% 9 Missing ⚠️

📢 Thoughts on this report? Let us know!

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

REVIEW_INCOMPLETE. reviewed_head_sha: c7a3c19. integration_basis: PR #3174 base ffea464. changed_surfaces_and_semantic_owners_inspected: the packaged Windows qualification Invoke-CLI helper and xtask workflow-contract test. Findings: no blocking source defect. The helper-local test now checks the named cliArgs parameter, rejects every args reference in the helper, requires the empty guard and throw, requires the packaged executable splat, and verifies guard-before-invocation ordering; workflow-wide version assertions remain retained. Direct PowerShell probe passed one --version argument and confirmed the empty guard. Hosted exact-head evidence observed: routed Rust, coverage, test analytics, security, source-of-truth, planning, and mergeability success; exact-head ub-review and GitHub-hosted routed job were still in progress at inspection; codecov patch was red at 78.57 percent with 9 lines missing. Local focused test remains unavailable because MSVC linking failed under the repository temporary-directory configuration and concurrent build contention; hosted test-analytics success is the available test evidence. Automated review finding was addressed in c7a3c19 and the review thread is resolved. Diff scope remains limited to the workflow helper and its focused contract test; no product, release, publication, or unrelated PR lifecycle changes. Residual assumptions: final in-progress exact-head checks must complete successfully, and Codecov red must be confirmed advisory or resolved by repository policy. Disposition: no source repair requested; keep candidate in review until exact-head check state is complete.

@EffortlessSteven

Copy link
Copy Markdown
Member Author

Exact-head review disposition: REVIEW_READY

Reviewed head c7a3c19b2cc2011e73836e070ff188e8410310c5 against base ffea464bcc3faf21be20770da62ecc20cea19cf5.

  • The only actionable finding was repaired in the same candidate and its thread has an evidence reply and is resolved.
  • Direct PowerShell regression probe passed: argument-forwarding-pass for the exact Invoke-CLI parameter/guard/splat behavior.
  • Hosted exact-head Ripr Rust Small on GitHub Hosted passed, including Required Rust gates, PR evidence, and proof-route dry-run.
  • Required protected context Ripr Rust Small Result passed.
  • Hosted coverage, JUnit analytics, source-of-truth, ub-review, security, dependency review, planning, and mergeability checks passed.
  • codecov/patch is a non-required advisory failure; branch protection requires only Ripr Rust Small Result (confirmed via effective protection API).
  • No source defect, unresolved review thread, or release-scope expansion found.

This disposition establishes review readiness for this exact PR head. It does not authorize tagging, publication, or release-candidate selection.

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.

fix(windows qualification): preserve packaged CLI arguments in PowerShell helper

1 participant