fix(seedgo): audit always ignores .archive/ — full stop (Patrick directive)
readme_check.py: _count_test_functions now skips any path with a SOURCE_SKIP_DIRS segment (.archive) — root cause of the local-vs-CI test-count mismatch (daemon counted 486 local incl archived dead tests vs 300 in CI clean checkout). test_quality_check.py: _find_test_files_broad replaced __pycache__-only skip with _should_skip_dir() on all path parts. Daemon 486→300, audit 100%, 17-branch audit zero regressions. CI-neutral (clean checkout has no .archive). Fix by @seedgo, verified by devpulse.
This commit is contained in:
@@ -30,7 +30,7 @@ from typing import Dict, List, Optional
|
||||
from aipass.prax import logger
|
||||
from aipass.seedgo.apps.handlers.json import json_handler
|
||||
from aipass.seedgo.apps.handlers.bypass.utils import is_bypassed
|
||||
from aipass.seedgo.apps.handlers.aipass_standards.skip_dirs import is_disabled_file
|
||||
from aipass.seedgo.apps.handlers.aipass_standards.skip_dirs import SOURCE_SKIP_DIRS, is_disabled_file
|
||||
|
||||
# Audit scope: entry points only (apps/{name}.py)
|
||||
AUDIT_SCOPE = "entry_point"
|
||||
@@ -505,6 +505,8 @@ def _count_test_functions(tests_dir: Path) -> int:
|
||||
count = 0
|
||||
test_func_pattern = re.compile(r"^\s*def\s+test_", re.MULTILINE)
|
||||
for test_file in tests_dir.rglob("test_*.py"):
|
||||
if any(part in SOURCE_SKIP_DIRS for part in test_file.relative_to(tests_dir).parts):
|
||||
continue
|
||||
if is_disabled_file(test_file.name):
|
||||
continue
|
||||
try:
|
||||
|
||||
@@ -195,7 +195,7 @@ def _find_test_files_broad(branch_path: Path) -> list[Path]:
|
||||
for py_file in sorted(tests_dir.rglob("*.py")):
|
||||
if py_file.name in ("__init__.py", "conftest.py"):
|
||||
continue
|
||||
if "__pycache__" in py_file.parts:
|
||||
if any(_should_skip_dir(part) for part in py_file.relative_to(tests_dir).parts):
|
||||
continue
|
||||
resolved = py_file.resolve()
|
||||
if resolved not in seen:
|
||||
|
||||
Reference in New Issue
Block a user