Skip to content

test: reduce and improve tests in src/compile/types.rs#955

Draft
github-actions[bot] wants to merge 1 commit into
mainfrom
test/reduce-types-cycle3-c257ce7904eeb85b
Draft

test: reduce and improve tests in src/compile/types.rs#955
github-actions[bot] wants to merge 1 commit into
mainfrom
test/reduce-types-cycle3-c257ce7904eeb85b

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Test Suite Reduction: src/compile/types.rs

What was wrong

  • test_cache_memory_bool_false: only asserted !cm.is_enabled(), missing the cm.allowed_extensions().is_empty() assertion that the symmetrical test_cache_memory_bool_true includes. The Enabled(false) variant's allowed_extensions() code path was untested.

  • test_pr_trigger_config_empty_filters: a test named "empty_filters" that claimed to verify a filters: {} block produces all-None fields — but only checked 3 of the 13 nullable fields on PrFilters (title, author, draft). Ten fields were silently skipped: source_branch, target_branch, commit_message, labels, changed_files, time_window, min_changes, max_changes, build_reason, expression.

  • test_pr_trigger_config_mode_explicit_synthetic: its only assertion (assert_eq!(mode, PrMode::Synthetic)) is identical to test_pr_trigger_config_mode_default_synthetic. The existing mode-trio (default_synthetic + explicit_policy + invalid_value_errors) fully documents the mode: field — the explicit-default variant adds no regression protection that the other three tests don't already provide.

Changes

Test Action Reason
test_cache_memory_bool_false Rewritten Vacuous — missing allowed_extensions().is_empty() assertion; asymmetric with bool_true
test_pr_trigger_config_empty_filters Rewritten Incomplete — extended to cover all 13 nullable PrFilters fields
test_pr_trigger_config_mode_explicit_synthetic Removed Redundant — assertion is strict subset of test_pr_trigger_config_mode_default_synthetic

Verification

  • cargo test: 1820 tests pass ✅ (was 1821 — one redundant test removed)
  • cargo clippy --all-targets --all-features: no errors or warnings ✅

Warning

Firewall blocked 2 domains

The following domains were blocked by the firewall during workflow execution:

  • spsprodeus21.vssps.visualstudio.com
  • spsprodweu4.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"
    - "spsprodweu4.vssps.visualstudio.com"

See Network Configuration for more information.

Generated by Test Reducer · sonnet46 3.8M ·

- test_cache_memory_bool_false: add missing allowed_extensions().is_empty()
  assertion to match the symmetrical bool_true test
- test_pr_trigger_config_empty_filters: extend to assert all 13 nullable
  PrFilters fields are None (was only checking 3 of 13)
- test_pr_trigger_config_mode_explicit_synthetic: remove — its sole assertion
  (PrMode::Synthetic) is identical to test_pr_trigger_config_mode_default_synthetic;
  the mode-field trio (default_synthetic + explicit_policy + invalid_value_errors)
  fully covers the field without the redundant explicit-default variant

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