Skip to content

Quarantine: test_migration_manager & test_rag_manager assert an unbuilt Manager API (aspirational) #80

Description

@izzywdev

Summary

tests/test_migration_manager.py and tests/test_rag_manager.py (services/orchestrator) are aspirational suites: they assert against a MigrationManager / RAGManager API surface that was never implemented. They cannot pass without either (a) rewriting the tests to the current code (explicitly disallowed — a test must not be reshaped to whatever the code returns) or (b) building the imagined API on the managers, which changes the managers' contracts and breaks current production callers (main_with_hierarchy.py, migrate.py). Building that API is a product decision, not a test-infra fix.

Both files are quarantined at collection (module-level skip) citing this issue — same pattern as #76 (bespoke a2a) and #79 (aspirational /templates). Un-skip only after the target API is designed/frozen and implemented.

Surfaced while driving test-backend green on PR #72 (fix/test-backend-lifespan). The visible error was 23 pytest_asyncio fixture-setup AssertionErrors (class-nested async fixtures not registered under pytest-asyncio 1.4.0 auto-mode); fixing that registration only unmasks the deeper API mismatch below.

test_migration_manager.py — phantom MigrationManager API

Current migration_manager.py (used by prod) exposes: discover_migrations() -> List[Migration], apply_migration(migration: Migration, conn) (returns exec time), get_applied_migrations() -> List[str], migrate_up() -> List[str], get_migration_status() -> Dict, per-call _get_connection().

The test assumes instead:

  • manager.db_pool pool attribute — does not exist (manager uses per-call _get_connection)
  • manager.initialize() / manager.close() — do not exist
  • manager.discover_migration_files() returning dicts (filename/version/description/timestamp) — does not exist
  • manager.apply_migration(dict) returning {"success", "version", "error"} — real signature is (Migration, conn)
  • manager.migrate_up() returning {"success", "applied_count"} — real returns List[str]
  • manager.get_applied_migrations() returning list of dicts with ["version"] — real returns List[str]
  • manager.rollback_migration(version_str, path_str) returning a dict — real signature is (Migration, conn)

test_rag_manager.py — phantom RAGManager API

Real RAGManager exposes initialize, close, store_conversation_message, search_conversation_history, add_to_knowledge_base, search_knowledge_base, get_conversation_context, cleanup_old_data; its pool attribute is self.pool.

The test assumes instead:

  • manager.db_pool — real is manager.pool
  • manager.store_agent_knowledge(...) — not defined (closest: add_to_knowledge_base)
  • manager.search_agent_knowledge(...) — not defined (closest: search_knowledge_base)
  • manager.get_conversation_history(...) — not defined (closest: search_conversation_history)
  • manager.get_enhanced_context(...) — not on RAGManager
  • manager.get_agent_statistics(...) — not defined anywhere
  • manager.cleanup_old_conversations(...) — not defined (closest: cleanup_old_data)
  • manager.summarize_conversation(...) — not defined
  • test bodies also use the legacy test_data = await <async fixture> coroutine-injection pattern, invalid under pytest-asyncio 1.x auto-mode

Acceptance to un-quarantine

Freeze the intended MigrationManager / RAGManager interfaces (contract-designer), implement them on the managers without breaking existing callers, then re-enable each file and confirm test-backend stays green.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions