Skip to content

test: fix vacuous assertions in src/execute.rs#1648

Draft
github-actions[bot] wants to merge 1 commit into
mainfrom
test-reducer/fix-vacuous-execute-tests-0ff9b27180ad4590
Draft

test: fix vacuous assertions in src/execute.rs#1648
github-actions[bot] wants to merge 1 commit into
mainfrom
test-reducer/fix-vacuous-execute-tests-0ff9b27180ad4590

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Test Suite Reduction: src/execute.rs

What was wrong

Five tests asserted only assert!(result.is_err()) with no check on the error message. These tests would pass even if the implementation returned a completely different error — e.g., a panic, a wrong validation path, or a deserialization failure from an unrelated field. They verify that some error is returned, but not why.

Changes

Test Action Reason
test_execute_safe_output_malformed_work_item_returns_err Rewritten Bare is_err() — upgraded to check "Failed to parse create-work-item"
test_execute_malformed_update_wiki_page_returns_err Rewritten Bare is_err() — upgraded to check "Failed to parse update-wiki-page"
test_execute_malformed_create_wiki_page_returns_err Rewritten Bare is_err() — upgraded to check "Failed to parse create-wiki-page"
test_execute_malformed_upload_pipeline_artifact_returns_err Rewritten Bare is_err() — upgraded to check "Failed to parse upload-pipeline-artifact"
test_execute_malformed_comment_on_work_item_returns_err Rewritten Bare is_err() — upgraded to check "Failed to parse comment-on-work-item"

The error message "Failed to parse <tool-name>" is the literal string emitted by dispatch_tool in execute.rs when serde_json::from_value fails for missing required fields. Pinning this text ensures a regression in the tool name, parsing path, or error propagation would surface immediately.

Verification

  • cargo test: all 2580 tests pass ✅
  • cargo clippy --all-targets --all-features: no errors or new warnings ✅

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • spsprodeus21.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"

See Network Configuration for more information.

Generated by Test Reducer · 258.5 AIC · ⌖ 12.1 AIC · ⊞ 8.7K ·

Upgrade 5 bare is_err() assertions to check the error message,
following the pattern established in previous test-reducer runs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot mentioned this pull request Jul 24, 2026
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.

0 participants