fix(daemon): CI green — .archive-existence tests → import-path assertions; bare 'queue' renders Rich table (TDPLAN-0008, td-47)
test_scheduler_bot.py: replaced test_data_files_archived + test_handler_files_archived (asserted gitignored .archive paths → failed in CI clean checkout) with test_task_registry_not_importable + test_actions_registry_not_importable (assert ImportError — env-independent). queue.py: bare 'drone @daemon queue' now renders the Rich table instead of print_introspection (matches --help). 24 scheduler_bot tests green. Fix by @daemon, verified by devpulse.
This commit is contained in:
@@ -169,7 +169,12 @@ def handle_command(command: str, args: List[str]) -> bool:
|
||||
return False
|
||||
|
||||
if not args:
|
||||
print_introspection()
|
||||
json_handler.log_operation("queue_command", {"json": False})
|
||||
jobs = discover_jobs()
|
||||
runstate = load_runstate()
|
||||
entries = _build_queue(jobs, runstate)
|
||||
_print_rich_table(entries)
|
||||
logger.info("[queue] Queue displayed (%d jobs)", len(entries))
|
||||
return True
|
||||
|
||||
if args[0] in ("--help", "-h"):
|
||||
|
||||
@@ -315,26 +315,21 @@ class TestFailSoft:
|
||||
class TestDormantArchived:
|
||||
"""Verify dormant registries are archived and no live code references them."""
|
||||
|
||||
def test_data_files_archived(self):
|
||||
"""schedule.json and actions_registry.json moved to .archive."""
|
||||
daemon_root = Path(__file__).resolve().parents[1]
|
||||
archive_dir = daemon_root / "daemon_json" / ".archive"
|
||||
assert (archive_dir / "schedule.json").exists()
|
||||
assert (archive_dir / "actions_registry.json").exists()
|
||||
|
||||
def test_original_data_files_gone(self):
|
||||
"""Original data files no longer at daemon_json/ root."""
|
||||
daemon_root = Path(__file__).resolve().parents[1]
|
||||
assert not (daemon_root / "daemon_json" / "schedule.json").exists()
|
||||
assert not (daemon_root / "daemon_json" / "actions_registry.json").exists()
|
||||
|
||||
def test_handler_files_archived(self):
|
||||
"""task_registry.py and actions_registry.py moved to .archive."""
|
||||
daemon_root = Path(__file__).resolve().parents[1]
|
||||
sched_archive = daemon_root / "apps" / "handlers" / "schedule" / ".archive"
|
||||
actions_archive = daemon_root / "apps" / "handlers" / "actions" / ".archive"
|
||||
assert (sched_archive / "task_registry.py").exists()
|
||||
assert (actions_archive / "actions_registry.py").exists()
|
||||
def test_task_registry_not_importable(self):
|
||||
"""task_registry handler is gone from the live import path."""
|
||||
with pytest.raises(ImportError):
|
||||
from aipass.daemon.apps.handlers.schedule.task_registry import load_tasks # type: ignore[import-not-found] # noqa: F401
|
||||
|
||||
def test_actions_registry_not_importable(self):
|
||||
"""actions_registry handler is gone from the live import path."""
|
||||
with pytest.raises(ImportError):
|
||||
from aipass.daemon.apps.handlers.actions.actions_registry import load_registry # type: ignore[import-not-found] # noqa: F401
|
||||
|
||||
def test_schedule_module_retired(self):
|
||||
"""Schedule module handle_command shows retirement notice, not old CRUD."""
|
||||
|
||||
Reference in New Issue
Block a user