Skip to content

test(bash-lint): cover GateContext::PullRequest via pr-filter-tier1 fixture#515

Merged
jamesadevine merged 2 commits into
mainfrom
bash-lint/cover-pr-filter-gate-705d96be7208c2c5
May 13, 2026
Merged

test(bash-lint): cover GateContext::PullRequest via pr-filter-tier1 fixture#515
jamesadevine merged 2 commits into
mainfrom
bash-lint/cover-pr-filter-gate-705d96be7208c2c5

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

What the lint found

The baseline lint was green (exit 0), so this is a proactive coverage improvement (Step 4c).

Audit revealed that src/compile/filter_ir.rs has two GateContext variants that each emit a - bash: step:

  • GateContext::PipelineCompletion"Evaluate pipeline filters" — already tracked in REQUIRED_STEP_DISPLAY_NAMES and exercised by pipeline-filter-agent.md
  • GateContext::PullRequest"Evaluate PR filters"not tracked, and pr-filter-tier1-agent.md / pr-filter-tier2-agent.md were absent from the lint's FIXTURES list

Both variants share the same codegen path in filter_ir.rs, but without the PR fixture in FIXTURES there was no guarantee the PR-gate bash body would ever reach shellcheck.

How it was fixed

  • tests/bash_lint_tests.rs: added "pr-filter-tier1-agent.md" to FIXTURES so the compiler's PR-filter output is compiled and linted on every CI run.
  • tests/bash_lint_tests.rs: added "Evaluate PR filters" to REQUIRED_STEP_DISPLAY_NAMES (with source comment pointing to filter_ir.rs) so the test fails loudly if the fixture is removed or the display name changes.

No production code was changed.

Verification

ENFORCE_BASH_LINT=1 cargo test --test bash_lint_tests -- --nocapture
  test every_listed_fixture_exists ... ok
  test compiled_bash_bodies_pass_shellcheck ... ok
  test result: ok. 2 passed; 0 failed

cargo test
  test result: ok. (all tests pass)

cargo clippy --all-targets
  (no new errors)

Warning

Firewall blocked 2 domains

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

  • dev.azure.com
  • releaseassets.githubusercontent.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "dev.azure.com"
    - "releaseassets.githubusercontent.com"

See Network Configuration for more information.

Generated by Bash Step Hygiene Auditor · ● 2.9M ·

…ixture

Add `pr-filter-tier1-agent.md` to the FIXTURES list so the bash-lint
integration test compiles and shellchecks the gate step produced by
`GateContext::PullRequest` in `src/compile/filter_ir.rs`.

Add "Evaluate PR filters" to REQUIRED_STEP_DISPLAY_NAMES to ensure the
generator is always exercised; the test will now fail loudly if the
pr-filter fixtures are removed or the display name changes.

Previously only the pipeline-completion variant ("Evaluate pipeline
filters") was tracked; the PR-trigger variant shared the same generator
but had no coverage guarantee.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jamesadevine
Copy link
Copy Markdown
Collaborator

@copilot resolve the merge conflicts in this pull request

@jamesadevine jamesadevine marked this pull request as ready for review May 13, 2026 13:40
Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented May 13, 2026

@copilot resolve the merge conflicts in this pull request

Resolved and pushed in commit fc959f0. I merged origin/main, fixed the conflict in tests/bash_lint_tests.rs by keeping both required step assertions, and re-ran the bash lint integration test successfully.

Copilot AI requested a review from jamesadevine May 13, 2026 13:47
@jamesadevine jamesadevine merged commit 8cfcdc6 into main May 13, 2026
8 checks passed
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.

2 participants