fix(arch-010): checker scans full app tree by default and handles relative paths

This commit is contained in:
Agent Zero
2026-08-23 11:32:12 +02:00
parent 80775959db
commit 35e2cc8ff2
+8 -9
View File
@@ -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