Add test coverage for generate_firewall_config, generate_copilot_params, compute_effective_workspace, validate_checkout_list, and ExecutionResult#7
Merged
jamesadevine merged 2 commits intomainfrom Mar 6, 2026
Conversation
…ools/result.rs Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add unit tests for missing test coverage in several modules
Add test coverage for generate_firewall_config, generate_copilot_params, compute_effective_workspace, validate_checkout_list, and ExecutionResult
Mar 6, 2026
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.
Zero test coverage across several security- and correctness-critical paths: MCP firewall config generation, copilot param wiring, workspace resolution, checkout validation, and Stage 2 execution result helpers.
Changes
compile/types.rsDefaultderive toMcpOptionsto enable struct-update syntax in testscompile/common.rs— 14 new testscompute_effective_workspace: all 5 branches (explicit root/repo, implicit root/repo, explicitrepo+ no checkouts warns but still returns"repo")validate_checkout_list: valid alias passes, unknown alias returnsErrcontaining the alias name, empty casesgenerate_copilot_params::*wildcard →--allow-tool "shell(:*)", empty bash list → noshell(, custom MCP (hascommand:) is excluded from--mcpflags, builtin MCP appears as--mcpcompile/standalone.rs— 7 new tests forgenerate_firewall_configagency mcp <name>+["*"]allowlistallowed:list → that list is usedcommand:present) → uses provided command/args/allowedallowed:→ defaults to["*"]command:, not in metadata) → skippedEnabled(false)→ skippedmcp_servers→ empty upstream maptools/result.rs— 5 new testsExecutionResult::success/failure: correctsuccessbool, message, and absent dataExecutionResult::success_with_data: data field populatedanyhow_to_mcp_error: message preserved, code isINVALID_PARAMSWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
api.github.com (HTTP Only)/home/REDACTED/work/ado-aw/ado-aw/agentic-pipelines/target/debug/agentic-pipelines /home/REDACTED/work/ado-aw/ado-aw/agentic-pipelines/target/debug/agentic-pipelines proxy --allow api.github.com -C debuginfo=2 --cfg feature="base64" --cfg feature="default" --cfg feature="macros" pl-4�� pl-4b7c449a1e12ae21.thiserror_impl.774f8f1d4bc4652e-cgu.13.rcgu.o pl-4b7c449a1e12ae21.thiserror_impl.774f8f1d4bc4652e-cgu.14.rcgu.o uild/paste-c1c3f--crate-type lib/rustlib/x86_/home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/bin/rustc t_build.53e054c5--crate-name lib/rustlib/x86_env_logger lib/rustlib/x86_--edition=2021(packet block)/home/REDACTED/work/ado-aw/ado-aw/agentic-pipelines/target/debug/agentic-pipelines /home/REDACTED/work/ado-aw/ado-aw/agentic-pipelines/target/debug/agentic-pipelines proxy --allow api.github.com lib/�� lib/rustlib/x86_/home/REDACTED/work/ado-aw/ado-aw/agentic-pipelines/target/debug/d/home/REDACTED/work/ado-aw/ado-aw/agentic-pipelines/target/debug/deps/agentic_pipelines-ef75186829283f7a.11trc6o1m47w5xmx4lezu99hk.0dheibe.rcgu.o lib/rustlib/x86_/home/REDACTED/work/ado-aw/ado-aw/agentic-pipelines/target/debug/d/home/REDACTED/work/ado-aw/ado-aw/agentic-pipelines/target/debug/deps/agentic_pipelines-ef75186829283f7a.12k6siyyx68iv4op8pukxwe1i.0dheibe.rcgu.o bin/rustc 6b3845.rlib ld.e74a61f7c9930-m64 lj7c4kls7.rcgu.o/tmp/rustctBagZI/symbols.o bin/rustc know��(packet block)dev.azure.com/home/REDACTED/work/ado-aw/ado-aw/agentic-pipelines/target/debug/agentic-pipelines /home/REDACTED/work/ado-aw/ado-aw/agentic-pipelines/target/debug/agentic-pipelines proxy --allow api.github.com --allow dev.azure.com --allow *.visualstudio.com --warn=clippy::wildcard_imports --warn=clippy::verbose_file_reads --warn=unused_qualifications --warn=unused_macro_rules pl-4�� pl-4b7c449a1e12ae21.thiserror_impl.774f8f1d4bc4652e-cgu.13.rcgu.o pl-4b7c449a1e12ae21.thiserror_impl.774f8f1d4bc4652e-cgu.14.rcgu.o uild/paste-c1c3f--crate-type lib/rustlib/x86_/home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/bin/rustc t_build.53e054c5--crate-name lib/rustlib/x86_clap lib/rustlib/x86_--edition=2021(dns block)/home/REDACTED/work/ado-aw/ado-aw/agentic-pipelines/target/debug/agentic-pipelines /home/REDACTED/work/ado-aw/ado-aw/agentic-pipelines/target/debug/agentic-pipelines proxy --allow api.github.com --allow dev.azure.com --allow *.visualstudio.com 6b3845.rlib ld.e74a61f7c9930-m64 lj7c4kls7.rcgu.o/tmp/rustctBagZI/symbols.o bin/rustc eps/�� eps/libproc_macr/home/REDACTED/work/ado-aw/ado-aw/agentic-pipelines/target/debug/deps/agentic_pipecc eps/libunicode_i/home/REDACTED/work/ado-aw/ado-aw/agentic-pipelines/target/debug/deps/agentic_pipe-m64 gentic-pipelines 6b3845.rlib aed5.build_scripls-files known-linux-gnu/--exclude-standard gentic-pipelines--others(dns block)msazuresphere.visualstudio.com/home/REDACTED/work/ado-aw/ado-aw/agentic-pipelines/target/debug/agentic-pipelines /home/REDACTED/work/ado-aw/ado-aw/agentic-pipelines/target/debug/agentic-pipelines proxy --allow api.github.com --allow dev.azure.com --allow *.visualstudio.com --warn=clippy::wildcard_imports --warn=clippy::verbose_file_reads --warn=unused_qualifications --warn=unused_macro_rules pl-4�� pl-4b7c449a1e12ae21.thiserror_impl.774f8f1d4bc4652e-cgu.13.rcgu.o pl-4b7c449a1e12ae21.thiserror_impl.774f8f1d4bc4652e-cgu.14.rcgu.o uild/paste-c1c3f--crate-type lib/rustlib/x86_/home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/bin/rustc t_build.53e054c5--crate-name lib/rustlib/x86_clap lib/rustlib/x86_--edition=2021(dns block)/home/REDACTED/work/ado-aw/ado-aw/agentic-pipelines/target/debug/agentic-pipelines /home/REDACTED/work/ado-aw/ado-aw/agentic-pipelines/target/debug/agentic-pipelines proxy --allow api.github.com --allow dev.azure.com --allow *.visualstudio.com 6b3845.rlib ld.e74a61f7c9930-m64 lj7c4kls7.rcgu.o/tmp/rustctBagZI/symbols.o bin/rustc eps/�� eps/libproc_macr/home/REDACTED/work/ado-aw/ado-aw/agentic-pipelines/target/debug/deps/agentic_pipecc eps/libunicode_i/home/REDACTED/work/ado-aw/ado-aw/agentic-pipelines/target/debug/deps/agentic_pipe-m64 gentic-pipelines 6b3845.rlib aed5.build_scripls-files known-linux-gnu/--exclude-standard gentic-pipelines--others(dns block)raw.github.com/home/REDACTED/work/ado-aw/ado-aw/agentic-pipelines/target/debug/agentic-pipelines /home/REDACTED/work/ado-aw/ado-aw/agentic-pipelines/target/debug/agentic-pipelines proxy --allow *.github.com -C debuginfo=2 ts-6ec0ed56a92647b6.0jfofygy93sfytx3azbwh7c07.02btb30.rcgu.o ts-6ec0ed56a92647b6.0kx3d3j2rs7xxryayqrtqxuny.02btb30.rcgu.o ts-6ec0ed56a92647b6.14v8l5ubydayvx2p6zvlszaqc.02btb30.rcgu.o ts-6ec0ed56a92647b6.16af17k6l1ee8wxuxnldr6om9.02btb30.rcgu.o ts-6ec0ed56a92647b6.16ffx7eg28ux25rfeuc3m9cj6.02btb30.rcgu.o ts-6ec0ed56a92647b6.1ja6a0vaqo1r7x9kinakzwha2.02btb30.rcgu.o ts-6ec0ed56a92647b6.1pbx9ffi09x2li23igw0abomj.02btb30.rcgu.o ts-6ec0ed56a92647b6.1rfyounwsnb8ei6xax7djf9tq.02btb30.rcgu.o ts-6ec0ed56a92647b6.202h0iuli2rltcbbxsqnefbwa.02btb30.rcgu.o ts-6ec0ed56a92647b6.35tgyo0lbrbjd4ecxqj2cuq6f.02btb30.rcgu.o ts-6ec0ed56a92647b6.3feswu48alx5ceryp50bd0osv.02btb30.rcgu.o ts-6ec0ed56a92647b6.3jae2kppx2stlcrdwsrmyvi8e.02btb30.rcgu.o ts-6ec0ed56a92647b6.3ltgq306owkg1kkf0hjla19ew.02btb30.rcgu.o ts-6ec0ed56a92647b6.443hx9kzbxhiuhu58c6231lzv.02btb30.rcgu.o(dns block)/home/REDACTED/work/ado-aw/ado-aw/agentic-pipelines/target/debug/agentic-pipelines /home/REDACTED/work/ado-aw/ado-aw/agentic-pipelines/target/debug/agentic-pipelines proxy --allow *.github.com lib/�� lib/rustlib/x86_--build-id lib/rustlib/x86_--eh-frame-hdr bin/rustc eps/schemars_der/home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu//home/REDACTED/work/ado-aw/ado-aw/agentic-pipelines/target/debug/deps/agentic_pipelines-ef75186829283f7a.149fubgid7n5sy7pcz6xbbxz4.0dheibe.rcgu.o eps/schemars_der-flavor eps/schemars_dergnu bin/rustc eps/�� eps/schemars_der-plugin-opt=/usr/libexec/gcc/x86_64-linux-gnu/13/lto-wrapper eps/schemars_der-plugin-opt=-fresolution=/tmp/ccOEFIzu.res eps/proxy_tests-3674e9b8288b75cd eps/schemars_dergit eps/schemars_derls-files eps/schemars_der--exclude-standard eps/proxy_tests---others(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
This section details on the original issue you should resolve
<issue_title>🧪 Test gap analysis — 4 areas with missing coverage in compile/common.rs, execute.rs, standalone.rs, tools/result.rs</issue_title>
<issue_description>## Test Gap Analysis
Test suite snapshot: 180 unit tests, 21 integration/proxy/firewall tests (201 total), 3 fixture files
Priority Gaps
execute.rsexecute_safe_outputs/execute_safe_outputcompile/standalone.rsgenerate_firewall_configagency mcp (name)command; custom MCP uses provided commandcompile/common.rsgenerate_copilot_paramsgenerate_copilot_paramshas complex bash allow-list and--mcpwiring logicbash: [":*"]wildcard, empty bash list, custom MCP is skippedcompile/common.rscompute_effective_workspacecompile/common.rsvalidate_checkout_listErrtools/result.rsToolResult::success/failure,anyhow_to_mcp_errorsuccesssets correctisError: false,failuresetsisError: true,anyhow_to_mcp_errormaps error messageSuggested Test Cases
1.
execute.rs— unknown tool type error path2.
generate_firewall_config— built-in MCP with restricted allow-list3.
compute_effective_workspace— all branches4.
validate_checkout_list— error path