From 35e2cc8ff2ea76598577d542f90af1763eac5853 Mon Sep 17 00:00:00 2001 From: Agent Zero Date: Sun, 23 Aug 2026 11:32:12 +0200 Subject: [PATCH] fix(arch-010): checker scans full app tree by default and handles relative paths --- scripts/check_cross_plugin_imports.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/scripts/check_cross_plugin_imports.py b/scripts/check_cross_plugin_imports.py index f887765..8177252 100644 --- a/scripts/check_cross_plugin_imports.py +++ b/scripts/check_cross_plugin_imports.py @@ -200,15 +200,10 @@ def find_python_files(search_path: Path | None = None) -> list[Path]: files.append(Path(root) / fname) return sorted(files) - # Default: scan both plugin and core directories + # Default: scan the whole app/ tree so new subpackages are covered automatically files: list[Path] = [] scan_dirs = [ - BUILTINS_DIR, - PROJECT_ROOT / "app" / "core", - PROJECT_ROOT / "app" / "services", - PROJECT_ROOT / "app" / "routes", - PROJECT_ROOT / "app" / "commands", - PROJECT_ROOT / "app" / "ai", + PROJECT_ROOT / "app", ] for scan_dir in scan_dirs: if not scan_dir.exists(): @@ -229,8 +224,8 @@ def main() -> int: parser.add_argument( "--path", type=Path, - default=BUILTINS_DIR, - help="Path to check (default: app/plugins/builtins)", + default=None, + help="Path to check (default: full scan of builtins + core dirs)", ) parser.add_argument( "--verbose", @@ -239,6 +234,10 @@ def main() -> int: ) args = parser.parse_args() + # Resolve user-supplied paths so downstream relative_to(PROJECT_ROOT) works + if args.path is not None: + args.path = args.path.resolve() + files = find_python_files(args.path) all_violations: list[str] = [] checked = 0