Skip to content

test(bash-lint): cover --debug-pipeline bash generator via compile_fixture_with_flags#525

Merged
jamesadevine merged 1 commit into
mainfrom
bash-hygiene/cover-debug-pipeline-generator-fe62139255f4c5ed
May 13, 2026
Merged

test(bash-lint): cover --debug-pipeline bash generator via compile_fixture_with_flags#525
jamesadevine merged 1 commit into
mainfrom
bash-hygiene/cover-debug-pipeline-generator-fe62139255f4c5ed

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

What the lint found

Proactive coverage audit (Step 4c) found a real, currently-unreached bash generator: the "Verify MCP backends" step emitted by generate_debug_pipeline_replacements(true) in src/compile/common.rs. This step is only reachable via the --debug-pipeline CLI flag — no existing fixture exercised it, so its bash body was never shellchecked.

REQUIRED_STEP_DISPLAY_NAMES check:
  "Verify MCP backends"  ← not produced by any fixture (debug-pipeline path unreachable)

How it was fixed

Generator: src/compile/common.rsgenerate_debug_pipeline_replacements(bool) → the verify_mcp_backends literal block.

Fix: The test infrastructure is extended with a compile_fixture_with_flags helper that accepts extra CLI arguments after the file path. The normal compile_fixture wrapper calls it with an empty extra-args slice (no behavior change). After the regular fixture loop, minimal-agent.md is compiled a second time with --debug-pipeline; the resulting lock file's bash bodies are shellchecked and their display names counted against REQUIRED_STEP_DISPLAY_NAMES.

"Verify MCP backends" is added to REQUIRED_STEP_DISPLAY_NAMES so that if the generator is renamed or removed the test fails loudly rather than silently dropping coverage.

Files touched: tests/bash_lint_tests.rs only.

Verification

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

cargo test
# All tests pass

cargo clippy --all-targets
# No 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.7M ·

…xture_with_flags

Add coverage for the 'Verify MCP backends' bash step emitted by
generate_debug_pipeline_replacements(true) in src/compile/common.rs.
This step is only reachable via the --debug-pipeline CLI flag and was
previously never shellchecked by any fixture.

Changes:
- Refactor compile_fixture into compile_fixture_with_flags (takes
  extra CLI args) plus a compile_fixture wrapper for the common case.
- After the normal fixture loop, compile minimal-agent.md with
  --debug-pipeline and shellcheck its bash bodies.
- Add 'Verify MCP backends' to REQUIRED_STEP_DISPLAY_NAMES so that
  if the generator is removed or renamed the test fails loudly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jamesadevine jamesadevine marked this pull request as ready for review May 13, 2026 13:07
@jamesadevine jamesadevine merged commit 6e1734e into main May 13, 2026
@jamesadevine jamesadevine deleted the bash-hygiene/cover-debug-pipeline-generator-fe62139255f4c5ed branch May 13, 2026 13:08
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