diff --git a/.claude/hooks/.diagnostics_state.json b/.claude/hooks/.diagnostics_state.json deleted file mode 100644 index 3b4e22f2..00000000 --- a/.claude/hooks/.diagnostics_state.json +++ /dev/null @@ -1 +0,0 @@ -{"file": "/home/patrick/Projects/AIPass/src/aipass/flow/apps/modules/post_close_runner.py", "errors": [{"line": 30, "message": "E402: Module level import not at top of file"}, {"line": 31, "message": "E402: Module level import not at top of file"}, {"line": 34, "message": "E402: Module level import not at top of file"}, {"line": 42, "message": "E402: Module level import not at top of file"}, {"line": 43, "message": "E402: Module level import not at top of file"}]} \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 4a3bc2d9..cdab81d5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -69,7 +69,7 @@ packages = ["src/aipass"] [tool.pytest.ini_options] testpaths = ["tests", "src"] -norecursedirs = ["templates", "*.egg-info", ".git", ".venv", "__pycache__"] +norecursedirs = ["templates", "*.egg-info", ".git", ".venv", "__pycache__", ".archive", "my-project"] [tool.coverage.run] source = ["src/aipass"] diff --git a/src/aipass/conftest.py b/src/aipass/conftest.py new file mode 100644 index 00000000..0e37126a --- /dev/null +++ b/src/aipass/conftest.py @@ -0,0 +1,6 @@ +import os + +collect_ignore_glob = [ + os.path.join("*", "apps", "handlers", "*", "test_*.py"), + os.path.join("*", "apps", "handlers", "*", "*", "test_*.py"), +] diff --git a/src/aipass/flow/apps/modules/post_close_runner.py b/src/aipass/flow/apps/modules/post_close_runner.py index 7f53b56a..4eb89642 100644 --- a/src/aipass/flow/apps/modules/post_close_runner.py +++ b/src/aipass/flow/apps/modules/post_close_runner.py @@ -22,25 +22,16 @@ This script lives inside the flow branch so handler import guards allow it. import sys from pathlib import Path -# INFRASTRUCTURE IMPORT PATTERN -_PKG_ROOT = Path(__file__).resolve().parents[3] # file.py → modules/ → apps/ → flow/ → aipass/ -FLOW_ROOT = _PKG_ROOT / "flow" - -# External: CLI console (Rich display) and Prax logger from aipass.cli.apps.modules import console, error, warning -from aipass.prax.apps.modules.logger import system_logger as logger - -# JSON handler for operation tracking from aipass.flow.apps.handlers.json import json_handler - -MODULE_NAME = "post_close_runner" - -LOCK_FILE = FLOW_ROOT / ".post_close_runner.lock" - -# AI summarization removed — plans vectorized directly from flow/processed_plans/ -# from aipass.flow.apps.handlers.summary.generate import generate_summaries from aipass.flow.apps.handlers.mbank.process import process_closed_plans from aipass.flow.apps.handlers.runner.lock_ops import acquire_lock, release_lock +from aipass.prax.apps.modules.logger import system_logger as logger + +_PKG_ROOT = Path(__file__).resolve().parents[3] +FLOW_ROOT = _PKG_ROOT / "flow" +MODULE_NAME = "post_close_runner" +LOCK_FILE = FLOW_ROOT / ".post_close_runner.lock" def handle_command(command: str, args: list) -> bool: