Skip to content

fix(compile): detect and prevent workspace checkout collision with self repo#456

Merged
jamesadevine merged 3 commits into
mainfrom
copilot/fix-workspace-checkout-collision
May 8, 2026
Merged

fix(compile): detect and prevent workspace checkout collision with self repo#456
jamesadevine merged 3 commits into
mainfrom
copilot/fix-workspace-checkout-collision

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 8, 2026

Summary

When a workspace:/checkout: entry references the same ADO repo checked out as self, both checkouts land in s/<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:

  • New validate_checkout_self_collision() validator — compares the trailing path segment of each repositories: entry's name: against the trigger repo's Build.Repository.Name (case-insensitive, so the collision is caught regardless of agent OS) and fails compilation with a message naming both repos.
  • Wired into compile_shared() immediately after validate_front_matter_identity(), using ctx.ado_context.repo_name. Skipped when no ADO remote is inferable (unit tests, non-ADO clones).
  • Unit tests for collision, no collision, case-insensitive match, missing self name (skipped), and empty checkout.

Example error:

Checkout entry 'my-repo' (repository name 'some-org/my-repo') resolves to the
same directory ('s/my-repo') as the trigger repository checked out as 'self'.
The second checkout would overwrite the first... Remove 'my-repo' from
'checkout:' — the 'self' checkout already provides access to this repository.

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
    • Triggering command: /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)
    • Triggering command: /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
    • Triggering command: /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)
    • Triggering command: /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:

Copilot AI and others added 2 commits May 8, 2026 11:31
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
Copilot AI requested a review from jamesadevine May 8, 2026 11:33
@jamesadevine jamesadevine marked this pull request as ready for review May 8, 2026 11:55
@jamesadevine jamesadevine merged commit 051d45c into main May 8, 2026
@jamesadevine jamesadevine deleted the copilot/fix-workspace-checkout-collision branch May 8, 2026 11:55
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.

fix(compile): detect and prevent workspace checkout collision with self repo

2 participants