Skip to content

test: reproducer for #392 (manual + test_suite targets in impacted output)#394

Open
tinder-maxwellelliott wants to merge 1 commit into
masterfrom
claude/reproducer-issue-392
Open

test: reproducer for #392 (manual + test_suite targets in impacted output)#394
tinder-maxwellelliott wants to merge 1 commit into
masterfrom
claude/reproducer-issue-392

Conversation

@tinder-maxwellelliott

Copy link
Copy Markdown
Collaborator

Summary

Reproducer for #392, which asks for a way to filter targets out of the get-impacted-targets output:

  1. manual-tagged targets — bazel-diff calls bazel query under the hood and surfaces manual targets like any other; there is no flag to drop them.
  2. test_suite targets — changing a single test inside a suite reports the wrapping test_suite as impacted, with no way to exclude it.

This is not a correctness bug — including these targets is the current, intended behaviour. The test pins that behaviour so that whenever a filter flag is added (the maintainer floated --excludeManual / --ignoredTargetLabels / a raw except-query segment in the issue thread), there's a concrete starting point documenting what the output looks like today.

What's added

  • Fixture cli/src/test/resources/workspaces/manual_and_test_suite/ with:
    • //:lib (sh_library over lib.sh)
    • //:regular_test (sh_test, deps = [:lib])
    • //:manual_test (sh_test, deps = [:lib], tags = ["manual"])
    • //:all_tests (test_suite wrapping :regular_test)
  • E2E test testManualAndTestSuiteTargetsAppearInImpactedOutput_reproducerForIssue392: edits lib.sh, runs the generate-hashesget-impacted-targets flow, and asserts that //:manual_test and //:all_tests both appear in the default impacted-targets output.

Follows the same "pin current behaviour" convention as the #365 reproducer so CI stays green and the behaviour is visible in source. When a filter flag lands, the manual/test_suite assertions are the lines that should flip.

Gated on Bazel 8.6.0+ (or 9.0.1+) for the bzlmod mod graph path, matching the other bzlmod-based reproducers in this file.

Test plan

bazel test //cli:E2ETest \
  --test_filter='com.bazel_diff.e2e.E2ETest#testManualAndTestSuiteTargetsAppearInImpactedOutput_reproducerForIssue392'

Passes locally (Bazel 9.1.1 inner, 8.5.1 outer).

Refs #392

🤖 Generated with Claude Code

…tput)

Issue #392 asks for a way to exclude `manual`-tagged targets and
`test_suite` targets from `get-impacted-targets`. bazel-diff currently
surfaces both like any other target, with no filter flag.

This adds an E2E reproducer that pins the current behaviour: a new
`manual_and_test_suite` fixture with a normal sh_test, a manual-tagged
sh_test, and a test_suite wrapping the normal test. Editing the shared
library source impacts all of them, and the test asserts that the
manual target and the test_suite both appear in the default
impacted-targets output.

The test follows the same "pin current behaviour" pattern used for the
source. When a filter flag (e.g. --excludeManual / --ignoredTargetLabels
/ a raw `except`-query segment) is added, these assertions are the lines
that should flip.

Refs #392

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@tinder-maxwellelliott tinder-maxwellelliott force-pushed the claude/reproducer-issue-392 branch from 038a595 to 85e88c9 Compare June 27, 2026 09:29
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