From 58aedd0335eddb119bd6cb499166594f33ca21ce Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Sat, 19 Sep 2026 11:58:22 +0100 Subject: [PATCH] ci: resolve grouped infrastructure in smoke bootstrap --- .github/scripts/run_smoke.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/scripts/run_smoke.py b/.github/scripts/run_smoke.py index dbcdbc1..4542c24 100644 --- a/.github/scripts/run_smoke.py +++ b/.github/scripts/run_smoke.py @@ -58,8 +58,14 @@ def _smoke_hands_path(): ) # Prefer the shared resolver, but never require Brain. A bundle's # Brain may be a symlink to canonical; reject that foreign answer. - resolver_file = root / "PyAutoBrain" / "agents" / "_pyauto_root.py" - if resolver_file.is_file(): + resolvers = [p for p in ( + root / "PyAutoBrain" / "agents" / "_pyauto_root.py", + root / "organs" / "PyAutoBrain" / "agents" / "_pyauto_root.py", + ) if p.is_file()] + if len({p.resolve() for p in resolvers}) > 1: + raise RuntimeError("PyAutoBrain has distinct flat and grouped checkouts") + resolver_file = resolvers[0] if resolvers else None + if resolver_file is not None: try: spec = importlib.util.spec_from_file_location( "_smoke_root_resolver", resolver_file @@ -71,7 +77,11 @@ def _smoke_hands_path(): root = resolved except (Exception, SystemExit): pass # Missing/broken optional resolver cannot break discovery. - hands = root / "PyAutoHands" / "autohands" + flat = root / "PyAutoHands" / "autohands" + grouped = root / "organs" / "PyAutoHands" / "autohands" + if (flat / "build_util.py").is_file() and (grouped / "build_util.py").is_file() and flat.resolve() != grouped.resolve(): + raise RuntimeError("PyAutoHands has distinct flat and grouped checkouts") + hands = grouped if (grouped / "build_util.py").is_file() else flat if not (hands / "build_util.py").is_file(): raise ModuleNotFoundError( f"PyAutoHands not found for {WORKSPACE}; looked for "