fix(compile): detect and prevent workspace checkout collision with self repo#456
Merged
Merged
Conversation
Agent-Logs-Url: https://github.com/githubnext/ado-aw/sessions/ca3cf1a1-f294-4f08-9982-5ceaaee7609b Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
Agent-Logs-Url: https://github.com/githubnext/ado-aw/sessions/ca3cf1a1-f294-4f08-9982-5ceaaee7609b Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix workspace checkout collision with self repo
fix(compile): detect and prevent workspace checkout collision with self repo
May 8, 2026
jamesadevine
approved these changes
May 8, 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.
Summary
When a
workspace:/checkout:entry references the same ADO repo checked out asself, both checkouts land ins/<repo-name>and the second silently overwrites the first — wiping files that exist only on the trigger branch and breaking downstream steps like the integrity check.Changes in
src/compile/common.rs:validate_checkout_self_collision()validator — compares the trailing path segment of eachrepositories:entry'sname:against the trigger repo'sBuild.Repository.Name(case-insensitive, so the collision is caught regardless of agent OS) and fails compilation with a message naming both repos.compile_shared()immediately aftervalidate_front_matter_identity(), usingctx.ado_context.repo_name. Skipped when no ADO remote is inferable (unit tests, non-ADO clones).Example error:
Test plan
cargo test— 5 new unit tests pass; full suite (1225 lib + integration) green.cargo clippy --all-targets --all-features— clean.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:
spsprodeus21.vssps.visualstudio.com/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-a3f02ec5a93c8182 /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-a3f02ec5a93c8182 6ksh238exvmortfjlrt.10a8z9q.rcgu.o tbxwvryn5xpq24sz29i.10a8z9q.rcgu.o 3yom1iovwt5ppeyg0wz.10a8z9q.rcgu.o w6z6s1vrexzyhlxi46w.10a8z9q.rcgu.o lxmz0i1607yew7j1rhw.10a8z9q.rcgu.o w1m2uyz3quhc8lugxeo.10a8z9q.rcgu.o jj3q0h3xzhc5zw4ox4i.10a8z9q.rcgu.o wnqg94hqb3cq8knkly5.10a8z9q.rcgu.o 9nv177l742jj24fbqcw.10a8z9q.rcgu.o j1mz2tzr9lnn7p4kdm5.10a8z9q.rcgu.o nzrfoj06d04urrsfl5u.10a8z9q.rcgu.o wu9y�� vzu1tytj0tvhb4hmwaq.10a8z9q.rcgu.o sqbxfafyavajksk78r4.10a8z9q.rcgu.o f/fuzzy-matcher---crate-type lib/rustlib/x86_tail lib/rustlib/x86_-30 lib/rustlib/x86_-C lib/rustlib/x86_embed-bitcode=no(dns block)/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-a3f02ec5a93c8182 /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-a3f02ec5a93c8182 s/compiler_testsremote s/compiler_testsget-url s/compiler_testsorigin s/co�� s/compiler_tests-404504f8280230b7.220tvu26dzce9gekbyb7ksyvt.0x6vv29.rcgu.o s/compiler_tests-404504f8280230b7.23v7xa4xymljcg9ofrfxmw64p.0x6vv29.rcgu.o s/compiler_tests-404504f8280230b7.2appb879eywzbt0j76y0j34nd.0x6vv29.rcgu.o s/compiler_testsgit s/compiler_testsremote s/compiler_testsget-url s/compiler_testsorigin s/co�� gent.md s/compiler_tests-404504f8280230b7.34l7hzdvh2gso9fueo8gvjk9c.0x6vv29.rcgu.o 0063-18/pr-filter-tier1-agent.yml target/debug/depgit target/debug/depremote target/debug/depget-url i-7aeefe72516b1eorigin(dns block)spsprodweu4.vssps.visualstudio.com/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-a3f02ec5a93c8182 /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-a3f02ec5a93c8182 6ksh238exvmortfjlrt.10a8z9q.rcgu.o tbxwvryn5xpq24sz29i.10a8z9q.rcgu.o 3yom1iovwt5ppeyg0wz.10a8z9q.rcgu.o w6z6s1vrexzyhlxi46w.10a8z9q.rcgu.o lxmz0i1607yew7j1rhw.10a8z9q.rcgu.o w1m2uyz3quhc8lugxeo.10a8z9q.rcgu.o jj3q0h3xzhc5zw4ox4i.10a8z9q.rcgu.o wnqg94hqb3cq8knkly5.10a8z9q.rcgu.o 9nv177l742jj24fbqcw.10a8z9q.rcgu.o j1mz2tzr9lnn7p4kdm5.10a8z9q.rcgu.o nzrfoj06d04urrsfl5u.10a8z9q.rcgu.o wu9y�� vzu1tytj0tvhb4hmwaq.10a8z9q.rcgu.o sqbxfafyavajksk78r4.10a8z9q.rcgu.o f/fuzzy-matcher---crate-type lib/rustlib/x86_tail lib/rustlib/x86_-30 lib/rustlib/x86_-C lib/rustlib/x86_embed-bitcode=no(dns block)/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-a3f02ec5a93c8182 /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-a3f02ec5a93c8182 s/compiler_testsremote s/compiler_testsget-url s/compiler_testsorigin s/co�� s/compiler_tests-404504f8280230b7.220tvu26dzce9gekbyb7ksyvt.0x6vv29.rcgu.o s/compiler_tests-404504f8280230b7.23v7xa4xymljcg9ofrfxmw64p.0x6vv29.rcgu.o s/compiler_tests-404504f8280230b7.2appb879eywzbt0j76y0j34nd.0x6vv29.rcgu.o s/compiler_testsgit s/compiler_testsremote s/compiler_testsget-url s/compiler_testsorigin s/co�� gent.md s/compiler_tests-404504f8280230b7.34l7hzdvh2gso9fueo8gvjk9c.0x6vv29.rcgu.o 0063-18/pr-filter-tier1-agent.yml target/debug/depgit target/debug/depremote target/debug/depget-url i-7aeefe72516b1eorigin(dns block)If you need me to access, download, or install something from one of these locations, you can either: