Skip to content

fix(compile): resolve autodiscovered source path relative to lock file directory#616

Merged
jamesadevine merged 2 commits into
mainfrom
copilot/fix-auto-discovery-source-path
May 18, 2026
Merged

fix(compile): resolve autodiscovered source path relative to lock file directory#616
jamesadevine merged 2 commits into
mainfrom
copilot/fix-auto-discovery-source-path

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 18, 2026

Summary

ado-aw compile auto-discovery could skip valid sources on Windows when the lock header stored a bare source="file.md" path, because resolution was done from process cwd/repo root instead of the lock file’s directory. This change makes source resolution lock-file-relative first, while preserving compatibility with existing repo-root-relative headers.

  • Path resolution behavior

    • In compile_all_pipelines, source lookup now prefers:
      1. yaml_output_path.parent().join(source)
      2. fallback to root.join(source)
    • This keeps existing pipelines working while fixing nested lock-file layouts.
  • Regression coverage

    • Added a focused test for nested lock files where the header contains a bare source filename (source="nested-agent.md"), validating that root-level auto-discovery recompiles successfully.
let source_candidate_from_yaml_dir = yaml_output_path
    .parent()
    .unwrap_or(root)
    .join(&pipeline.source);
let source_candidate_from_root = root.join(&pipeline.source);

let source_path = if source_candidate_from_yaml_dir.exists() {
    source_candidate_from_yaml_dir
} else {
    source_candidate_from_root
};

