Test Gap Analysis
Test suite snapshot: 1,733 total tests β all pass β
Previous open issue covering earlier gaps: #376 (still open β generate_lean_prompt, init_logging, MCP tools list).
This issue tracks three new gaps discovered in the 2026-05-19 cycle that are not covered by #376.
Priority Gaps
| Module |
Function/Path |
Why It Matters |
Suggested Test |
compile/job.rs |
generate_job_header() β repositories block (line 84β95) |
The if !front_matter.repositories.is_empty() branch is never entered by any test. The generated header comment tells pipeline authors how to wire up resources: repositories: β a silent regression here would silently produce wrong documentation in every emitted job-template |
Compile a target: job fixture that includes a repos: entry and assert the output header contains resources: and repositories: |
compile/stage.rs |
generate_stage_header() β repositories block (line 85β96) |
Identical pattern to the job gap above. Neither job-agent.md nor stage-agent.md fixture has a repos: field, so the branch is permanently skipped |
Compile a target: stage fixture with one repository and assert header contains the full resources: repositories: block with correct alias, type, and name |
update_check.rs |
parse_version() β pre-release suffix and invalid-input paths |
The code comment explicitly documents: "Pre-release suffixes on the patch component (e.g. "3-beta") are accepted" β but no test exercises this path. If parse_version regresses on a v0.31.0-beta.1 tag, check_for_update silently swallows the None result and the user gets no update notice |
Unit-test parse_version directly via is_newer: pre-release suffix, two-component version, and non-numeric inputs all returning false |
Suggested Test Cases
1. generate_job_header() β repos documentation block
Add a fixture tests/fixtures/job-agent-with-repos.md:
---
name: "Job Agent With Repos"
description: "Tests the repos documentation block in job header"
target: job
repos:
- alias: my-utils
org: my-org
repo: utils
---
## Job Agent With Repos
Review code changes using an additional repository.
Then in tests/compiler_tests.rs:
#[test]
fn test_job_header_contains_repos_documentation() {
let dir = tempdir().unwrap();
copy_fixture_to_dir("job-agent-with-repos.md", &dir);
let output = compile_fixture_in_dir("job-agent-with-repos.md", &dir);
assert!(
output.contains("resources:"),
"job header should document resources block when repos are defined"
);
assert!(
output.contains("repositories:"),
"job header should list repositories"
);
assert!(
output.contains("- repository: my-utils"),
"job header should list the repo alias"
);
}
2. generate_stage_header() β repos documentation block
Same approach with a target: stage fixture, asserting the resources: repositories: block also appears in the stage-template header comment with correct type: and name: lines:
#[test]
fn test_stage_header_contains_repos_documentation() {
let dir = tempdir().unwrap();
copy_fixture_to_dir("stage-agent-with-repos.md", &dir);
let output = compile_fixture_in_dir("stage-agent-with-repos.md", &dir);
assert!(output.contains("# Add these repositories to your pipeline's resources: block:"));
assert!(output.contains("# repositories:"));
assert!(output.contains("# - repository: my-utils"));
assert!(output.contains("# type: git"));
assert!(output.contains("# name: my-org/utils"));
}
3. update_check.rs β parse_version() pre-release and invalid inputs
Add to the existing tests block in src/update_check.rs:
#[test]
fn pre_release_suffix_is_treated_as_newer() {
// "0.31.0-beta.1" β patch leading digits = 0, so NOT newer than 0.30.2
// This tests that the suffix is stripped and doesn't cause a panic or None
assert!(!is_newer("0.31.0-beta.1", "0.31.0"));
// But it should still detect a newer major component
assert!(is_newer("1.0.0-rc.1", "0.31.0"));
}
#[test]
fn invalid_version_strings_are_not_newer() {
assert!(!is_newer("not-a-version", "0.30.2"));
assert!(!is_newer("", "0.30.2"));
assert!(!is_newer("0.31", "0.30.2")); // only two components
assert!(!is_newer("0.30.2", "not-a-version")); // invalid current
}
Coverage Summary
| Module |
Public/Key Fns |
Tests |
Notes |
compile/job.rs |
generate_job_header |
repos branch: 0 |
No target: job + repos: fixture exists |
compile/stage.rs |
generate_stage_header |
repos branch: 0 |
No target: stage + repos: fixture exists |
update_check.rs |
parse_version (private) |
pre-release + invalid: 0 |
Documented behaviour not tested; 6 happy-path tests exist via is_newer |
This issue was created by the automated test gap finder. Previous run: 2026-05-18 (gaps noted, threshold not met). Open issue with earlier gaps: #376. Modules audited this cycle: update_check (new), compile/job (re-audited), compile/stage (re-audited). Total tests found: 1,733 (was 1,724 last cycle, +9).
Generated by Test Gap Finder Β· gh-aw-workflow-call-id: githubnext/ado-aw/test-gap-finder
Generated by Test Gap Finder Β· β 875K Β· β·
Test Gap Analysis
Test suite snapshot: 1,733 total tests β all pass β
Previous open issue covering earlier gaps: #376 (still open β
generate_lean_prompt,init_logging, MCP tools list).This issue tracks three new gaps discovered in the 2026-05-19 cycle that are not covered by #376.
Priority Gaps
compile/job.rsgenerate_job_header()β repositories block (line 84β95)if !front_matter.repositories.is_empty()branch is never entered by any test. The generated header comment tells pipeline authors how to wire upresources: repositories:β a silent regression here would silently produce wrong documentation in every emitted job-templatetarget: jobfixture that includes arepos:entry and assert the output header containsresources:andrepositories:compile/stage.rsgenerate_stage_header()β repositories block (line 85β96)job-agent.mdnorstage-agent.mdfixture has arepos:field, so the branch is permanently skippedtarget: stagefixture with one repository and assert header contains the fullresources: repositories:block with correct alias, type, and nameupdate_check.rsparse_version()β pre-release suffix and invalid-input paths"3-beta") are accepted" β but no test exercises this path. Ifparse_versionregresses on av0.31.0-beta.1tag,check_for_updatesilently swallows theNoneresult and the user gets no update noticeparse_versiondirectly viais_newer: pre-release suffix, two-component version, and non-numeric inputs all returningfalseSuggested Test Cases
1.
generate_job_header()β repos documentation blockAdd a fixture
tests/fixtures/job-agent-with-repos.md:Then in
tests/compiler_tests.rs:2.
generate_stage_header()β repos documentation blockSame approach with a
target: stagefixture, asserting theresources: repositories:block also appears in the stage-template header comment with correcttype:andname:lines:3.
update_check.rsβparse_version()pre-release and invalid inputsAdd to the existing
testsblock insrc/update_check.rs:Coverage Summary
compile/job.rsgenerate_job_headertarget: job+repos:fixture existscompile/stage.rsgenerate_stage_headertarget: stage+repos:fixture existsupdate_check.rsparse_version(private)is_newerThis issue was created by the automated test gap finder. Previous run: 2026-05-18 (gaps noted, threshold not met). Open issue with earlier gaps: #376. Modules audited this cycle:
update_check(new),compile/job(re-audited),compile/stage(re-audited). Total tests found: 1,733 (was 1,724 last cycle, +9).