Skip to content

test(validate): close ado_script/validate regression coverage gaps#678

Merged
jamesadevine merged 2 commits into
mainfrom
copilot/fix-test-gap-in-validate-repo
May 21, 2026
Merged

test(validate): close ado_script/validate regression coverage gaps#678
jamesadevine merged 2 commits into
mainfrom
copilot/fix-test-gap-in-validate-repo

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 21, 2026

Summary

This PR closes three test coverage gaps identified by the gap finder: missing regression protection for ado_script bundle-path consistency, missing Sequence coverage in reject_ado_expressions_in_value, and missing direct unit coverage for is_valid_artifact_name. The change is test-only and adds focused assertions around these security/consistency-critical paths.

  • ado_script path/download consistency regression test

    • Added gate_and_import_eval_paths_consistent_with_download_step in src/compile/extensions/ado_script.rs.
    • Verifies GATE_EVAL_PATH and IMPORT_EVAL_PATH stay under the unzip destination and retain the ado-script/ zip prefix.
    • Verifies download step still unzips into /tmp/ado-aw-scripts/.
  • reject_ado_expressions_in_value sequence-branch coverage

    • Added tests in src/validate.rs for:
      • rejecting a serde_yaml::Value::Sequence containing $(...)
      • allowing a safe sequence of literal strings
  • Direct artifact-name allowlist coverage

    • Added test_is_valid_artifact_name in src/validate.rs.
    • Covers valid names and regression-sensitive invalid inputs (space, $, /, {{...}}, empty).
#[test]
fn test_reject_ado_expressions_in_value_catches_injection_in_sequence() {
    let seq = serde_yaml::Value::Sequence(vec![
        serde_yaml::Value::String("safe".to_string()),
        serde_yaml::Value::String("$(secretVar)".to_string()),
    ]);
    assert!(reject_ado_expressions_in_value(&seq, "myParam", "default").is_err());
}

Test plan

  • Added targeted unit tests:
    • compile::extensions::ado_script::tests::gate_and_import_eval_paths_consistent_with_download_step
    • validate::tests::test_reject_ado_expressions_in_value_catches_injection_in_sequence
    • validate::tests::test_reject_ado_expressions_in_value_allows_safe_sequence
    • validate::tests::test_is_valid_artifact_name

