Skip to content

test: correct mislabelled vacuous test in src/compile/types.rs#1518

Merged
jamesadevine merged 1 commit into
mainfrom
test-reducer/types-noop-fix-7b07e326f5ee656b
Jul 15, 2026
Merged

test: correct mislabelled vacuous test in src/compile/types.rs#1518
jamesadevine merged 1 commit into
mainfrom
test-reducer/types-noop-fix-7b07e326f5ee656b

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Test Suite Reduction: src/compile/types.rs

What was wrong

  • test_front_matter_safe_outputs_triggers_conclusion_job: the test name claimed to verify that a non-empty safe-outputs block triggers the conclusion job, but the body only parsed front matter and asserted !fm.safe_outputs.is_empty(). Two problems:
    1. Mislabelled — conclusion-job generation is compiler logic, not front-matter parser logic; no conclusion job is ever triggered in this test.
    2. Near-vacuous!fm.safe_outputs.is_empty() trivially passes for any non-empty safe-outputs: block, regardless of correctness.

Changes

Test Action Reason
test_front_matter_safe_outputs_triggers_conclusion_job Renamed + rewritten Mislabelled name; near-vacuous assertion

New test: test_front_matter_safe_outputs_noop_object_form — verifies that noop: {} parses as a JSON object value (is_object() == true), distinguishing it from noop: false (boolean disable, tested in test_front_matter_safe_outputs_noop_disabled) and bare noop: (null/default). This is the actual observable contract of the front-matter parser for the object-form noop idiom.

Verification

  • cargo test: all 2570 tests pass ✅
  • cargo clippy --all-targets --all-features: no errors or unused-import 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 · 120.2 AIC · ⌖ 11.8 AIC · ⊞ 8.7K ·

Rename test_front_matter_safe_outputs_triggers_conclusion_job →
test_front_matter_safe_outputs_noop_object_form and replace the
near-vacuous assert!(!fm.safe_outputs.is_empty()) assertion with a
meaningful check that noop: {} parses as a JSON object (not a bool
or null). The old assertion trivialy passed for any non-empty
safe-outputs block and said nothing about conclusion-job triggering,
which happens in the compiler, not the front-matter parser.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jamesadevine jamesadevine marked this pull request as ready for review July 15, 2026 09:47
@jamesadevine jamesadevine merged commit 74aa011 into main Jul 15, 2026
21 checks passed
@jamesadevine jamesadevine deleted the test-reducer/types-noop-fix-7b07e326f5ee656b branch July 15, 2026 09:54
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.

1 participant