test(inspect): add CLI coverage for whatif classification and error path - #2059
Draft
github-actions[bot] wants to merge 1 commit into
Draft
test(inspect): add CLI coverage for whatif classification and error path#2059github-actions[bot] wants to merge 1 commit into
github-actions[bot] wants to merge 1 commit into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Azure Pipelines: 2 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
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.
Test Gap Fixes
Test suite snapshot: 3208 unit/integration tests total; 11 tests in
tests/inspect_integration.rs(was 8)Added Coverage
src/inspect/cli.rs(dispatch_whatif) /src/inspect/whatif.rsado-aw whatif --fail <job>text outputwhatifCLI subcommand had unit tests for the classifier logic but zero end-to-end coverage exercising the actual binary/CLI dispatch path (source parse → compile → summary → analyze → render). Verifies downstream jobs are correctly labeledruns_anyway/skippedfrom real compiled conditions.whatif_classifies_downstream_jobs_by_conditionsrc/inspect/cli.rs(dispatch_whatif--json)ado-aw whatif --jsonstructured report schemafailing_node.kind/id,classificationvalues) survives the full CLI path.whatif_json_emits_structured_reportsrc/inspect/whatif.rs(resolve_failing_nodeerror path)--fail <unknown-id>error handlingWhatIfError::UnknownFailIderror path was untested at the CLI boundary — confirms the command fails non-zero with a clear message instead of panicking or silently succeeding.whatif_unknown_fail_id_errorsValidation
cargo test --test inspect_integration(11/11 passed)cargo clippy --all-targets --all-features(no new warnings; pre-existing warning increate_work_item.rsunrelated to this change)Scope
Only
tests/inspect_integration.rswas modified; no production code changes.This PR was created by the automated test gap finder. Previous run: 2026-08-24. Modules audited this cycle:
src/inspect/cli.rswhatif CLI wiring.