test(bash-lint): cover --debug-pipeline bash generator via compile_fixture_with_flags#525
Merged
jamesadevine merged 1 commit intoMay 13, 2026
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What the lint found
Proactive coverage audit (Step 4c) found a real, currently-unreached bash generator: the
"Verify MCP backends"step emitted bygenerate_debug_pipeline_replacements(true)insrc/compile/common.rs. This step is only reachable via the--debug-pipelineCLI flag — no existing fixture exercised it, so its bash body was never shellchecked.How it was fixed
Generator:
src/compile/common.rs→generate_debug_pipeline_replacements(bool)→ theverify_mcp_backendsliteral block.Fix: The test infrastructure is extended with a
compile_fixture_with_flagshelper that accepts extra CLI arguments after the file path. The normalcompile_fixturewrapper calls it with an empty extra-args slice (no behavior change). After the regular fixture loop,minimal-agent.mdis compiled a second time with--debug-pipeline; the resulting lock file's bash bodies are shellchecked and their display names counted againstREQUIRED_STEP_DISPLAY_NAMES."Verify MCP backends"is added toREQUIRED_STEP_DISPLAY_NAMESso that if the generator is renamed or removed the test fails loudly rather than silently dropping coverage.Files touched:
tests/bash_lint_tests.rsonly.Verification
Warning
Firewall blocked 2 domains
The following domains were blocked by the firewall during workflow execution:
dev.azure.comreleaseassets.githubusercontent.comSee Network Configuration for more information.