Warning

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:

  • https://api.github.com/repos/githubnext/ado-aw/issues
    • Triggering command: /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-e6dfa1d338ec21df /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-e6dfa1d338ec21df /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/mcp_http_tests-5677077b2fc7023/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/bash_lint_tests-dcfd0cebb8e4577f.1gltv4rjkcapf0tes9ij6xrd4.0oa2ylv.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/mcp_http_tests-5677077b2fc7023/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/bash_lint_tests-dcfd0cebb8e4577f.1l55qj5mjk0e5f0ujy745ls7w.0oa2ylv.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/mcp_http_tests-5677077b2fc7023/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/bash_lint_tests-dcfd0cebb8e4577f.1rjkwhszs3owkjjdtx9znd52v.0oa2ylv.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/mcp_http_tests-5677077b2fc7023/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/bash_lint_tests-dcfd0cebb8e4577f.24j9dypae3q0p68nqjv7q4p3j.0oa2ylv.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/mcp_http_tests-5677077b2fc7023/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/bash_lint_tests-dcfd0cebb8e4577f.25di7kr1lxle3psawcw3fxwet.0oa2ylv.rcgu.o 97.078ve5m94j7iiw2jad0so3crt.06f7qra.rcgu.o 97.0mjklk9d3jffklbi8nr9xx45v.06f7qra.rcgu.o 97.0yybq2ejfrqh9e4ctmaefpfxv.06f7qra.rcgu.o 97.11s7yg4ciwt85b6r5b3v9t2x8.06f7qra.rcgu.o 97.14d1zlcaaj1ugf1ly3c1embrw.06f7qra.rcgu.o 97.15oetuoiuk7w76rnxj3tyf2ej.06f7qra.rcgu.o 97.1ffeneopqdddkqw1cjlo6m2yl.06f7qra.rcgu.o 97.1w05mya9zrmm0453pkbtror3l.06f7qra.rcgu.o 97.29694ugww54m46le61myh3h0m.06f7qra.rcgu.o 97.2btxjqwhs4xmxsftdben6r4e8.06f7qra.rcgu.o 97.2fxur8d4x5ud8ebcx187it2fu.06f7qra.rcgu.o 97.2m6gxgceh5cepf71ro7hpnvge.06f7qra.rcgu.o 97.2zl592loejhoomd25r9935vu4.06f7qra.rcgu.o 97.3c0vbzv6q1u83u80qleznucgo.06f7qra.rcgu.o (http block)
    • Triggering command: /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-e6dfa1d338ec21df /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-e6dfa1d338ec21df /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-e6dfa1d338ec21df.1fisaox3jt�� /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-e6dfa1d338ec21df.1ld6qlr4umiorpbdy9w72ywqd.1if5e3s.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-e6dfa1d338ec21df.1mw3szpkc62x3tnyin50d0h21.1if5e3s.rcgu.o remo�� get-url origin bin/rustc --format=json ,SC1091 ck bin/rustc remo�� .md origin -b4a05c585cc26eff --format=json ,SC1091 heck -b4a05c585cc26eff (http block)
  • spsprodeus21.vssps.visualstudio.com
    • Triggering command: /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-e6dfa1d338ec21df /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-e6dfa1d338ec21df /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/mcp_http_tests-5677077b2fc7023/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/bash_lint_tests-dcfd0cebb8e4577f.1gltv4rjkcapf0tes9ij6xrd4.0oa2ylv.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/mcp_http_tests-5677077b2fc7023/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/bash_lint_tests-dcfd0cebb8e4577f.1l55qj5mjk0e5f0ujy745ls7w.0oa2ylv.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/mcp_http_tests-5677077b2fc7023/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/bash_lint_tests-dcfd0cebb8e4577f.1rjkwhszs3owkjjdtx9znd52v.0oa2ylv.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/mcp_http_tests-5677077b2fc7023/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/bash_lint_tests-dcfd0cebb8e4577f.24j9dypae3q0p68nqjv7q4p3j.0oa2ylv.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/mcp_http_tests-5677077b2fc7023/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/bash_lint_tests-dcfd0cebb8e4577f.25di7kr1lxle3psawcw3fxwet.0oa2ylv.rcgu.o 97.078ve5m94j7iiw2jad0so3crt.06f7qra.rcgu.o 97.0mjklk9d3jffklbi8nr9xx45v.06f7qra.rcgu.o 97.0yybq2ejfrqh9e4ctmaefpfxv.06f7qra.rcgu.o 97.11s7yg4ciwt85b6r5b3v9t2x8.06f7qra.rcgu.o 97.14d1zlcaaj1ugf1ly3c1embrw.06f7qra.rcgu.o 97.15oetuoiuk7w76rnxj3tyf2ej.06f7qra.rcgu.o 97.1ffeneopqdddkqw1cjlo6m2yl.06f7qra.rcgu.o 97.1w05mya9zrmm0453pkbtror3l.06f7qra.rcgu.o 97.29694ugww54m46le61myh3h0m.06f7qra.rcgu.o 97.2btxjqwhs4xmxsftdben6r4e8.06f7qra.rcgu.o 97.2fxur8d4x5ud8ebcx187it2fu.06f7qra.rcgu.o 97.2m6gxgceh5cepf71ro7hpnvge.06f7qra.rcgu.o 97.2zl592loejhoomd25r9935vu4.06f7qra.rcgu.o 97.3c0vbzv6q1u83u80qleznucgo.06f7qra.rcgu.o (dns block)
    • Triggering command: /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-e6dfa1d338ec21df /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-e6dfa1d338ec21df /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-e6dfa1d338ec21df.1fisaox3jt�� /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-e6dfa1d338ec21df.1ld6qlr4umiorpbdy9w72ywqd.1if5e3s.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-e6dfa1d338ec21df.1mw3szpkc62x3tnyin50d0h21.1if5e3s.rcgu.o remo�� get-url origin bin/rustc --format=json ,SC1091 ck bin/rustc remo�� .md origin -b4a05c585cc26eff --format=json ,SC1091 heck -b4a05c585cc26eff (dns block)
  • spsprodweu4.vssps.visualstudio.com
    • Triggering command: /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-e6dfa1d338ec21df /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-e6dfa1d338ec21df /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/mcp_http_tests-5677077b2fc7023/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/bash_lint_tests-dcfd0cebb8e4577f.1gltv4rjkcapf0tes9ij6xrd4.0oa2ylv.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/mcp_http_tests-5677077b2fc7023/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/bash_lint_tests-dcfd0cebb8e4577f.1l55qj5mjk0e5f0ujy745ls7w.0oa2ylv.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/mcp_http_tests-5677077b2fc7023/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/bash_lint_tests-dcfd0cebb8e4577f.1rjkwhszs3owkjjdtx9znd52v.0oa2ylv.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/mcp_http_tests-5677077b2fc7023/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/bash_lint_tests-dcfd0cebb8e4577f.24j9dypae3q0p68nqjv7q4p3j.0oa2ylv.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/mcp_http_tests-5677077b2fc7023/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/bash_lint_tests-dcfd0cebb8e4577f.25di7kr1lxle3psawcw3fxwet.0oa2ylv.rcgu.o 97.078ve5m94j7iiw2jad0so3crt.06f7qra.rcgu.o 97.0mjklk9d3jffklbi8nr9xx45v.06f7qra.rcgu.o 97.0yybq2ejfrqh9e4ctmaefpfxv.06f7qra.rcgu.o 97.11s7yg4ciwt85b6r5b3v9t2x8.06f7qra.rcgu.o 97.14d1zlcaaj1ugf1ly3c1embrw.06f7qra.rcgu.o 97.15oetuoiuk7w76rnxj3tyf2ej.06f7qra.rcgu.o 97.1ffeneopqdddkqw1cjlo6m2yl.06f7qra.rcgu.o 97.1w05mya9zrmm0453pkbtror3l.06f7qra.rcgu.o 97.29694ugww54m46le61myh3h0m.06f7qra.rcgu.o 97.2btxjqwhs4xmxsftdben6r4e8.06f7qra.rcgu.o 97.2fxur8d4x5ud8ebcx187it2fu.06f7qra.rcgu.o 97.2m6gxgceh5cepf71ro7hpnvge.06f7qra.rcgu.o 97.2zl592loejhoomd25r9935vu4.06f7qra.rcgu.o 97.3c0vbzv6q1u83u80qleznucgo.06f7qra.rcgu.o (dns block)
    • Triggering command: /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-e6dfa1d338ec21df /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-e6dfa1d338ec21df /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-e6dfa1d338ec21df.1fisaox3jt�� /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-e6dfa1d338ec21df.1ld6qlr4umiorpbdy9w72ywqd.1if5e3s.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-e6dfa1d338ec21df.1mw3szpkc62x3tnyin50d0h21.1if5e3s.rcgu.o remo�� get-url origin bin/rustc --format=json ,SC1091 ck bin/rustc remo�� .md origin -b4a05c585cc26eff --format=json ,SC1091 heck -b4a05c585cc26eff (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Fix test gap analysis for validate.rs and ado_script test(validate): close ado_script/validate regression coverage gaps May 21, 2026
Copilot AI requested a review from jamesadevine May 21, 2026 06:14
@jamesadevine jamesadevine marked this pull request as ready for review May 21, 2026 06:42
@jamesadevine jamesadevine merged commit 471c40b into main May 21, 2026
25 of 30 checks passed
@jamesadevine jamesadevine deleted the copilot/fix-test-gap-in-validate-repo branch May 21, 2026 09:25
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.

🧪 Test gap analysis — 3 gaps found in validate.rs and ado_script path consistency

2 participants