Test plan

  • Regression is covered by test_compile_auto_discover_resolves_source_relative_to_lock_file_dir in tests/compiler_tests.rs.

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-7602a9e71670d2b8 /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-7602a9e71670d2b8 /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/status_integration-b06bb9ae4d9/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/mcp_http_tests-fc05a77f65e2b218.15lw6btn7wuofrtn1brbzbsad.1w5nr3v.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/status_integration-b06bb9ae4d9/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/mcp_http_tests-fc05a77f65e2b218.1dxjo31xmnfmvko6obq4dkewp.1w5nr3v.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/status_integration-b06bb9ae4d9/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/mcp_http_tests-fc05a77f65e2b218.1fmsbhsvn5ln8zuwpm1u4qlpa.1w5nr3v.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/status_integration-b06bb9ae4d9/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/mcp_http_tests-fc05a77f65e2b218.1g7yqfwx5al18vcg6om778jm6.1w5nr3v.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/status_integration-b06bb9ae4d9/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/mcp_http_tests-fc05a77f65e2b218.1ruf05atsfz12pmtiegt3k9e3.1w5nr3v.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/status_integration-b06bb9ae4d9/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/mcp_http_tests-fc05a77f65e2b218.1v9pkrrxuvldu3kpija3ri609.1w5nr3v.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/status_integration-b06bb9ae4d9/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/mcp_http_tests-fc05a77f65e2b218.1z9p1hh1j7bpm7d0eer796tp4.1w5nr3v.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/status_integration-b06bb9ae4d9/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/mcp_http_tests-fc05a77f65e2b218.23tyqebz1hja4hdciqqtgagsh.1w5nr3v.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/status_integration-b06bb9ae4d9b787�� /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/status_integration-b06bb9ae4d9b7872.3p3079f8d7n8rp4rvey5rrfbl.09vwh0t.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/status_integration-b06bb9ae4d9b7872.3qaoqa3a60obbt6bg0bc14b5a.09vwh0t.rcgu.o zr2t�� owc5tozfda3gb1o8bnlrzp6.0t0w6bx.rcgu.o xi1ay2o8cb6fl864188sdu4.0t0w6bx.rcgu.o mbols.o 200f38d8081bcd5acc 200f38d8081bcd5a-m64 200f38d8081bcd5a/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/rustcL5lsMd/symbols.o 200f38d8081bcd5a/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/status_integration-b06bb9ae4d9/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/mcp_http_tests-fc05a77f65e2b218.0hjy8l8ep3il5ckn988thm53m.1w5nr3v.rcgu.o (http block)
  • spsprodeus21.vssps.visualstudio.com
    • Triggering command: /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-7602a9e71670d2b8 /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-7602a9e71670d2b8 /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/status_integration-b06bb9ae4d9/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/mcp_http_tests-fc05a77f65e2b218.15lw6btn7wuofrtn1brbzbsad.1w5nr3v.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/status_integration-b06bb9ae4d9/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/mcp_http_tests-fc05a77f65e2b218.1dxjo31xmnfmvko6obq4dkewp.1w5nr3v.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/status_integration-b06bb9ae4d9/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/mcp_http_tests-fc05a77f65e2b218.1fmsbhsvn5ln8zuwpm1u4qlpa.1w5nr3v.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/status_integration-b06bb9ae4d9/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/mcp_http_tests-fc05a77f65e2b218.1g7yqfwx5al18vcg6om778jm6.1w5nr3v.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/status_integration-b06bb9ae4d9/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/mcp_http_tests-fc05a77f65e2b218.1ruf05atsfz12pmtiegt3k9e3.1w5nr3v.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/status_integration-b06bb9ae4d9/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/mcp_http_tests-fc05a77f65e2b218.1v9pkrrxuvldu3kpija3ri609.1w5nr3v.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/status_integration-b06bb9ae4d9/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/mcp_http_tests-fc05a77f65e2b218.1z9p1hh1j7bpm7d0eer796tp4.1w5nr3v.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/status_integration-b06bb9ae4d9/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/mcp_http_tests-fc05a77f65e2b218.23tyqebz1hja4hdciqqtgagsh.1w5nr3v.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/status_integration-b06bb9ae4d9b787�� /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/status_integration-b06bb9ae4d9b7872.3p3079f8d7n8rp4rvey5rrfbl.09vwh0t.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/status_integration-b06bb9ae4d9b7872.3qaoqa3a60obbt6bg0bc14b5a.09vwh0t.rcgu.o zr2t�� owc5tozfda3gb1o8bnlrzp6.0t0w6bx.rcgu.o xi1ay2o8cb6fl864188sdu4.0t0w6bx.rcgu.o mbols.o 200f38d8081bcd5acc 200f38d8081bcd5a-m64 200f38d8081bcd5a/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/rustcL5lsMd/symbols.o 200f38d8081bcd5a/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/status_integration-b06bb9ae4d9/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/mcp_http_tests-fc05a77f65e2b218.0hjy8l8ep3il5ckn988thm53m.1w5nr3v.rcgu.o (dns block)
  • spsprodweu4.vssps.visualstudio.com
    • Triggering command: /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-7602a9e71670d2b8 /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-7602a9e71670d2b8 /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/status_integration-b06bb9ae4d9/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/mcp_http_tests-fc05a77f65e2b218.15lw6btn7wuofrtn1brbzbsad.1w5nr3v.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/status_integration-b06bb9ae4d9/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/mcp_http_tests-fc05a77f65e2b218.1dxjo31xmnfmvko6obq4dkewp.1w5nr3v.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/status_integration-b06bb9ae4d9/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/mcp_http_tests-fc05a77f65e2b218.1fmsbhsvn5ln8zuwpm1u4qlpa.1w5nr3v.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/status_integration-b06bb9ae4d9/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/mcp_http_tests-fc05a77f65e2b218.1g7yqfwx5al18vcg6om778jm6.1w5nr3v.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/status_integration-b06bb9ae4d9/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/mcp_http_tests-fc05a77f65e2b218.1ruf05atsfz12pmtiegt3k9e3.1w5nr3v.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/status_integration-b06bb9ae4d9/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/mcp_http_tests-fc05a77f65e2b218.1v9pkrrxuvldu3kpija3ri609.1w5nr3v.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/status_integration-b06bb9ae4d9/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/mcp_http_tests-fc05a77f65e2b218.1z9p1hh1j7bpm7d0eer796tp4.1w5nr3v.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/status_integration-b06bb9ae4d9/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/mcp_http_tests-fc05a77f65e2b218.23tyqebz1hja4hdciqqtgagsh.1w5nr3v.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/status_integration-b06bb9ae4d9b787�� /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/status_integration-b06bb9ae4d9b7872.3p3079f8d7n8rp4rvey5rrfbl.09vwh0t.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/status_integration-b06bb9ae4d9b7872.3qaoqa3a60obbt6bg0bc14b5a.09vwh0t.rcgu.o zr2t�� owc5tozfda3gb1o8bnlrzp6.0t0w6bx.rcgu.o xi1ay2o8cb6fl864188sdu4.0t0w6bx.rcgu.o mbols.o 200f38d8081bcd5acc 200f38d8081bcd5a-m64 200f38d8081bcd5a/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/rustcL5lsMd/symbols.o 200f38d8081bcd5a/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/status_integration-b06bb9ae4d9/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/mcp_http_tests-fc05a77f65e2b218.0hjy8l8ep3il5ckn988thm53m.1w5nr3v.rcgu.o (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 auto-discovery resolving source path in Windows fix(compile): resolve autodiscovered source path relative to lock file directory May 18, 2026
Copilot AI requested a review from jamesadevine May 18, 2026 13:22
@jamesadevine jamesadevine marked this pull request as ready for review May 18, 2026 13:31
@jamesadevine jamesadevine merged commit be2e1c4 into main May 18, 2026
@jamesadevine jamesadevine deleted the copilot/fix-auto-discovery-source-path branch May 18, 2026 13:31
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.

compile auto-discovery resolves source path relative to cwd instead of lock file dir (Windows)

2 participants